| 1234567891011121314151617181920 |
- import { MutationTypes } from "@/store/Mutations";
- import { defineComponent } from "vue";
- const API_URL = process.env.VUE_APP_API_URL;
- export default defineComponent({
- methods: {
- updatePlanningVersions() {
- fetch(`${API_URL}api/evenements/history/${this.$store.state.evenement.uuid}`)
- .then((response) => {
- if (response.status == 200) {
- return response.json();
- } else {
- throw new Error(response.statusText);
- }
- })
- .then((data) => this.$store.commit(MutationTypes.refreshVersion, data))
- .catch((err) => console.error("Error while getting planning history", err));
- },
- },
- });
|