forked from verdnatura/salix-front
fix: refs #7553 fixed details in summary and data-key in TicketList
This commit is contained in:
parent
f35e33cf10
commit
cb7d729b0f
|
@ -15,6 +15,7 @@ import { getUrl } from 'src/composables/getUrl';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
|
import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -79,6 +80,29 @@ async function changeState(value) {
|
||||||
await axios.post(`Tickets/state`, formData);
|
await axios.post(`Tickets/state`, formData);
|
||||||
router.go(route.fullPath);
|
router.go(route.fullPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getNoteValue(description) {
|
||||||
|
switch (description) {
|
||||||
|
case 'ItemPicker':
|
||||||
|
return t('ItemPicker');
|
||||||
|
case 'Packager':
|
||||||
|
return t('Packager');
|
||||||
|
case 'Delivery':
|
||||||
|
return t('Delivery');
|
||||||
|
case 'SalesPerson':
|
||||||
|
return t('SalesPerson');
|
||||||
|
case 'Administrative':
|
||||||
|
return t('Administrative');
|
||||||
|
case 'Weight':
|
||||||
|
return t('Weight');
|
||||||
|
case 'InvoiceOut':
|
||||||
|
return t('InvoiceOut');
|
||||||
|
case 'DropOff':
|
||||||
|
return t('DropOff');
|
||||||
|
case 'Sustitución':
|
||||||
|
return t('Sustitución');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -160,7 +184,14 @@ async function changeState(value) {
|
||||||
:label="t('ticket.summary.agency')"
|
:label="t('ticket.summary.agency')"
|
||||||
:value="ticket.agencyMode?.name"
|
:value="ticket.agencyMode?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('ticket.summary.zone')" :value="ticket?.zone?.name" />
|
<VnLv :label="t('ticket.summary.zone')">
|
||||||
|
<template #value>
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ ticket?.zone?.name }}
|
||||||
|
<ZoneDescriptorProxy :id="ticket.zoneFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('ticket.summary.warehouse')"
|
:label="t('ticket.summary.warehouse')"
|
||||||
:value="ticket.warehouse?.name"
|
:value="ticket.warehouse?.name"
|
||||||
|
@ -263,7 +294,7 @@ async function changeState(value) {
|
||||||
<VnLv
|
<VnLv
|
||||||
v-for="note in ticket.notes"
|
v-for="note in ticket.notes"
|
||||||
:key="note.id"
|
:key="note.id"
|
||||||
:label="note.observationType.description"
|
:label="getNoteValue(note.observationType.description)"
|
||||||
:value="note.description"
|
:value="note.description"
|
||||||
>
|
>
|
||||||
<template #value>
|
<template #value>
|
||||||
|
@ -291,6 +322,7 @@ async function changeState(value) {
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('ticket.summary.total')"
|
:label="t('ticket.summary.total')"
|
||||||
:value="toCurrency(ticket.totalWithVat)"
|
:value="toCurrency(ticket.totalWithVat)"
|
||||||
|
style="font-weight: bold"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
@ -400,7 +432,17 @@ async function changeState(value) {
|
||||||
<ItemDescriptorProxy :id="props.row.itemFk" />
|
<ItemDescriptorProxy :id="props.row.itemFk" />
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>{{ props.row.visible }}</QTd>
|
<QTd>
|
||||||
|
<QChip
|
||||||
|
dense
|
||||||
|
rounded
|
||||||
|
v-if="props.row.visible < 0"
|
||||||
|
:color="'negative'"
|
||||||
|
>
|
||||||
|
{{ props.row.visible }}
|
||||||
|
{{ console.log(props.row) }}
|
||||||
|
</QChip>
|
||||||
|
</QTd>
|
||||||
<QTd>{{ props.row.available }}</QTd>
|
<QTd>{{ props.row.available }}</QTd>
|
||||||
<QTd>{{ props.row.quantity }}</QTd>
|
<QTd>{{ props.row.quantity }}</QTd>
|
||||||
<QTd class="description-cell">
|
<QTd class="description-cell">
|
||||||
|
@ -432,12 +474,9 @@ async function changeState(value) {
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard
|
<QCard class="vn-max" v-if="ticket.packagings.length != 0">
|
||||||
class="vn-max"
|
|
||||||
v-if="ticket.packagings.length > 0 || ticket.services.length > 0"
|
|
||||||
>
|
|
||||||
<VnTitle :url="ticketUrl + 'package'" :text="t('globals.packages')" />
|
<VnTitle :url="ticketUrl + 'package'" :text="t('globals.packages')" />
|
||||||
<QTable :rows="ticket.packagings" flat>
|
<QTable :rows="ticket.packagings" flat style="text-align: center">
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr class="tr-header" :props="props">
|
<QTr class="tr-header" :props="props">
|
||||||
<QTh auto-width>{{ t('ticket.summary.created') }}</QTh>
|
<QTh auto-width>{{ t('ticket.summary.created') }}</QTh>
|
||||||
|
@ -453,11 +492,13 @@ async function changeState(value) {
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
</QCard>
|
||||||
|
<QCard class="vn-max" v-if="ticket.services.length != 0">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="ticketUrl + 'service'"
|
:url="ticketUrl + 'service'"
|
||||||
:text="t('ticket.summary.service')"
|
:text="t('ticket.summary.service')"
|
||||||
/>
|
/>
|
||||||
<QTable :rows="ticket.services" flat>
|
<QTable :rows="ticket.services" flat style="text-align: center">
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr class="tr-header" :props="props">
|
<QTr class="tr-header" :props="props">
|
||||||
<QTh auto-width>{{ t('ticket.summary.quantity') }}</QTh>
|
<QTh auto-width>{{ t('ticket.summary.quantity') }}</QTh>
|
||||||
|
@ -480,12 +521,12 @@ async function changeState(value) {
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max" v-if="ticket.requests.length > 0">
|
<QCard class="vn-max" v-if="ticket.requests.length != 0">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="ticketUrl + 'request'"
|
:url="ticketUrl + 'request'"
|
||||||
:text="t('ticket.summary.purchaseRequest')"
|
:text="t('ticket.summary.purchaseRequest')"
|
||||||
/>
|
/>
|
||||||
<QTable :rows="ticket.requests" flat>
|
<QTable :rows="ticket.requests" flat style="text-align: center">
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr class="tr-header" :props="props">
|
<QTr class="tr-header" :props="props">
|
||||||
<QTh auto-width>{{ t('ticket.summary.description') }}</QTh>
|
<QTh auto-width>{{ t('ticket.summary.description') }}</QTh>
|
||||||
|
@ -517,7 +558,14 @@ async function changeState(value) {
|
||||||
v-model="props.row.isOk"
|
v-model="props.row.isOk"
|
||||||
disable
|
disable
|
||||||
:toggle-indeterminate="false"
|
:toggle-indeterminate="false"
|
||||||
/>
|
>
|
||||||
|
<QTooltip v-if="props.row.isOk">
|
||||||
|
{{ t('Accepted') }}
|
||||||
|
</QTooltip>
|
||||||
|
<QTooltip v-else>
|
||||||
|
{{ t('Denied') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QCheckbox>
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
|
@ -564,3 +612,28 @@ async function changeState(value) {
|
||||||
color: $primary-light;
|
color: $primary-light;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
en:
|
||||||
|
ItemPicker: Item Picker
|
||||||
|
Packager: Packager
|
||||||
|
Delivery: Delivery
|
||||||
|
SalesPerson: Sales Person
|
||||||
|
Administrative: Administrative
|
||||||
|
Weight: Weight
|
||||||
|
InvoiceOut: Invoice Out
|
||||||
|
DropOff: Drop Off
|
||||||
|
Sustitución: Sustitution
|
||||||
|
es:
|
||||||
|
ItemPicker: Items
|
||||||
|
Packager: Encajador
|
||||||
|
Delivery: Envío
|
||||||
|
SalesPerson: Comercial
|
||||||
|
Administrative: Administrativa
|
||||||
|
Weight: Peso
|
||||||
|
InvoiceOut: Facturas
|
||||||
|
DropOff: Despacho
|
||||||
|
Sustitución: Sustitución
|
||||||
|
Accepted: Aceptado
|
||||||
|
Denied: Denegado
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -426,18 +426,18 @@ function setReference(data) {
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
data-key="Tickets"
|
data-key="Ticket"
|
||||||
:label="t('Search ticket')"
|
:label="t('Search ticket')"
|
||||||
:info="t('You can search by ticket id or alias')"
|
:info="t('You can search by ticket id or alias')"
|
||||||
/>
|
/>
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
<TicketFilter data-key="Tickets" />
|
<TicketFilter data-key="Ticket" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="Tickets"
|
data-key="Ticket"
|
||||||
url="Tickets/filter"
|
url="Tickets/filter"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Tickets/new',
|
urlCreate: 'Tickets/new',
|
||||||
|
|
Loading…
Reference in New Issue