@nixweb/nixloc-ui 0.0.151 → 0.0.153
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/forms/InputWhatsApp.vue +48 -0
- package/src/component/layout/Header.vue +1 -1
- package/src/component/layout/Menu.vue +50 -40
- package/src/component/layout/Panel.vue +1 -1
- package/src/component/shared/TableItem.vue +11 -1
- package/src/component/value-objects/Person.vue +3 -1
- package/src/store/modules/generic.js +41 -0
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<InputText
|
|
4
|
+
:title="title"
|
|
5
|
+
:field="field"
|
|
6
|
+
:formName="formName"
|
|
7
|
+
:required="required"
|
|
8
|
+
:mask="['(##) ####-####', '(##) #####-####']"
|
|
9
|
+
:maxLength="maxLength"
|
|
10
|
+
:markFormDirty="markFormDirty"
|
|
11
|
+
v-model="mobile"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script>
|
|
16
|
+
import InputText from "./InputText";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "InputWhatsApp",
|
|
20
|
+
props: [
|
|
21
|
+
"title",
|
|
22
|
+
"field",
|
|
23
|
+
"disabled",
|
|
24
|
+
"formName",
|
|
25
|
+
"required",
|
|
26
|
+
"maxLength",
|
|
27
|
+
"value",
|
|
28
|
+
"markFormDirty",
|
|
29
|
+
],
|
|
30
|
+
components: { InputText },
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
mobile: "",
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
created() {
|
|
37
|
+
this.mobile = this.value;
|
|
38
|
+
},
|
|
39
|
+
watch: {
|
|
40
|
+
value() {
|
|
41
|
+
this.mobile = this.value;
|
|
42
|
+
},
|
|
43
|
+
mobile() {
|
|
44
|
+
this.$emit("input", this.mobile);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
@@ -29,10 +29,13 @@
|
|
|
29
29
|
<b-row>
|
|
30
30
|
<b-col sm="12">
|
|
31
31
|
<div class="box-icon text-center">
|
|
32
|
-
<i :class="item.icon"></i
|
|
33
|
-
|
|
32
|
+
<i :class="item.icon"></i><br />
|
|
33
|
+
<div class="div-title">{{ item.title }}</div>
|
|
34
|
+
</div>
|
|
35
|
+
</b-col>
|
|
34
36
|
</b-row>
|
|
35
|
-
|
|
37
|
+
|
|
38
|
+
<!-- <b-row v-if="false">
|
|
36
39
|
<b-col sm="12">
|
|
37
40
|
<div class="div-title text-center">
|
|
38
41
|
<span
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
>
|
|
45
48
|
</div>
|
|
46
49
|
</b-col>
|
|
47
|
-
</b-row>
|
|
50
|
+
</b-row> -->
|
|
48
51
|
</div>
|
|
49
52
|
</a>
|
|
50
53
|
</div>
|
|
@@ -53,41 +56,43 @@
|
|
|
53
56
|
|
|
54
57
|
<transition name="slide-fade">
|
|
55
58
|
<div class="context-menu-container" v-if="subMenuFirstLevel">
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
<div>
|
|
60
|
+
<ul class="context-menu">
|
|
61
|
+
<li v-for="(item, index) in subMenuFilter(false)" :key="index">
|
|
62
|
+
<h5 v-if="item.type === 'group'" class="context-menu__title">
|
|
63
|
+
<span class="sub-title"> {{ item.groupName }}</span>
|
|
64
|
+
<span
|
|
65
|
+
v-if="index === 0"
|
|
66
|
+
@click.prevent="hideSubMenu"
|
|
67
|
+
class="context-menu__btn-close icon-close"
|
|
68
|
+
href="#"
|
|
69
|
+
>
|
|
70
|
+
<i class="fas fa-times-circle"></i>
|
|
71
|
+
</span>
|
|
72
|
+
</h5>
|
|
73
|
+
|
|
74
|
+
<a
|
|
75
|
+
v-else
|
|
64
76
|
href="#"
|
|
77
|
+
@click.prevent="navegateTo(item)"
|
|
78
|
+
:class="classSubMenu(item.title)"
|
|
65
79
|
>
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
></i>
|
|
83
|
-
</b-col>
|
|
84
|
-
<b-col sm="10">
|
|
85
|
-
<span class="title-sub"> {{ item.title }}</span>
|
|
86
|
-
</b-col>
|
|
87
|
-
</b-row>
|
|
88
|
-
</a>
|
|
89
|
-
</li>
|
|
90
|
-
</ul>
|
|
80
|
+
<b-row>
|
|
81
|
+
<b-col sm="1">
|
|
82
|
+
<i
|
|
83
|
+
class="menu-icon"
|
|
84
|
+
:style="'color:' + item.iconColor"
|
|
85
|
+
:class="item.icon"
|
|
86
|
+
></i>
|
|
87
|
+
</b-col>
|
|
88
|
+
<b-col sm="10">
|
|
89
|
+
<span class="title-sub"> {{ item.title }}</span>
|
|
90
|
+
</b-col>
|
|
91
|
+
</b-row>
|
|
92
|
+
</a>
|
|
93
|
+
</li>
|
|
94
|
+
</ul>
|
|
95
|
+
</div>
|
|
91
96
|
</div>
|
|
92
97
|
</transition>
|
|
93
98
|
</div>
|
|
@@ -191,7 +196,7 @@ export default {
|
|
|
191
196
|
height: 40px;
|
|
192
197
|
width: 40px;
|
|
193
198
|
margin-top: 10px;
|
|
194
|
-
margin-bottom:
|
|
199
|
+
margin-bottom: 10px;
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
.icon-close {
|
|
@@ -215,12 +220,13 @@ export default {
|
|
|
215
220
|
}
|
|
216
221
|
|
|
217
222
|
.box-icon {
|
|
218
|
-
width:
|
|
223
|
+
width: 60px;
|
|
219
224
|
border-radius: 18px;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
.div-title {
|
|
223
|
-
margin-top: -
|
|
228
|
+
margin-top: -10px;
|
|
229
|
+
font-size: 12px;
|
|
224
230
|
}
|
|
225
231
|
|
|
226
232
|
.title-sub {
|
|
@@ -228,6 +234,10 @@ export default {
|
|
|
228
234
|
font-weight: 400;
|
|
229
235
|
}
|
|
230
236
|
|
|
237
|
+
.margin-hidden {
|
|
238
|
+
margin-bottom: 5px;
|
|
239
|
+
}
|
|
240
|
+
|
|
231
241
|
.sub-title {
|
|
232
242
|
font-size: 16px;
|
|
233
243
|
font-weight: normal;
|
|
@@ -66,7 +66,11 @@
|
|
|
66
66
|
v-if="obj.type === 'button'"
|
|
67
67
|
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
|
|
68
68
|
>
|
|
69
|
-
<TableButton
|
|
69
|
+
<TableButton
|
|
70
|
+
v-if="obj.ifFieldEqual == row[obj.field]"
|
|
71
|
+
:obj="obj"
|
|
72
|
+
:row="row"
|
|
73
|
+
/>
|
|
70
74
|
</div>
|
|
71
75
|
<div
|
|
72
76
|
v-if="obj.type === 'link'"
|
|
@@ -116,6 +120,12 @@ export default {
|
|
|
116
120
|
return classCssBody;
|
|
117
121
|
}
|
|
118
122
|
},
|
|
123
|
+
isVisible(conditionVisibility, row) {
|
|
124
|
+
// se for undefined, quer dizer que não tem condicional, então pode mostrar
|
|
125
|
+
// if (conditionVisibility == undefined) return true;
|
|
126
|
+
|
|
127
|
+
return eval(conditionVisibility);
|
|
128
|
+
},
|
|
119
129
|
navegateTo(obj, row) {
|
|
120
130
|
if (obj.routeName) {
|
|
121
131
|
this.$router.push({
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
:title="person.typePerson == 2 ? 'CNPJ' : 'CPF'"
|
|
22
22
|
field="document"
|
|
23
23
|
:formName="formName"
|
|
24
|
-
:mask="
|
|
24
|
+
:mask="
|
|
25
|
+
person.typePerson == 2 ? ['##.###.###/####-##'] : ['###.###.###-##']
|
|
26
|
+
"
|
|
25
27
|
:maxLength="30"
|
|
26
28
|
:required="required"
|
|
27
29
|
v-model="person.document"
|
|
@@ -222,6 +222,11 @@ export default {
|
|
|
222
222
|
addSelected: (state, selected) => {
|
|
223
223
|
state.selected = selected;
|
|
224
224
|
},
|
|
225
|
+
cleanSelected: (state) => {
|
|
226
|
+
setTimeout(function () {
|
|
227
|
+
state.selected = [];
|
|
228
|
+
}, 100);
|
|
229
|
+
},
|
|
225
230
|
addToast: (state, action) => {
|
|
226
231
|
state.toast.dateTime = new Date();
|
|
227
232
|
state.toast.type = action;
|
|
@@ -236,6 +241,7 @@ export default {
|
|
|
236
241
|
state.methodExecutedApi = "";
|
|
237
242
|
}, 100);
|
|
238
243
|
},
|
|
244
|
+
|
|
239
245
|
addLoading: (state, key) => {
|
|
240
246
|
state.loading.push(key);
|
|
241
247
|
},
|
|
@@ -403,6 +409,41 @@ export default {
|
|
|
403
409
|
return false;
|
|
404
410
|
})
|
|
405
411
|
},
|
|
412
|
+
putAllApi: async function (context, params) {
|
|
413
|
+
|
|
414
|
+
context.commit('cleanMethodExecutedApi');
|
|
415
|
+
context.commit('listIdToString', params.selected);
|
|
416
|
+
|
|
417
|
+
let ids = context.state.ids;
|
|
418
|
+
|
|
419
|
+
return axios.put(params.url, { ids: ids }, {
|
|
420
|
+
headers: new Token().tokenHeaders(),
|
|
421
|
+
})
|
|
422
|
+
.then((response) => {
|
|
423
|
+
if (response.data.success) {
|
|
424
|
+
context.commit('addMethodExecutedApi', 'putApi');
|
|
425
|
+
context.commit('addToast', 'putAllApi');
|
|
426
|
+
context.commit('removeNotificarions');
|
|
427
|
+
context.commit('cleanSelected', 'putApi');
|
|
428
|
+
|
|
429
|
+
return response.data;
|
|
430
|
+
} else {
|
|
431
|
+
context.commit('addNotifications', response.data.notifications)
|
|
432
|
+
context.commit('addMethodExecutedApi', 'putApiErro');
|
|
433
|
+
context.commit('addToast', 'putApiErro');
|
|
434
|
+
return response.data;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
}, (err) => {
|
|
438
|
+
if (err.response)
|
|
439
|
+
if (err.response.status === 403)
|
|
440
|
+
context.commit('addNotifications', [{ message: "Usuário sem permissão para executar esta ação!" }])
|
|
441
|
+
|
|
442
|
+
if (!err.response)
|
|
443
|
+
context.commit('addNotificationErrorApi');
|
|
444
|
+
return false;
|
|
445
|
+
})
|
|
446
|
+
},
|
|
406
447
|
deleteAllApi: async function (context, params) {
|
|
407
448
|
|
|
408
449
|
context.commit('cleanMethodExecutedApi');
|