@freteclick/quasar-financial-ui 1.0.85 → 1.0.87

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.
Files changed (51) hide show
  1. package/package.json +17 -17
  2. package/src/components/common/Filters.vue +140 -140
  3. package/src/components/expense/FormExpense.vue +309 -309
  4. package/src/components/expense/TableExpenses.vue +305 -305
  5. package/src/components/invoice/client/ClientInvoiceDetails.vue +212 -212
  6. package/src/components/invoice/client/InvoiceSearching.vue +382 -382
  7. package/src/components/invoice/client/details/InvoiceInvoice.vue +248 -248
  8. package/src/components/invoice/client/details/InvoiceOrders.vue +327 -327
  9. package/src/components/invoice/expense/CreateExpense.vue +539 -539
  10. package/src/components/invoice/expense/DetailExpense.vue +393 -393
  11. package/src/components/invoice/pay/InvoiceDetails.vue +210 -210
  12. package/src/components/invoice/pay/InvoiceSearching.vue +388 -388
  13. package/src/components/invoice/pay/details/InvoiceInvoice.vue +47 -47
  14. package/src/components/invoice/pay/details/InvoiceOrders.vue +342 -342
  15. package/src/components/invoice/receive/InvoiceDetails.vue +280 -280
  16. package/src/components/invoice/receive/InvoiceSearching.vue +359 -359
  17. package/src/components/invoice/receive/details/InvoiceInvoice.vue +453 -371
  18. package/src/components/invoice/receive/details/InvoiceInvoiceBkp.vue +259 -259
  19. package/src/components/invoice/receive/details/InvoiceOrders.vue +369 -369
  20. package/src/i18n/en-us/index.js +8 -8
  21. package/src/i18n/index.js +5 -5
  22. package/src/i18n/pt-br/index.js +30 -30
  23. package/src/pages/Invoice/Client/Details.vue +23 -23
  24. package/src/pages/Invoice/Client/Index.vue +26 -26
  25. package/src/pages/Invoice/Pay/Details.vue +23 -23
  26. package/src/pages/Invoice/Pay/Index.vue +53 -53
  27. package/src/pages/Invoice/Receive/Details.vue +23 -23
  28. package/src/pages/Invoice/Receive/Index.vue +26 -26
  29. package/src/router/routes.js +32 -32
  30. package/src/store/modules/invoice/comission/actions.js +66 -66
  31. package/src/store/modules/invoice/comission/getters.js +6 -6
  32. package/src/store/modules/invoice/comission/index.js +19 -19
  33. package/src/store/modules/invoice/comission/mutation_types.js +7 -7
  34. package/src/store/modules/invoice/comission/mutations.js +42 -42
  35. package/src/store/modules/invoice/expense/actions.js +98 -98
  36. package/src/store/modules/invoice/expense/getters.js +1 -1
  37. package/src/store/modules/invoice/expense/index.js +12 -12
  38. package/src/store/modules/invoice/expense/mutations.js +3 -3
  39. package/src/store/modules/invoice/expense/state.js +5 -5
  40. package/src/store/modules/invoice/pay/actions.js +114 -114
  41. package/src/store/modules/invoice/pay/getters.js +6 -6
  42. package/src/store/modules/invoice/pay/index.js +19 -19
  43. package/src/store/modules/invoice/pay/mutation_types.js +7 -7
  44. package/src/store/modules/invoice/pay/mutations.js +42 -42
  45. package/src/store/modules/invoice/receive/actions.js +163 -152
  46. package/src/store/modules/invoice/receive/actionsBkp.js +77 -77
  47. package/src/store/modules/invoice/receive/getters.js +6 -6
  48. package/src/store/modules/invoice/receive/index.js +19 -19
  49. package/src/store/modules/invoice/receive/mutation_types.js +7 -7
  50. package/src/store/modules/invoice/receive/mutations.js +42 -42
  51. package/src/store/store-flag.d.ts +9 -9
