@nixweb/nixloc-ui 0.0.199 → 0.0.201
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/Select.vue +1 -0
- package/src/component/forms/SelectStatic.vue +9 -2
- package/src/component/layout/Menu.vue +2 -0
- package/src/component/layout/Tab.vue +2 -2
- package/src/component/shared/HorizontalFilter.vue +18 -1
- package/src/component/shared/Pagination.vue +6 -11
- package/src/component/template/ListViewWithDataHandler.vue +3 -2
- package/src/store/modules/generic.js +9 -0
package/package.json
CHANGED
|
@@ -28,6 +28,7 @@ export default {
|
|
|
28
28
|
title: String,
|
|
29
29
|
formName: String,
|
|
30
30
|
field: String,
|
|
31
|
+
initialFieldTarget: Object,
|
|
31
32
|
fieldTarget: String,
|
|
32
33
|
required: Boolean,
|
|
33
34
|
initialValue: Object,
|
|
@@ -72,6 +73,13 @@ export default {
|
|
|
72
73
|
if (el) {
|
|
73
74
|
el.tabIndex = 0;
|
|
74
75
|
}
|
|
76
|
+
|
|
77
|
+
if (this.initialFieldTarget.id) {
|
|
78
|
+
let value = this.initialFieldTarget.id;
|
|
79
|
+
let obj = { tag: `${this.title}: ${value}`, fieldTarget: this.fieldTarget, value: value };
|
|
80
|
+
this.addFilter(obj);
|
|
81
|
+
}
|
|
82
|
+
|
|
75
83
|
},
|
|
76
84
|
computed: {
|
|
77
85
|
...mapGetters("generic", ["event"]),
|
|
@@ -89,7 +97,7 @@ export default {
|
|
|
89
97
|
this.$emit("input", value);
|
|
90
98
|
let obj = { fieldTarget: this.fieldTarget, value: value.id };
|
|
91
99
|
if (!this.onlyQuery) this.addFilter(obj);
|
|
92
|
-
if (this.fieldTarget) {
|
|
100
|
+
if (this.fieldTarget && this.fieldTarget != "totalPerPage") {
|
|
93
101
|
let obj = { tag: `${this.title}: ${value.content}`, fieldTarget: this.fieldTarget, value: value.id };
|
|
94
102
|
this.addFilter(obj);
|
|
95
103
|
}
|
|
@@ -124,7 +132,6 @@ export default {
|
|
|
124
132
|
watch: {
|
|
125
133
|
event: {
|
|
126
134
|
handler(event) {
|
|
127
|
-
|
|
128
135
|
if (event.name == "tagRemoved") {
|
|
129
136
|
if (this.fieldTarget == event.data) this.cleanSelectStatic();
|
|
130
137
|
}
|
|
@@ -89,13 +89,13 @@ export default {
|
|
|
89
89
|
<style>
|
|
90
90
|
.arrow-left {
|
|
91
91
|
position: absolute;
|
|
92
|
-
margin-top:
|
|
92
|
+
margin-top: 40px;
|
|
93
93
|
left: 50%;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.arrow-right {
|
|
97
97
|
position: absolute;
|
|
98
|
-
margin-top:
|
|
98
|
+
margin-top: 40px;
|
|
99
99
|
left: 53%;
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{ content: '30', id: 30 },
|
|
20
20
|
{ content: '50', id: 50 },
|
|
21
21
|
{ content: '100', id: 100 },
|
|
22
|
-
]" />
|
|
22
|
+
]" v-model="totalPerPage" />
|
|
23
23
|
</b-col>
|
|
24
24
|
</b-row>
|
|
25
25
|
</Collapse>
|
|
@@ -31,6 +31,8 @@ import Collapse from "./Collapse.vue";
|
|
|
31
31
|
import SelectStatic from "../forms/SelectStatic.vue";
|
|
32
32
|
import Select from "../forms/Select";
|
|
33
33
|
|
|
34
|
+
import { mapMutations } from "vuex";
|
|
35
|
+
|
|
34
36
|
export default {
|
|
35
37
|
name: "ListViewWithHandlerData",
|
|
36
38
|
components: { Select, SelectStatic, Collapse },
|
|
@@ -40,6 +42,21 @@ export default {
|
|
|
40
42
|
default: true,
|
|
41
43
|
},
|
|
42
44
|
},
|
|
45
|
+
computed: {
|
|
46
|
+
totalPerPage: {
|
|
47
|
+
get() {
|
|
48
|
+
return this.$store.state.generic.totalPerPage;
|
|
49
|
+
},
|
|
50
|
+
set(value) {
|
|
51
|
+
this.updateTotalPerPage(value);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
...mapMutations("generic", [
|
|
57
|
+
"updateTotalPerPage",
|
|
58
|
+
]),
|
|
59
|
+
}
|
|
43
60
|
};
|
|
44
61
|
</script>
|
|
45
62
|
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<b-pagination
|
|
4
|
-
|
|
5
|
-
align="right"
|
|
6
|
-
:hide-goto-end-buttons="true"
|
|
7
|
-
:per-page="pagination(_key).totalPerPage"
|
|
8
|
-
:total-rows="totalRecords"
|
|
9
|
-
>
|
|
3
|
+
<b-pagination v-model="pagination(_key).currentPage" align="right" :hide-goto-end-buttons="true"
|
|
4
|
+
:per-page="totalPerPage.id" :total-rows="totalRecords">
|
|
10
5
|
<template #first-text>
|
|
11
6
|
<i class="fa-regular fa-chevron-left"></i>
|
|
12
7
|
</template>
|
|
@@ -14,7 +9,7 @@
|
|
|
14
9
|
<i class="fa-regular fa-chevron-left"></i>
|
|
15
10
|
</template>
|
|
16
11
|
<template #next-text>
|
|
17
|
-
|
|
12
|
+
<i class="fa-regular fa-chevron-right"></i>
|
|
18
13
|
</template>
|
|
19
14
|
<template #last-text>
|
|
20
15
|
<i class="fa-regular fa-chevron-right"></i>
|
|
@@ -24,7 +19,7 @@
|
|
|
24
19
|
</template>
|
|
25
20
|
|
|
26
21
|
<script>
|
|
27
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
22
|
+
import { mapGetters, mapMutations, mapState } from "vuex";
|
|
28
23
|
|
|
29
24
|
export default {
|
|
30
25
|
name: "Pagination",
|
|
@@ -41,6 +36,7 @@ export default {
|
|
|
41
36
|
},
|
|
42
37
|
computed: {
|
|
43
38
|
...mapGetters("generic", ["pagination"]),
|
|
39
|
+
...mapState("generic", ["totalPerPage"]),
|
|
44
40
|
},
|
|
45
41
|
methods: {
|
|
46
42
|
...mapMutations("generic", ["addPagination"]),
|
|
@@ -69,8 +65,7 @@ export default {
|
|
|
69
65
|
color: #6c757d !important;
|
|
70
66
|
border: 0px solid #dee2e6 !important;
|
|
71
67
|
border-radius: 50px !important;
|
|
72
|
-
|
|
68
|
+
width: 37px !important;
|
|
73
69
|
height: 37px !important;
|
|
74
70
|
}
|
|
75
|
-
|
|
76
71
|
</style>
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
mounted() {
|
|
122
122
|
this.updatePagination({
|
|
123
123
|
key: "templateList",
|
|
124
|
-
totalPerPage: this.
|
|
124
|
+
totalPerPage: this.totalPerPage.id,
|
|
125
125
|
});
|
|
126
126
|
},
|
|
127
127
|
beforeDestroy() {
|
|
@@ -161,6 +161,8 @@ export default {
|
|
|
161
161
|
"hideModal"
|
|
162
162
|
]),
|
|
163
163
|
getAll() {
|
|
164
|
+
this.baseParams.totalPerPage = this.totalPerPage.id
|
|
165
|
+
|
|
164
166
|
let obj = {
|
|
165
167
|
...this.baseParams,
|
|
166
168
|
...this.dynamicFilter,
|
|
@@ -189,7 +191,6 @@ export default {
|
|
|
189
191
|
}
|
|
190
192
|
},
|
|
191
193
|
selectFilter(value) {
|
|
192
|
-
|
|
193
194
|
let fieldTarget = value.fieldTarget;
|
|
194
195
|
let obj = { tag: value.tag, key: fieldTarget, value: value.value };
|
|
195
196
|
|
|
@@ -19,6 +19,7 @@ export default {
|
|
|
19
19
|
},
|
|
20
20
|
notifications: [],
|
|
21
21
|
pagination: [],
|
|
22
|
+
totalPerPage: { "content": "10", "id": 10 },
|
|
22
23
|
selected: [],
|
|
23
24
|
loading: [],
|
|
24
25
|
event: {
|
|
@@ -112,6 +113,7 @@ export default {
|
|
|
112
113
|
let isMoviment = th.innerText.includes("t.produtoMovimentacao");
|
|
113
114
|
let isCustumerAddress = th.innerText.includes("t.enderecoCliente");
|
|
114
115
|
let isAddressRent = th.innerText.includes("t.saidaRetornoLocacao");
|
|
116
|
+
let isTeamRent = th.innerText.includes("t.equipeLocacao");
|
|
115
117
|
|
|
116
118
|
|
|
117
119
|
if (isProduct) {
|
|
@@ -126,6 +128,9 @@ export default {
|
|
|
126
128
|
} else if (isPayment) {
|
|
127
129
|
obj.vForSimple = "v-for='pagamento in d.pagamentoLocacao'";
|
|
128
130
|
config.push(obj);
|
|
131
|
+
} else if (isTeamRent) {
|
|
132
|
+
obj.vForSimple = "v-for='equipe in d.equipeLocacao'";
|
|
133
|
+
config.push(obj);
|
|
129
134
|
} else if (isGrouped) {
|
|
130
135
|
obj.vForGrouped = "v-for='(itensLocacao, grupo) in produtoAgrupado'";
|
|
131
136
|
obj.vForSimple = "v-for='produto in itensLocacao'";
|
|
@@ -181,6 +186,7 @@ export default {
|
|
|
181
186
|
.replaceAll("t.produtoMovimentacao", "")
|
|
182
187
|
.replaceAll("t.enderecoCliente", "")
|
|
183
188
|
.replaceAll("t.saidaRetornoLocacao", "")
|
|
189
|
+
.replaceAll("t.equipeLocacao", "")
|
|
184
190
|
.replaceAll("<p> !important;</p>", "<p> </p>");
|
|
185
191
|
}
|
|
186
192
|
|
|
@@ -237,6 +243,9 @@ export default {
|
|
|
237
243
|
clearedSearch: (state) => {
|
|
238
244
|
state.clearedSearch = state.clearedSearch = !state.clearedSearch
|
|
239
245
|
},
|
|
246
|
+
updateTotalPerPage: (state, value) => {
|
|
247
|
+
state.totalPerPage = value;
|
|
248
|
+
},
|
|
240
249
|
addSelected: (state, selected) => {
|
|
241
250
|
state.selected = selected;
|
|
242
251
|
},
|