@nixweb/nixloc-ui 0.0.155 → 0.0.157
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.
- package/package.json +1 -1
- package/src/component/shared/Messages.vue +1 -1
- package/src/component/shared/ParameterLegend.vue +8 -1
- package/src/component/shared/SaveCancel.vue +13 -1
- package/src/component/shared/SelectOption.vue +6 -3
- package/src/component/shared/Toast.vue +17 -2
- package/src/component/template/ViewTemplateDocumentView.vue +7 -2
- package/src/store/modules/generic.js +35 -16
package/package.json
CHANGED
|
@@ -55,6 +55,7 @@ export default {
|
|
|
55
55
|
},
|
|
56
56
|
props: {
|
|
57
57
|
legend: [],
|
|
58
|
+
module: String,
|
|
58
59
|
},
|
|
59
60
|
data() {
|
|
60
61
|
return {
|
|
@@ -75,7 +76,13 @@ export default {
|
|
|
75
76
|
...mapGetters("generic", ["groupBy"]),
|
|
76
77
|
...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
|
|
77
78
|
grouped() {
|
|
78
|
-
|
|
79
|
+
let legend = [];
|
|
80
|
+
this.legendLocal.forEach((item) => {
|
|
81
|
+
if (item.showModule.includes(this.module) || item.showModule == "all")
|
|
82
|
+
legend.push(item);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var list = this.groupBy({ array: legend, key: "groupName" });
|
|
79
86
|
return list;
|
|
80
87
|
},
|
|
81
88
|
},
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<FixedBar
|
|
3
|
+
<FixedBar
|
|
4
|
+
position="footer"
|
|
5
|
+
backgroundColor="#FAFAFC"
|
|
6
|
+
v-show="formDirty && !modal.open && on"
|
|
7
|
+
>
|
|
4
8
|
<div class="margin">
|
|
5
9
|
<Button
|
|
6
10
|
_key="cancelSaveCancel"
|
|
@@ -38,6 +42,7 @@ export default {
|
|
|
38
42
|
data() {
|
|
39
43
|
return {
|
|
40
44
|
id: this.$route.params.id,
|
|
45
|
+
on: false,
|
|
41
46
|
};
|
|
42
47
|
},
|
|
43
48
|
mounted() {
|
|
@@ -49,10 +54,17 @@ export default {
|
|
|
49
54
|
self.removeLoading(["panel"]);
|
|
50
55
|
}, 350);
|
|
51
56
|
}
|
|
57
|
+
|
|
58
|
+
let self = this;
|
|
59
|
+
setTimeout(function () {
|
|
60
|
+
self.updateFormDirty(false);
|
|
61
|
+
self.on = true;
|
|
62
|
+
}, 1000);
|
|
52
63
|
},
|
|
53
64
|
computed: {
|
|
54
65
|
...mapState("validation", ["formDirty"]),
|
|
55
66
|
...mapState("generic", ["loading"]),
|
|
67
|
+
...mapGetters("generic", ["event"]),
|
|
56
68
|
...mapGetters("validation", ["isFormValid"]),
|
|
57
69
|
...mapState("generic", ["modal"]),
|
|
58
70
|
},
|
|
@@ -80,8 +80,11 @@ export default {
|
|
|
80
80
|
this.$emit("input", value);
|
|
81
81
|
},
|
|
82
82
|
execute() {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
let self = this;
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
self.removeLoading(["btnClickedNext"]);
|
|
86
|
+
if (self.clickedNext) self.clickedNext();
|
|
87
|
+
}, 350);
|
|
85
88
|
},
|
|
86
89
|
},
|
|
87
90
|
computed: {
|
|
@@ -123,7 +126,7 @@ export default {
|
|
|
123
126
|
|
|
124
127
|
.selected {
|
|
125
128
|
background-color: white;
|
|
126
|
-
border-color: #
|
|
129
|
+
border-color: #4680a5;
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
.icon {
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
type: "success",
|
|
24
24
|
});
|
|
25
25
|
if (value.type == "postApiError" || value.type == "putApiErro") {
|
|
26
|
-
this.$toasted.show("
|
|
26
|
+
this.$toasted.show("Não foi possível adicionar/modificar", {
|
|
27
27
|
type: "error",
|
|
28
28
|
});
|
|
29
29
|
this.voltarParaTopo();
|
|
@@ -34,12 +34,27 @@ export default {
|
|
|
34
34
|
type: "success",
|
|
35
35
|
});
|
|
36
36
|
if (value.type == "removerTodosApiErro") {
|
|
37
|
-
this.$toasted.show("
|
|
37
|
+
this.$toasted.show("Não foi possível remover", {
|
|
38
|
+
type: "error",
|
|
39
|
+
});
|
|
40
|
+
this.voltarParaTopo();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (value.type == "noPermission") {
|
|
44
|
+
this.$toasted.show("Usuário sem permissão", {
|
|
38
45
|
type: "error",
|
|
39
46
|
});
|
|
40
47
|
this.voltarParaTopo();
|
|
41
48
|
}
|
|
49
|
+
|
|
42
50
|
if (value.type == "falhaGenerica") {
|
|
51
|
+
this.$toasted.show("Ops! Falha de servidor", {
|
|
52
|
+
type: "error",
|
|
53
|
+
});
|
|
54
|
+
this.voltarParaTopo();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (value.type == "messageError") {
|
|
43
58
|
this.$toasted.show("Ops! Algo deu errado", {
|
|
44
59
|
type: "error",
|
|
45
60
|
});
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<div class="side-by-side">
|
|
50
50
|
<Button
|
|
51
51
|
key="showModalLegend"
|
|
52
|
-
title="Parâmetros
|
|
52
|
+
title="Parâmetros"
|
|
53
53
|
type="info"
|
|
54
54
|
classIcon="fas fa-book-reader"
|
|
55
55
|
size="small"
|
|
@@ -84,7 +84,11 @@
|
|
|
84
84
|
<slot></slot>
|
|
85
85
|
</Modal>
|
|
86
86
|
<Modal title="Parâmetros" :width="1100" v-show="showModal('legenda')">
|
|
87
|
-
<ParameterLegend
|
|
87
|
+
<ParameterLegend
|
|
88
|
+
v-show="modal.open"
|
|
89
|
+
:legend="parameterLegend"
|
|
90
|
+
:module="module"
|
|
91
|
+
/>
|
|
88
92
|
</Modal>
|
|
89
93
|
<Modal title="Editor de Código" :width="900" v-if="showModal('code')">
|
|
90
94
|
<CodeEditor v-if="modal.open" />
|
|
@@ -167,6 +171,7 @@ export default {
|
|
|
167
171
|
panel: Object,
|
|
168
172
|
parameterExemple: Object,
|
|
169
173
|
parameterLegend: Array,
|
|
174
|
+
module: String,
|
|
170
175
|
},
|
|
171
176
|
data() {
|
|
172
177
|
return {
|
|
@@ -102,6 +102,7 @@ export default {
|
|
|
102
102
|
let isPayment = th.innerText.includes("t.pagamentoLocacao");
|
|
103
103
|
let isPeriod = th.innerText.includes("t.periodoLocacao");
|
|
104
104
|
let isProduct = th.innerText.includes("t.produtoLocacao");
|
|
105
|
+
let isInvoice = th.innerText.includes("t.produtoFatura");
|
|
105
106
|
let isGrouped = th.innerText.includes("t.produtoAgrupado");
|
|
106
107
|
let isMoviment = th.innerText.includes("t.produtoMovimentacao");
|
|
107
108
|
let isCustumerAddress = th.innerText.includes("t.enderecoCliente");
|
|
@@ -111,6 +112,9 @@ export default {
|
|
|
111
112
|
if (isProduct) {
|
|
112
113
|
obj.vForSimple = "v-for='produto in d.itensLocacao'";
|
|
113
114
|
config.push(obj);
|
|
115
|
+
} else if (isInvoice) {
|
|
116
|
+
obj.vForSimple = "v-for='produto in d.itensFatura'";
|
|
117
|
+
config.push(obj);
|
|
114
118
|
} else if (isPeriod) {
|
|
115
119
|
obj.vForSimple = "v-for='periodo in d.periodoLocacao'";
|
|
116
120
|
config.push(obj);
|
|
@@ -320,14 +324,17 @@ export default {
|
|
|
320
324
|
} else {
|
|
321
325
|
|
|
322
326
|
context.commit('addNotifications', response.data.notifications)
|
|
323
|
-
context.commit('addToast', '
|
|
327
|
+
context.commit('addToast', 'messageError');
|
|
328
|
+
|
|
324
329
|
return response.data;
|
|
325
330
|
}
|
|
326
331
|
}, (err) => {
|
|
327
332
|
|
|
328
333
|
if (err.response)
|
|
329
|
-
if (err.response.status === 403)
|
|
334
|
+
if (err.response.status === 403) {
|
|
330
335
|
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
336
|
+
context.commit('addToast', 'noPermission');
|
|
337
|
+
}
|
|
331
338
|
|
|
332
339
|
if (!err.response)
|
|
333
340
|
context.commit('addNotificationErrorApi');
|
|
@@ -350,15 +357,16 @@ export default {
|
|
|
350
357
|
context.commit('validation/removeFormDirty', null, { root: true });
|
|
351
358
|
return response.data;
|
|
352
359
|
} else {
|
|
353
|
-
context.commit('addToast', 'putApiErro');
|
|
354
360
|
context.commit('addNotifications', response.data.notifications)
|
|
355
|
-
|
|
361
|
+
context.commit('addToast', 'messageError');
|
|
356
362
|
return response.data;
|
|
357
363
|
}
|
|
358
364
|
}, (err) => {
|
|
359
365
|
if (err.response)
|
|
360
|
-
if (err.response.status === 403)
|
|
366
|
+
if (err.response.status === 403) {
|
|
361
367
|
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
368
|
+
context.commit('addToast', 'noPermission');
|
|
369
|
+
}
|
|
362
370
|
|
|
363
371
|
if (!err.response)
|
|
364
372
|
context.commit('addNotificationErrorApi');
|
|
@@ -430,14 +438,16 @@ export default {
|
|
|
430
438
|
} else {
|
|
431
439
|
context.commit('addNotifications', response.data.notifications)
|
|
432
440
|
context.commit('addMethodExecutedApi', 'putApiErro');
|
|
433
|
-
context.commit('addToast', '
|
|
441
|
+
context.commit('addToast', 'messageError');
|
|
434
442
|
return response.data;
|
|
435
443
|
}
|
|
436
444
|
|
|
437
445
|
}, (err) => {
|
|
438
446
|
if (err.response)
|
|
439
|
-
if (err.response.status === 403)
|
|
447
|
+
if (err.response.status === 403) {
|
|
440
448
|
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
449
|
+
context.commit('addToast', 'noPermission');
|
|
450
|
+
}
|
|
441
451
|
|
|
442
452
|
if (!err.response)
|
|
443
453
|
context.commit('addNotificationErrorApi');
|
|
@@ -464,14 +474,16 @@ export default {
|
|
|
464
474
|
} else {
|
|
465
475
|
context.commit('addNotifications', response.data.notifications)
|
|
466
476
|
context.commit('addMethodExecutedApi', 'deleteAllApiErro');
|
|
467
|
-
context.commit('addToast', '
|
|
477
|
+
context.commit('addToast', 'messageError');
|
|
468
478
|
return response.data;
|
|
469
479
|
}
|
|
470
480
|
|
|
471
481
|
}, (err) => {
|
|
472
482
|
if (err.response)
|
|
473
|
-
if (err.response.status === 403)
|
|
483
|
+
if (err.response.status === 403) {
|
|
474
484
|
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
485
|
+
context.commit('addToast', 'noPermission');
|
|
486
|
+
}
|
|
475
487
|
|
|
476
488
|
if (!err.response)
|
|
477
489
|
context.commit('addNotificationErrorApi');
|
|
@@ -494,14 +506,16 @@ export default {
|
|
|
494
506
|
return response.data;
|
|
495
507
|
} else {
|
|
496
508
|
context.commit('addNotifications', response.data.notifications)
|
|
497
|
-
context.commit('addToast', '
|
|
509
|
+
context.commit('addToast', 'messageError');
|
|
498
510
|
return response.data;
|
|
499
511
|
}
|
|
500
512
|
|
|
501
513
|
}, (err) => {
|
|
502
514
|
if (err.response)
|
|
503
|
-
if (err.response.status === 403)
|
|
515
|
+
if (err.response.status === 403) {
|
|
504
516
|
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
517
|
+
context.commit('addToast', 'noPermission');
|
|
518
|
+
}
|
|
505
519
|
|
|
506
520
|
if (!err.response)
|
|
507
521
|
context.commit('addNotificationErrorApi');
|
|
@@ -543,15 +557,18 @@ export default {
|
|
|
543
557
|
context.commit('removeNotificarions');
|
|
544
558
|
return response.data;
|
|
545
559
|
} else {
|
|
546
|
-
|
|
560
|
+
|
|
547
561
|
context.commit('addNotifications', response.data.notifications)
|
|
562
|
+
context.commit('addToast', 'messageError');
|
|
548
563
|
|
|
549
564
|
return response.data;
|
|
550
565
|
}
|
|
551
566
|
}, (err) => {
|
|
552
567
|
if (err.response)
|
|
553
|
-
if (err.response.status === 403)
|
|
554
|
-
context.commit('addNotifications', [{ message: "Usuário sem permissão para
|
|
568
|
+
if (err.response.status === 403) {
|
|
569
|
+
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
570
|
+
context.commit('addToast', 'noPermission');
|
|
571
|
+
}
|
|
555
572
|
|
|
556
573
|
if (!err.response)
|
|
557
574
|
context.commit('addNotificationErrorApi');
|
|
@@ -580,8 +597,10 @@ export default {
|
|
|
580
597
|
}
|
|
581
598
|
}, (err) => {
|
|
582
599
|
if (err.response)
|
|
583
|
-
if (err.response.status === 403)
|
|
584
|
-
context.commit('addNotifications', [{ message: "Usuário sem permissão para
|
|
600
|
+
if (err.response.status === 403) {
|
|
601
|
+
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
602
|
+
context.commit('addToast', 'noPermission');
|
|
603
|
+
}
|
|
585
604
|
|
|
586
605
|
if (!err.response)
|
|
587
606
|
context.commit('addNotificationErrorApi');
|