diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index 8ac7c224f..baa36710c 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -27,6 +27,7 @@ const claimActionsForm = ref(); const rows = ref([]); const selectedRows = ref([]); const destinationTypes = ref([]); +const shelvings = ref([]); const totalClaimed = ref(null); const DEFAULT_MAX_RESPONSABILITY = 5; const DEFAULT_MIN_RESPONSABILITY = 1; @@ -56,6 +57,12 @@ const columns = computed(() => [ field: (row) => row.claimDestinationFk, align: 'left', }, + { + name: 'shelving', + label: t('shelvings.shelving'), + field: (row) => row.shelvingFk, + align: 'left', + }, { name: 'Landed', label: t('Landed'), @@ -125,6 +132,10 @@ async function updateDestination(claimDestinationFk, row, options = {}) { options.reload && claimActionsForm.value.reload(); } } +async function updateShelving(shelvingFk, row) { + await axios.patch(`ClaimEnds/${row.id}`, { shelvingFk }); + claimActionsForm.value.reload(); +} async function regularizeClaim() { await post(`Claims/${claimId}/regularizeClaim`); @@ -200,6 +211,7 @@ async function post(query, params) { auto-load @on-fetch="(data) => (destinationTypes = data)" /> + + + diff --git a/src/pages/Claim/Card/ClaimSummaryAction.vue b/src/pages/Claim/Card/ClaimSummaryAction.vue index d875126cb..e5273902c 100644 --- a/src/pages/Claim/Card/ClaimSummaryAction.vue +++ b/src/pages/Claim/Card/ClaimSummaryAction.vue @@ -19,30 +19,36 @@ const columns = [ name: 'itemFk', label: t('Id item'), columnFilter: false, - align: 'left', + align: 'right', }, { name: 'ticketFk', label: t('Ticket'), columnFilter: false, - align: 'left', + align: 'right', }, { name: 'claimDestinationFk', label: t('Destination'), columnFilter: false, - align: 'left', + align: 'right', + }, + { + name: 'shelvingCode', + label: t('Shelving'), + columnFilter: false, + align: 'right', }, { name: 'landed', label: t('Landed'), format: (row) => toDate(row.landed), - align: 'left', + align: 'center', }, { name: 'quantity', label: t('Quantity'), - align: 'left', + align: 'right', }, { name: 'concept', @@ -52,18 +58,18 @@ const columns = [ { name: 'price', label: t('Price'), - align: 'left', + align: 'right', }, { name: 'discount', label: t('Discount'), format: ({ discount }) => toPercentage(discount / 100), - align: 'left', + align: 'right', }, { name: 'total', label: t('Total'), - align: 'left', + align: 'right', }, ]; diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js index e98be85fc..b0a16a2ad 100644 --- a/test/cypress/integration/claim/claimAction.spec.js +++ b/test/cypress/integration/claim/claimAction.spec.js @@ -1,6 +1,6 @@ /// describe('ClaimAction', () => { - const claimId = 2; + const claimId = 1; const firstRow = 'tbody > :nth-child(1)'; const destinationRow = '.q-item__section > .q-field';