hot fix marco

This commit is contained in:
2021-01-06 21:13:18 -06:00
parent 897e50b9b8
commit 0290fe1dc3
3 changed files with 14910 additions and 51 deletions
@@ -23,7 +23,7 @@
</section>
</b-upload>
</b-field>
<b-button v-if="csv.name" @click="actualizarDialog()" class="is-info"
<b-button v-if="csv.name" @click="dialog()" class="is-info"
>Enviar archivo</b-button
>
<b-button v-else disabled class="is-info">Enviar archivo</b-button>
@@ -79,13 +79,12 @@ export default {
});
},
enviarCargaMasiva() {
this.isLoading = true;
const formData = new FormData();
if (this.cartaAceptacion) {
formData.append("cartaAceptacion", this.cartaAceptacion);
}
this.isLoading = true;
formData.append("csv", this.csv);
axios
.put(`${process.env.api}/programa/carga_masiva`, formData, {
.post(`${process.env.api}/programa/carga_masiva`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
@@ -96,11 +95,11 @@ export default {
this.toastType = "is-success";
this.toastMessage = "Se ha enviado la carga masiva con éxito";
this.toast();
this.$$router.push("/admin");
})
.catch((err) => {
this.isLoading = false;
this.error(err.response.data.message);
console.log(err.response.data.message);
});
},
error(msj) {