hot fix marco
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user