diff --git a/src/components/ImportTask.vue b/src/components/ImportTask.vue index 7214eb04dac1288c2a5388c4bfa2d9c537ba78c8..bc644619ef20358cb6ac97e4559d7fdf77a45867 100644 --- a/src/components/ImportTask.vue +++ b/src/components/ImportTask.vue @@ -3,7 +3,7 @@ <table class="ui collapsing celled table"> <thead> <tr> - <th>Fichier</th> + <th>Fichiers importés</th> <th>Status</th> </tr> </thead> diff --git a/src/store/modules/feature_type.js b/src/store/modules/feature_type.js index 3e12c3a114fef4111565a1527e3390eb3c766ed7..b07e19a01ace26530e8dc569e1892182ee58e6f9 100644 --- a/src/store/modules/feature_type.js +++ b/src/store/modules/feature_type.js @@ -1,3 +1,7 @@ +import axios from "axios" +import store from '@/store'; + + const feature_type = { namespaced: true, state: { @@ -72,17 +76,17 @@ const feature_type = { const data = { form: state.form, formset: state.customForms } console.log("data", data) - /* axios - .post(`${DJANGO_API_BASE}feature_type/`, data) + axios + .post(`${process.env.VUE_APP_DJANGO_API_BASE}feature_type/`, data) .then((response) => { - const routerHistory = router.options.routerHistory - commit("SET_USER", response.data.user); - router.push(routerHistory[routerHistory.length - 1] || "/") - dispatch("GET_USER_LEVEL_PROJECTS"); + const routerHistory = this.$router.options.routerHistory + store.commit("SET_USER", response.data.user); + this.$router.push(routerHistory[routerHistory.length - 1] || "/") + store.dispatch("GET_USER_LEVEL_PROJECTS"); }) .catch(() => { - commit("SET_USER", false) - }); */ + store.commit("SET_USER", false) + }); }, },