feat: refs #8441 add assigned invoices section to VehicleSummary and update localization
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
282014f873
commit
e2e34d2f2d
|
@ -168,7 +168,7 @@ const ticketColumns = ref([
|
|||
<VnLv
|
||||
:label="t('route.summary.volume')"
|
||||
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
||||
entity?.route?.vehicle?.m3
|
||||
entity?.route?.vehicle?.m3,
|
||||
)} m³`"
|
||||
/>
|
||||
<VnLv
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
import InvoiceInDescriptorProxy from 'src/pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
|
||||
import VehicleFilter from '../VehicleFilter.js';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
|
||||
const props = defineProps({ id: { type: [Number, String], default: null } });
|
||||
|
||||
const invoices = ref([]);
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => props.id || +route.params.id);
|
||||
const links = {
|
||||
|
@ -22,6 +26,11 @@ const links = {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
:url="`Vehicles/${entityId}/getInvoices`"
|
||||
auto-load
|
||||
@on-fetch="(data) => (invoices = data)"
|
||||
/>
|
||||
<CardSummary
|
||||
data-key="Vehicle"
|
||||
:url="`Vehicles/${entityId}`"
|
||||
|
@ -127,6 +136,45 @@ const links = {
|
|||
</QList>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
<QCard class="vn-max">
|
||||
<VnTitle
|
||||
:url="`#/route/vehicle/${route.params.id}/invoice-in`"
|
||||
:text="$t('vehicle.ticket.assignedInvoices')"
|
||||
/>
|
||||
<QTable :rows="invoices" style="text-align: center">
|
||||
<template #body-cell="{ value }">
|
||||
<QTd>{{ value }}</QTd>
|
||||
</template>
|
||||
<template #header="props">
|
||||
<QTr class="tr-header" :props="props">
|
||||
<QTh auto-width>{{ $t('invoiceIn.list.issued') }}</QTh>
|
||||
<QTh auto-width>{{ $t('invoiceIn.list.supplier') }}</QTh>
|
||||
<QTh auto-width>{{ $t('invoiceIn.supplierRef') }}</QTh>
|
||||
<QTh auto-width>{{ $t('invoiceIn.list.amount') }}</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<QTr :props="props">
|
||||
<QTd>{{ toDate(props.row.issued) }}</QTd>
|
||||
<QTd>
|
||||
<span class="link">
|
||||
{{ props.row.supplierName }}
|
||||
<SupplierDescriptorProxy :id="props.row.supplierId" />
|
||||
</span>
|
||||
</QTd>
|
||||
<QTd>
|
||||
<span class="link">
|
||||
{{ props.row.supplierRef }}
|
||||
<InvoiceInDescriptorProxy
|
||||
:id="props.row.supplierId"
|
||||
/>
|
||||
</span>
|
||||
</QTd>
|
||||
<QTd>{{ toCurrency(props.row.amount) }}</QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
</template>
|
||||
|
|
|
@ -19,6 +19,7 @@ vehicle:
|
|||
vehicleTypeFk: Type
|
||||
vehicleStateFk: State
|
||||
ticket:
|
||||
assignedInvoices: Assigned Invoices
|
||||
assignInvoice: Assign invoice
|
||||
unassignInvoice: Unassign invoice
|
||||
unassignInvoiceConfirmation: This invoice will be unassigned from this vehicle! Continue anyway?
|
||||
|
|
Loading…
Reference in New Issue