forked from verdnatura/salix-front
Add links to invoice out summary table
This commit is contained in:
parent
0274a696f5
commit
b010f8ec3e
|
@ -7,6 +7,8 @@ import { toCurrency, toDate } from 'src/filters';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetch();
|
fetch();
|
||||||
|
@ -67,29 +69,33 @@ const taxColumns = ref([
|
||||||
const ticketsColumns = ref([
|
const ticketsColumns = ref([
|
||||||
{
|
{
|
||||||
name: 'item',
|
name: 'item',
|
||||||
label: 'invoiceOut.summary.ticketId',
|
label: t('invoiceOut.summary.ticketId'),
|
||||||
field: (row) => row.id,
|
field: (row) => row.id,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
label: 'invoiceOut.summary.nickname',
|
label: t('invoiceOut.summary.nickname'),
|
||||||
field: (row) => row.nickname,
|
field: (row) => row.nickname,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
label: 'invoiceOut.summary.shipped',
|
label: t('invoiceOut.summary.shipped'),
|
||||||
field: (row) => row.shipped,
|
field: (row) => row.shipped,
|
||||||
format: (value) => toDate(value),
|
format: (value) => toDate(value),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
label: 'invoiceOut.summary.totalWithVat',
|
label: t('invoiceOut.summary.totalWithVat'),
|
||||||
field: (row) => row.totalWithVat,
|
field: (row) => row.totalWithVat,
|
||||||
format: (value) => toCurrency(value),
|
format: (value) => toCurrency(value),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -144,12 +150,21 @@ const ticketsColumns = ref([
|
||||||
{{ t('invoiceOut.summary.tickets') }}
|
{{ t('invoiceOut.summary.tickets') }}
|
||||||
</div>
|
</div>
|
||||||
<QTable v-if="tickets" :columns="ticketsColumns" :rows="tickets" flat>
|
<QTable v-if="tickets" :columns="ticketsColumns" :rows="tickets" flat>
|
||||||
<template #header="props">
|
<template #body-cell-item="{ value }">
|
||||||
<QTr :props="props">
|
<QTd>
|
||||||
<QTh v-for="col in props.cols" :key="col.name" :props="props">
|
<QBtn flat color="primary">
|
||||||
{{ t(col.label) }}
|
{{ value }}
|
||||||
</QTh>
|
<TicketDescriptorProxy :id="value" />
|
||||||
</QTr>
|
</QBtn>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-quantity="{ value, row }">
|
||||||
|
<QTd>
|
||||||
|
<QBtn flat color="primary" dense>
|
||||||
|
{{ value }}
|
||||||
|
<CustomerDescriptorProxy :id="row.id" />
|
||||||
|
</QBtn>
|
||||||
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
Loading…
Reference in New Issue