@nixweb/nixloc-ui 0.0.200 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.200",
3
+ "version": "0.0.201",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -97,7 +97,7 @@ export default {
97
97
  this.$emit("input", value);
98
98
  let obj = { fieldTarget: this.fieldTarget, value: value.id };
99
99
  if (!this.onlyQuery) this.addFilter(obj);
100
- if (this.fieldTarget) {
100
+ if (this.fieldTarget && this.fieldTarget != "totalPerPage") {
101
101
  let obj = { tag: `${this.title}: ${value.content}`, fieldTarget: this.fieldTarget, value: value.id };
102
102
  this.addFilter(obj);
103
103
  }
@@ -132,7 +132,6 @@ export default {
132
132
  watch: {
133
133
  event: {
134
134
  handler(event) {
135
-
136
135
  if (event.name == "tagRemoved") {
137
136
  if (this.fieldTarget == event.data) this.cleanSelectStatic();
138
137
  }
@@ -216,6 +216,8 @@ export default {
216
216
  .div-title {
217
217
  margin-top: -10px;
218
218
  font-size: 12.5px;
219
+ font-weight: 300;
220
+ color: black;
219
221
  }
220
222
 
221
223
  .title-sub {
@@ -89,13 +89,13 @@ export default {
89
89
  <style>
90
90
  .arrow-left {
91
91
  position: absolute;
92
- margin-top: 28px;
92
+ margin-top: 40px;
93
93
  left: 50%;
94
94
  }
95
95
 
96
96
  .arrow-right {
97
97
  position: absolute;
98
- margin-top: 28px;
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
- v-model="pagination(_key).currentPage"
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
- <i class="fa-regular fa-chevron-right"></i>
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
- width: 37px !important;
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.baseParams.totalPerPage,
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>&nbsp!important;</p>", "<p>&nbsp</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
  },