From cd49ebe7a66790e039baaa4b9280d0aa3f9b6d3f Mon Sep 17 00:00:00 2001 From: jcasado Date: Wed, 3 Apr 2024 12:54:14 +0200 Subject: [PATCH 1/4] refs #6697 fix claimQuantity --- src/pages/Claim/Card/ClaimLines.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index 70c257c69..4a1d9c9d0 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -20,7 +20,7 @@ const { t } = useI18n(); const stateStore = useStateStore(); const arrayData = useArrayData('ClaimLines'); const store = arrayData.store; - +let claimedDefault = 0; const claimFilter = { fields: ['ticketFk'], }; @@ -79,6 +79,7 @@ const columns = computed(() => [ label: t('Claimed'), field: (row) => row.quantity, sortable: true, + default: 0, }, { name: 'description', From 6391ed1360aa7092e026245a7dbc03cfbc97cc06 Mon Sep 17 00:00:00 2001 From: jcasado Date: Wed, 24 Apr 2024 11:26:32 +0200 Subject: [PATCH 2/4] refs #6697 changes claim --- src/pages/Claim/Card/ClaimLines.vue | 3 --- src/pages/Claim/Card/ClaimLinesImport.vue | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index 4a1d9c9d0..6fda6c3cc 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -20,7 +20,6 @@ const { t } = useI18n(); const stateStore = useStateStore(); const arrayData = useArrayData('ClaimLines'); const store = arrayData.store; -let claimedDefault = 0; const claimFilter = { fields: ['ticketFk'], }; @@ -79,7 +78,6 @@ const columns = computed(() => [ label: t('Claimed'), field: (row) => row.quantity, sortable: true, - default: 0, }, { name: 'description', @@ -282,7 +280,6 @@ function showImportDialog() { {{ column.value }} -
-
- - +
From 7875df4b023b1a55470d31960ed69718b8cf150f Mon Sep 17 00:00:00 2001 From: jcasado Date: Thu, 25 Apr 2024 14:03:00 +0200 Subject: [PATCH 4/4] refs #6697 fix tfront --- .../pages/Claims/ClaimLinesImport.spec.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js b/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js index 085118b14..d93c96132 100644 --- a/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js +++ b/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js @@ -5,7 +5,6 @@ import ClaimLinesImport from 'pages/Claim/Card/ClaimLinesImport.vue'; describe('ClaimLinesImport', () => { let vm; - beforeAll(() => { vm = createWrapper(ClaimLinesImport, { global: { @@ -13,7 +12,7 @@ describe('ClaimLinesImport', () => { mocks: { fetch: vi.fn(), }, - } + }, }).vm; }); @@ -26,25 +25,23 @@ describe('ClaimLinesImport', () => { vi.spyOn(axios, 'post').mockResolvedValue({ data: true }); vi.spyOn(vm.quasar, 'notify'); - vm.selected = [ - { id: 1, saleFk: 1, claimFk: 1, quantity: 10 } - ] + vm.selected = [{ id: 1, saleFk: 1, claimFk: 1 }]; - vm.route.params.id = 1 + vm.route.params.id = 1; await vm.importLines(); - const expectedData = [{ saleFk: 1, claimFk: 1, quantity: 10 }] + const expectedData = [{ saleFk: 1, claimFk: 1 }]; expect(axios.post).toHaveBeenCalledWith('ClaimBeginnings', expectedData, { - signal: expect.any(Object) - }) + signal: expect.any(Object), + }); expect(vm.quasar.notify).toHaveBeenCalledWith( expect.objectContaining({ message: 'Lines added to claim', - type: 'positive' + type: 'positive', }) ); - expect(vm.canceller).toEqual(null) + expect(vm.canceller).toEqual(null); }); }); });