@@ -1,370 +1,370 @@
1
- <template>
2
- <q-table
3
- :loading="isLoading"
4
- :data="data"
5
- :columns="settings.columns"
6
- :pagination.sync="pagination"
7
- @request="onRequest"
8
- row-key="@id"
9
- :visible-columns="settings.visibleColumns"
10
- style="min-height: 90vh"
11
- >
12
- <template v-slot:body="props">
13
- <q-tr :props="props">
14
- <q-td key="id" :props="props">
15
- <q-btn
16
- outline
17
- dense
18
- :to="{ name: 'OrderDetails', params: { id: props.row.id } }"
19
- :label="`#${props.row.id}`"
20
- :style="{ color: props.row.color_status }"
21
- class="full-width"
22
- />
23
- </q-td>
24
- <q-td key="notaFiscal" :props="props">{{ props.row.notaFiscal }}</q-td>
25
- <q-td key="dataPedido" :props="props">{{ props.cols[2].value }}</q-td>
26
- <q-td key="ultimaModificacao" :props="props">{{
27
- props.cols[3].value
28
- }}</q-td>
29
- <q-td
30
- key="status"
31
- :props="props"
32
- :style="{ color: props.row.color_status }"
33
- >
34
- {{ $t(`order.statuses.${props.row.status}`) }}
35
- </q-td>
36
- <q-td key="coleta" :props="props">
37
- {{ props.row.localColeta }}<br />{{ props.row.coleta }}
38
- </q-td>
39
- <q-td key="entrega" :props="props">
40
- {{ props.row.localEntrega }}<br />{{ props.row.entrega }}
41
- </q-td>
42
- <q-td key="transportadora" :props="props">
43
- {{ props.row.transportadora }}
44
- </q-td>
45
- <q-td key="preco" :props="props">{{ props.cols[8].value }}</q-td>
46
- <q-td key="precoReal" :props="props">{{ props.cols[9].value }}</q-td>
47
- <q-td
48
- auto-width
49
- v-if="invoice.status === 'pending' || invoice.billet === false"
50
- key="removeAction"
51
- >
52
- <q-btn
53
- flat
54
- round
55
- dense
56
- color="red"
57
- icon="delete"
58
- @click="removeItem(props.row)"
59
- :loading="props.row._bussy"
60
- />
61
- </q-td>
62
- </q-tr>
63
- </template>
64
- </q-table>
65
- </template>
66
-
67
- <script>
68
- import { mapActions, mapGetters } from "vuex";
69
- import { date } from "quasar";
70
- import { formatMoney } from "@freteclick/quasar-common-ui/src/utils/formatter";
71
-
72
- const SETTINGS = {
73
- visibleColumns: [
74
- "id",
75
- "notaFiscal",
76
- "dataPedido",
77
- "ultimaModificacao",
78
- "status",
79
- "coleta",
80
- "entrega",
81
- "transportadora",
82
- "preco",
83
- "precoReal",
84
- "removeAction",
85
- ],
86
- columns: [
87
- {
88
- name: "id",
89
- field: "id",
90
- align: "left",
91
- label: "ID",
92
- },
93
- {
94
- name: "notaFiscal",
95
- field: "notaFiscal",
96
- align: "left",
97
- label: "Nota Fiscal",
98
- format: (val, row) => {
99
- return val ? "#" + val : "";
100
- },
101
- },
102
- {
103
- name: "dataPedido",
104
- field: "dataPedido",
105
- align: "left",
106
- format: (val, row) => {
107
- return val.replace(
108
- /^(\d{4})\-(\d{2})\-(\d{2})T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2}$/g,
109
- "$3/$2/$1"
110
- );
111
- },
112
- label: "Data do pedido",
113
- },
114
- {
115
- name: "ultimaModificacao",
116
- field: "ultimaModificacao",
117
- align: "left",
118
- format: (val, row) => {
119
- return date.formatDate(val, "DD/MM/YYYY HH:mm:ss");
120
- },
121
- label: "Ultima alteração",
122
- },
123
- {
124
- name: "status",
125
- field: "status",
126
- align: "left",
127
- label: "Status",
128
- },
129
- {
130
- name: "coleta",
131
- field: "coleta",
132
- align: "left",
133
- label: "Coleta",
134
- },
135
- {
136
- name: "localColeta",
137
- field: "localColeta",
138
- align: "left",
139
- label: "Local de coleta",
140
- },
141
- {
142
- name: "entrega",
143
- field: "entrega",
144
- align: "left",
145
- label: "Entrega",
146
- },
147
- {
148
- name: "localEntrega",
149
- field: "localEntrega",
150
- align: "left",
151
- label: "Local de entrega",
152
- },
153
- {
154
- name: "transportadora",
155
- field: "transportadora",
156
- align: "left",
157
- label: "Transportadora",
158
- },
159
- {
160
- name: "preco",
161
- field: "preco",
162
- align: "left",
163
- format: (val, row) => {
164
- return formatMoney(val, "BRL", "pt-br");
165
- },
166
- label: "Preço",
167
- },
168
- {
169
- name: "precoReal",
170
- field: "precoReal",
171
- align: "left",
172
- format: (val, row) => {
173
- if (isNaN(val)) {
174
- return val;
175
- } else {
176
- return formatMoney(val, "BRL", "pt-br");
177
- }
178
- },
179
- label: "Preço Real",
180
- },
181
- { name: "removeAction" },
182
- ],
183
- };
184
-
185
- Object.freeze(SETTINGS);
186
-
187
- export default {
188
- props: {
189
- invoiceId: {
190
- type: String,
191
- required: false,
192
- default: null,
193
- },
194
- invoice: {
195
- type: Object,
196
- required: true,
197
- },
198
- },
199
-
200
- created() {
201
- if (this.myCompany !== null) {
202
- this.filters.company = this.myCompany;
203
- this.onRequest({
204
- pagination: this.pagination,
205
- filter: this.filters,
206
- });
207
- }
208
- },
209
-
210
- beforeDestroy() {
211
- this.reset();
212
- },
213
-
214
- data() {
215
- return {
216
- settings: SETTINGS,
217
- data: [],
218
- filters: {
219
- company: null,
220
- },
221
- pagination: {
222
- sortBy: "ultimaModificacao",
223
- descending: false,
224
- page: 1,
225
- rowsPerPage: 10,
226
- rowsNumber: 10,
227
- },
228
- };
229
- },
230
-
231
- computed: {
232
- ...mapGetters({
233
- isLoading: "salesOrder/isLoading",
234
- error: "salesOrder/error",
235
- violations: "salesOrder/violations",
236
- items: "salesOrder/items",
237
- totalItems: "salesOrder/totalItems",
238
- myCompany: "people/currentCompany",
239
- }),
240
- },
241
-
242
- watch: {
243
- myCompany(company) {
244
- if (company !== null) {
245
- this.filters.company = company;
246
- this.onRequest({
247
- pagination: this.pagination,
248
- filter: this.filters,
249
- });
250
- }
251
- },
252
-
253
- totalItems(val) {
254
- this.pagination.rowsNumber = val;
255
- },
256
-
257
- items(items) {
258
- if (!items) return;
259
-
260
- let data = [];
261
-
262
- for (let index in items) {
263
- let item = items[index];
264
-
265
- data.push({
266
- "@id": item["@id"],
267
- id: item["@id"].match(/^\/sales\/orders\/([a-z0-9-]*)$/)[1],
268
- notaFiscal:
269
- item.invoiceTax.length > 0
270
- ? "#" + item.invoiceTax[0].invoiceTax.invoiceNumber
271
- : "",
272
- dataPedido: item.orderDate,
273
- ultimaModificacao: item.alterDate,
274
- status: item.status.status,
275
- color_status: item.status.color,
276
- fornecedor: item.client.alias,
277
- coleta: item.retrievePeople !== null ? item.retrievePeople.name : "",
278
- localColeta:
279
- item.quote !== null
280
- ? `${item.quote.cityOrigin.city} / ${item.quote.cityOrigin.state.uf}`
281
- : "",
282
- entrega: item.deliveryPeople !== null ? item.deliveryPeople.name : "",
283
- localEntrega:
284
- item.quote !== null
285
- ? `${item.quote.cityDestination.city} / ${item.quote.cityDestination.state.uf}`
286
- : "",
287
- transportadora: item.quote !== null ? item.quote.carrier.name : "",
288
- preco: item.price,
289
- precoReal: this.getRealPrice(item),
290
- _bussy: false,
291
- });
292
- }
293
-
294
- this.data = data;
295
- },
296
- },
297
-
298
- methods: {
299
- ...mapActions({
300
- getItems: "salesOrder/getItems",
301
- reset: "salesOrder/reset",
302
- removeOrder: "receiveInvoice/deleteInvoiceOrder",
303
- }),
304
- getRealPrice(invoice) {
305
- let price = 0;
306
- invoice.invoice.forEach((element) => {
307
- if (element.invoice.id == this.invoiceId) {
308
- price = element.realPrice;
309
- }
310
- });
311
- return price == invoice.price || price == 0 ? "-----" : price;
312
- },
313
- removeItem(item) {
314
- if (window.confirm("Tem certeza que deseja eliminar este registro?")) {
315
- item._bussy = true;
316
-
317
- this.removeOrder({
318
- invoiceId: this.invoice["@id"],
319
- orderId: item.id,
320
- params: {
321
- myCompany: this.myCompany.id,
322
- },
323
- })
324
- .then((result) => {
325
- this.onRequest({
326
- pagination: this.pagination,
327
- filter: this.filters,
328
- });
329
- })
330
- .catch((error) => {
331
- this.$q.notify({
332
- message: error.message,
333
- position: "bottom",
334
- type: "negative",
335
- });
336
- })
337
- .finally(() => {
338
- item._bussy = false;
339
- });
340
- }
341
- },
342
-
343
- onRequest(props) {
344
- if (this.isLoading) return;
345
-
346
- let { page, rowsPerPage, rowsNumber, sortBy, descending } =
347
- props.pagination;
348
- let filter = props.filter;
349
- let params = { itemsPerPage: rowsPerPage, page };
350
-
351
- if (this.filters.company != null) {
352
- params["myCompany"] = this.filters.company.id;
353
- }
354
-
355
- if (this.invoiceId !== null) {
356
- params["invoice.invoice"] = this.invoiceId;
357
- }
358
-
359
- params["order[alterDate]"] = "desc";
360
-
361
- this.getItems(params).then(() => {
362
- this.pagination.page = page;
363
- this.pagination.rowsPerPage = rowsPerPage;
364
- this.pagination.sortBy = sortBy;
365
- this.pagination.descending = descending;
366
- });
367
- },
368
- },
369
- };
1
+ <template>
2
+ <q-table
3
+ :loading="isLoading"
4
+ :data="data"
5
+ :columns="settings.columns"
6
+ :pagination.sync="pagination"
7
+ @request="onRequest"
8
+ row-key="@id"
9
+ :visible-columns="settings.visibleColumns"
10
+ style="min-height: 90vh"
11
+ >
12
+ <template v-slot:body="props">
13
+ <q-tr :props="props">
14
+ <q-td key="id" :props="props">
15
+ <q-btn
16
+ outline
17
+ dense
18
+ :to="{ name: 'OrderDetails', params: { id: props.row.id } }"
19
+ :label="`#${props.row.id}`"
20
+ :style="{ color: props.row.color_status }"
21
+ class="full-width"
22
+ />
23
+ </q-td>
24
+ <q-td key="notaFiscal" :props="props">{{ props.row.notaFiscal }}</q-td>
25
+ <q-td key="dataPedido" :props="props">{{ props.cols[2].value }}</q-td>
26
+ <q-td key="ultimaModificacao" :props="props">{{
27
+ props.cols[3].value
28
+ }}</q-td>
29
+ <q-td
30
+ key="status"
31
+ :props="props"
32
+ :style="{ color: props.row.color_status }"
33
+ >
34
+ {{ $t(`order.statuses.${props.row.status}`) }}
35
+ </q-td>
36
+ <q-td key="coleta" :props="props">
37
+ {{ props.row.localColeta }}<br />{{ props.row.coleta }}
38
+ </q-td>
39
+ <q-td key="entrega" :props="props">
40
+ {{ props.row.localEntrega }}<br />{{ props.row.entrega }}
41
+ </q-td>
42
+ <q-td key="transportadora" :props="props">
43
+ {{ props.row.transportadora }}
44
+ </q-td>
45
+ <q-td key="preco" :props="props">{{ props.cols[8].value }}</q-td>
46
+ <q-td key="precoReal" :props="props">{{ props.cols[9].value }}</q-td>
47
+ <q-td
48
+ auto-width
49
+ v-if="invoice.status === 'pending' || invoice.billet === false"
50
+ key="removeAction"
51
+ >
52
+ <q-btn
53
+ flat
54
+ round
55
+ dense
56
+ color="red"
57
+ icon="delete"
58
+ @click="removeItem(props.row)"
59
+ :loading="props.row._bussy"
60
+ />
61
+ </q-td>
62
+ </q-tr>
63
+ </template>
64
+ </q-table>
65
+ </template>
66
+
67
+ <script>
68
+ import { mapActions, mapGetters } from "vuex";
69
+ import { date } from "quasar";
70
+ import { formatMoney } from "@freteclick/quasar-common-ui/src/utils/formatter";
71
+
72
+ const SETTINGS = {
73
+ visibleColumns: [
74
+ "id",
75
+ "notaFiscal",
76
+ "dataPedido",
77
+ "ultimaModificacao",
78
+ "status",
79
+ "coleta",
80
+ "entrega",
81
+ "transportadora",
82
+ "preco",
83
+ "precoReal",
84
+ "removeAction",
85
+ ],
86
+ columns: [
87
+ {
88
+ name: "id",
89
+ field: "id",
90
+ align: "left",
91
+ label: "ID",
92
+ },
93
+ {
94
+ name: "notaFiscal",
95
+ field: "notaFiscal",
96
+ align: "left",
97
+ label: "Nota Fiscal",
98
+ format: (val, row) => {
99
+ return val ? "#" + val : "";
100
+ },
101
+ },
102
+ {
103
+ name: "dataPedido",
104
+ field: "dataPedido",
105
+ align: "left",
106
+ format: (val, row) => {
107
+ return val.replace(
108
+ /^(\d{4})\-(\d{2})\-(\d{2})T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2}$/g,
109
+ "$3/$2/$1"
110
+ );
111
+ },
112
+ label: "Data do pedido",
113
+ },
114
+ {
115
+ name: "ultimaModificacao",
116
+ field: "ultimaModificacao",
117
+ align: "left",
118
+ format: (val, row) => {
119
+ return date.formatDate(val, "DD/MM/YYYY HH:mm:ss");
120
+ },
121
+ label: "Ultima alteração",
122
+ },
123
+ {
124
+ name: "status",
125
+ field: "status",
126
+ align: "left",
127
+ label: "Status",
128
+ },
129
+ {
130
+ name: "coleta",
131
+ field: "coleta",
132
+ align: "left",
133
+ label: "Coleta",
134
+ },
135
+ {
136
+ name: "localColeta",
137
+ field: "localColeta",
138
+ align: "left",
139
+ label: "Local de coleta",
140
+ },
141
+ {
142
+ name: "entrega",
143
+ field: "entrega",
144
+ align: "left",
145
+ label: "Entrega",
146
+ },
147
+ {
148
+ name: "localEntrega",
149
+ field: "localEntrega",
150
+ align: "left",
151
+ label: "Local de entrega",
152
+ },
153
+ {
154
+ name: "transportadora",
155
+ field: "transportadora",
156
+ align: "left",
157
+ label: "Transportadora",
158
+ },
159
+ {
160
+ name: "preco",
161
+ field: "preco",
162
+ align: "left",
163
+ format: (val, row) => {
164
+ return formatMoney(val, "BRL", "pt-br");
165
+ },
166
+ label: "Preço",
167
+ },
168
+ {
169
+ name: "precoReal",
170
+ field: "precoReal",
171
+ align: "left",
172
+ format: (val, row) => {
173
+ if (isNaN(val)) {
174
+ return val;
175
+ } else {
176
+ return formatMoney(val, "BRL", "pt-br");
177
+ }
178
+ },
179
+ label: "Preço Real",
180
+ },
181
+ { name: "removeAction" },
182
+ ],
183
+ };
184
+
185
+ Object.freeze(SETTINGS);
186
+
187
+ export default {
188
+ props: {
189
+ invoiceId: {
190
+ type: String,
191
+ required: false,
192
+ default: null,
193
+ },
194
+ invoice: {
195
+ type: Object,
196
+ required: true,
197
+ },
198
+ },
199
+
200
+ created() {
201
+ if (this.myCompany !== null) {
202
+ this.filters.company = this.myCompany;
203
+ this.onRequest({
204
+ pagination: this.pagination,
205
+ filter: this.filters,
206
+ });
207
+ }
208
+ },
209
+
210
+ beforeDestroy() {
211
+ this.reset();
212
+ },
213
+
214
+ data() {
215
+ return {
216
+ settings: SETTINGS,
217
+ data: [],
218
+ filters: {
219
+ company: null,
220
+ },
221
+ pagination: {
222
+ sortBy: "ultimaModificacao",
223
+ descending: false,
224
+ page: 1,
225
+ rowsPerPage: 10,
226
+ rowsNumber: 10,
227
+ },
228
+ };
229
+ },
230
+
231
+ computed: {
232
+ ...mapGetters({
233
+ isLoading: "salesOrder/isLoading",
234
+ error: "salesOrder/error",
235
+ violations: "salesOrder/violations",
236
+ items: "salesOrder/items",
237
+ totalItems: "salesOrder/totalItems",
238
+ myCompany: "people/currentCompany",
239
+ }),
240
+ },
241
+
242
+ watch: {
243
+ myCompany(company) {
244
+ if (company !== null) {
245
+ this.filters.company = company;
246
+ this.onRequest({
247
+ pagination: this.pagination,
248
+ filter: this.filters,
249
+ });
250
+ }
251
+ },
252
+
253
+ totalItems(val) {
254
+ this.pagination.rowsNumber = val;
255
+ },
256
+
257
+ items(items) {
258
+ if (!items) return;
259
+
260
+ let data = [];
261
+
262
+ for (let index in items) {
263
+ let item = items[index];
264
+
265
+ data.push({
266
+ "@id": item["@id"],
267
+ id: item["@id"].match(/^\/sales\/orders\/([a-z0-9-]*)$/)[1],
268
+ notaFiscal:
269
+ item.invoiceTax.length > 0
270
+ ? "#" + item.invoiceTax[0].invoiceTax.invoiceNumber
271
+ : "",
272
+ dataPedido: item.orderDate,
273
+ ultimaModificacao: item.alterDate,
274
+ status: item.status.status,
275
+ color_status: item.status.color,
276
+ fornecedor: item.client.alias,
277
+ coleta: item.retrievePeople !== null ? item.retrievePeople.name : "",
278
+ localColeta:
279
+ item.quote !== null
280
+ ? `${item.quote.cityOrigin.city} / ${item.quote.cityOrigin.state.uf}`
281
+ : "",
282
+ entrega: item.deliveryPeople !== null ? item.deliveryPeople.name : "",
283
+ localEntrega:
284
+ item.quote !== null
285
+ ? `${item.quote.cityDestination.city} / ${item.quote.cityDestination.state.uf}`
286
+ : "",
287
+ transportadora: item.quote !== null ? item.quote.carrier.name : "",
288
+ preco: item.price,
289
+ precoReal: this.getRealPrice(item),
290
+ _bussy: false,
291
+ });
292
+ }
293
+
294
+ this.data = data;
295
+ },
296
+ },
297
+
298
+ methods: {
299
+ ...mapActions({
300
+ getItems: "salesOrder/getItems",
301
+ reset: "salesOrder/reset",
302
+ removeOrder: "receiveInvoice/deleteInvoiceOrder",
303
+ }),
304
+ getRealPrice(invoice) {
305
+ let price = 0;
306
+ invoice.invoice.forEach((element) => {
307
+ if (element.invoice.id == this.invoiceId) {
308
+ price = element.realPrice;
309
+ }
310
+ });
311
+ return price == invoice.price || price == 0 ? "-----" : price;
312
+ },
313
+ removeItem(item) {
314
+ if (window.confirm("Tem certeza que deseja eliminar este registro?")) {
315
+ item._bussy = true;
316
+
317
+ this.removeOrder({
318
+ invoiceId: this.invoice["@id"],
319
+ orderId: item.id,
320
+ params: {
321
+ myCompany: this.myCompany.id,
322
+ },
323
+ })
324
+ .then((result) => {
325
+ this.onRequest({
326
+ pagination: this.pagination,
327
+ filter: this.filters,
328
+ });
329
+ })
330
+ .catch((error) => {
331
+ this.$q.notify({
332
+ message: error.message,
333
+ position: "bottom",
334
+ type: "negative",
335
+ });
336
+ })
337
+ .finally(() => {
338
+ item._bussy = false;
339
+ });
340
+ }
341
+ },
342
+
343
+ onRequest(props) {
344
+ if (this.isLoading) return;
345
+
346
+ let { page, rowsPerPage, rowsNumber, sortBy, descending } =
347
+ props.pagination;
348
+ let filter = props.filter;
349
+ let params = { itemsPerPage: rowsPerPage, page };
350
+
351
+ if (this.filters.company != null) {
352
+ params["myCompany"] = this.filters.company.id;
353
+ }
354
+
355
+ if (this.invoiceId !== null) {
356
+ params["invoice.invoice"] = this.invoiceId;
357
+ }
358
+
359
+ params["order[alterDate]"] = "desc";
360
+
361
+ this.getItems(params).then(() => {
362
+ this.pagination.page = page;
363
+ this.pagination.rowsPerPage = rowsPerPage;
364
+ this.pagination.sortBy = sortBy;
365
+ this.pagination.descending = descending;
366
+ });
367
+ },
368
+ },
369
+ };
370
370
  </script>