@burh/nuxt-core 1.0.444 → 1.0.445
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
<div class="mt-5">
|
|
164
164
|
<dropzone-file-upload
|
|
165
165
|
disabled
|
|
166
|
-
@error="
|
|
166
|
+
@error="showMessageError"
|
|
167
167
|
ref="MyDropzone"
|
|
168
168
|
:options="dropzoneOptions"
|
|
169
169
|
v-model="fileToUpload"
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
ref="MyReportDropzone"
|
|
197
197
|
v-model="reportFileUpload"
|
|
198
198
|
:options="reportsDropdownzoneOptions"
|
|
199
|
-
@error="
|
|
199
|
+
@error="showMessageError"
|
|
200
200
|
/>
|
|
201
201
|
|
|
202
202
|
<div class="archive-buttons" v-if="reportFileUpload.length > 0">
|
|
@@ -424,11 +424,11 @@ export default {
|
|
|
424
424
|
this.currentRemoveItem = item;
|
|
425
425
|
},
|
|
426
426
|
|
|
427
|
-
|
|
427
|
+
showToast(type, title){
|
|
428
428
|
const Toast = swal.mixin({
|
|
429
429
|
toast: true,
|
|
430
430
|
position: 'top-end',
|
|
431
|
-
|
|
431
|
+
showConfirmButton: false,
|
|
432
432
|
timer: 3100,
|
|
433
433
|
});
|
|
434
434
|
|
|
@@ -438,12 +438,12 @@ export default {
|
|
|
438
438
|
});
|
|
439
439
|
},
|
|
440
440
|
|
|
441
|
-
|
|
441
|
+
showMessageError(file, message) {
|
|
442
442
|
this.isError = true;
|
|
443
443
|
this.$refs.Mydropzone && this.$refs.Mydropzone.removeAllFiles();
|
|
444
444
|
|
|
445
445
|
if (file.status !== 'canceled'){
|
|
446
|
-
this.
|
|
446
|
+
this.showToast('error', message);
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
|
|
@@ -455,13 +455,13 @@ export default {
|
|
|
455
455
|
if (!this.isError) {
|
|
456
456
|
this.$emit('save-archive', this.fileToUpload[0], this.userData.id);
|
|
457
457
|
this.$refs.MyDropzone && this.$refs.MyDropzone.removeAllFiles();
|
|
458
|
-
this.
|
|
458
|
+
this.showToast('success', 'Arquivo enviado com sucesso.');
|
|
459
459
|
|
|
460
460
|
} else {
|
|
461
461
|
if (this.fileToUpload.length > 0) {
|
|
462
|
-
this.
|
|
462
|
+
this.showToast('error', 'Arquivo invalido.');
|
|
463
463
|
} else {
|
|
464
|
-
this.
|
|
464
|
+
this.showToast('warning', 'Selecione um arquivo.');
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
},
|
|
@@ -470,13 +470,13 @@ export default {
|
|
|
470
470
|
if (!this.isError) {
|
|
471
471
|
this.$emit('save-report', this.reportFileUpload[0], this.userFolderId);
|
|
472
472
|
this.$refs.MyReportDropzone && this.$refs.MyReportDropzone.removeAllFiles();
|
|
473
|
-
this.
|
|
473
|
+
this.showToast('success', 'Arquivo enviado com sucesso.');
|
|
474
474
|
|
|
475
475
|
} else {
|
|
476
476
|
if (this.reportFileUpload.length > 0) {
|
|
477
|
-
this.
|
|
477
|
+
this.showToast('error', 'Arquivo invalido.');
|
|
478
478
|
} else {
|
|
479
|
-
this.
|
|
479
|
+
this.showToast('warning', 'Selecione um arquivo.');
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
},
|