feat: refs #7385 add delivered and estimated info in routeTicket

This commit is contained in:
Jose Antonio Tubau 2025-04-23 11:44:33 +02:00
parent 2f20abf388
commit c3f60c68bc
2 changed files with 37 additions and 102 deletions

View File

@ -281,61 +281,3 @@ const ticketColumns = ref([
</CardSummary> </CardSummary>
</div> </div>
</template> </template>
<i18n>
en:
route:
summary:
date: Date
agency: Agency
vehicle: Vehicle
driver: Driver
cost: Cost
started: Started time
finished: Finished time
kmStart: Km start
kmEnd: Km end
volume: Volume
packages: Packages
description: Description
tickets: Tickets
order: Order
street: Street
city: City
pc: PC
client: Client
state: State
m3:
packaging: Packaging
ticket: Ticket
closed: Closed
open: Open
yes: Yes
no: No
es:
route:
summary:
date: Fecha
agency: Agencia
vehicle: Vehículo
driver: Conductor
cost: Costo
started: Hora inicio
finished: Hora fin
kmStart: Km inicio
kmEnd: Km fin
volume: Volumen
packages: Bultos
description: Descripción
tickets: Tickets
order: Orden
street: Dirección fiscal
city: Población
pc: CP
client: Cliente
state: Estado
packaging: Encajado
closed: Cerrada
open: Abierta
yes:
no: No
</i18n>

View File

@ -24,49 +24,63 @@ const selectedRows = ref([]);
const columns = computed(() => [ const columns = computed(() => [
{ {
name: 'order', name: 'order',
label: t('Order'), label: t('route.ticket.order'),
field: (row) => dashIfEmpty(row?.priority), field: (row) => dashIfEmpty(row?.priority),
sortable: false, sortable: false,
align: 'center', align: 'center',
}, },
{ {
name: 'client', name: 'client',
label: t('Client'), label: t('route.ticket.client'),
field: (row) => row?.nickname, field: (row) => row?.nickname,
sortable: false, sortable: false,
align: 'left', align: 'left',
}, },
{ {
name: 'street', name: 'street',
label: t('Street'), label: t('route.ticket.street'),
field: (row) => row?.street, field: (row) => row?.street,
sortable: false, sortable: false,
align: 'left', align: 'left',
}, },
{ {
name: 'pc', name: 'pc',
label: t('PC'), label: t('route.ticket.PC'),
field: (row) => row?.postalCode, field: (row) => row?.postalCode,
sortable: false, sortable: false,
align: 'center', align: 'center',
}, },
{ {
name: 'city', name: 'city',
label: t('City'), label: t('route.ticket.city'),
field: (row) => row?.city, field: (row) => row?.city,
sortable: false, sortable: false,
align: 'left', align: 'left',
}, },
{ {
name: 'warehouse', name: 'warehouse',
label: t('Warehouse'), label: t('route.ticket.warehouse'),
field: (row) => row?.warehouseName, field: (row) => row?.warehouseName,
sortable: false, sortable: false,
align: 'left', align: 'left',
}, },
{
name: 'delivered',
label: t('route.ticket.delivered'),
field: (row) => dashIfEmpty(row?.delivered),
sortable: false,
align: 'left',
},
{
name: 'estimated',
label: t('route.ticket.estimated'),
field: (row) => dashIfEmpty(row?.estimated),
sortable: false,
align: 'left',
},
{ {
name: 'packages', name: 'packages',
label: t('Packages'), label: t('route.ticket.packages'),
field: (row) => row?.packages, field: (row) => row?.packages,
sortable: false, sortable: false,
align: 'center', align: 'center',
@ -80,14 +94,14 @@ const columns = computed(() => [
}, },
{ {
name: 'packaging', name: 'packaging',
label: t('Packaging'), label: t('route.ticket.packaging'),
field: (row) => row?.ipt, field: (row) => row?.ipt,
sortable: false, sortable: false,
align: 'center', align: 'center',
}, },
{ {
name: 'ticket', name: 'ticket',
label: t('Ticket'), label: t('route.ticket.ticket'),
field: (row) => row?.id, field: (row) => row?.id,
sortable: false, sortable: false,
align: 'center', align: 'center',
@ -188,8 +202,8 @@ const confirmRemove = (ticket) => {
.dialog({ .dialog({
component: VnConfirm, component: VnConfirm,
componentProps: { componentProps: {
title: t('Confirm removal from route'), title: t('route.ticket.confirmRemoval'),
message: t('Are you sure you want to remove this ticket from the route?'), message: t('route.ticket.confirmRemovalConfirmation'),
promise: () => removeTicket(ticket), promise: () => removeTicket(ticket),
}, },
}) })
@ -219,7 +233,7 @@ const openSmsDialog = async () => {
quasar.dialog({ quasar.dialog({
component: SendSmsDialog, component: SendSmsDialog,
componentProps: { componentProps: {
title: t('Send SMS to the selected tickets'), title: t('route.ticket.sendSmsTickets'),
url: 'Routes/sendSms', url: 'Routes/sendSms',
destinationFk: clientsId.toString(), destinationFk: clientsId.toString(),
destination: clientsPhone.toString(), destination: clientsPhone.toString(),
@ -240,18 +254,18 @@ const openSmsDialog = async () => {
<QDialog v-model="confirmationDialog"> <QDialog v-model="confirmationDialog">
<QCard style="min-width: 350px"> <QCard style="min-width: 350px">
<QCardSection> <QCardSection>
<p class="text-h6 q-ma-none">{{ t('Select the starting date') }}</p> <p class="text-h6 q-ma-none">{{ t('route.ticket.selectStartingDate') }}</p>
</QCardSection> </QCardSection>
<QCardSection class="q-pt-none"> <QCardSection class="q-pt-none">
<VnInputDate <VnInputDate
:label="t('Stating date')" :label="t('route.ticket.startingDate')"
v-model="startingDate" v-model="startingDate"
autofocus autofocus
/> />
</QCardSection> </QCardSection>
<QCardActions align="right"> <QCardActions align="right">
<QBtn flat :label="t('Cancel')" v-close-popup class="text-primary" /> <QBtn flat :label="t('globals.cancel')" v-close-popup class="text-primary" />
<QBtn color="primary" v-close-popup @click="cloneRoutes"> <QBtn color="primary" v-close-popup @click="cloneRoutes">
{{ t('globals.clone') }} {{ t('globals.clone') }}
</QBtn> </QBtn>
@ -262,7 +276,7 @@ const openSmsDialog = async () => {
<QToolbar class="justify-end"> <QToolbar class="justify-end">
<div id="st-actions" class="q-pa-sm"> <div id="st-actions" class="q-pa-sm">
<QBtn icon="vn:wand" color="primary" class="q-mr-sm" @click="sortRoutes"> <QBtn icon="vn:wand" color="primary" class="q-mr-sm" @click="sortRoutes">
<QTooltip>{{ t('Sort routes') }}</QTooltip> <QTooltip>{{ t('route.ticket.sortRoutes') }}</QTooltip>
</QBtn> </QBtn>
<QBtn <QBtn
icon="vn:buscaman" icon="vn:buscaman"
@ -271,7 +285,7 @@ const openSmsDialog = async () => {
:disable="!selectedRows?.length" :disable="!selectedRows?.length"
@click="goToBuscaman()" @click="goToBuscaman()"
> >
<QTooltip>{{ t('Open buscaman') }}</QTooltip> <QTooltip>{{ t('route.ticket.openBuscaman') }}</QTooltip>
</QBtn> </QBtn>
<QBtn <QBtn
icon="filter_alt" icon="filter_alt"
@ -280,7 +294,7 @@ const openSmsDialog = async () => {
:disable="!selectedRows?.length" :disable="!selectedRows?.length"
@click="deletePriorities" @click="deletePriorities"
> >
<QTooltip>{{ t('Delete priority') }}</QTooltip> <QTooltip>{{ t('route.ticket.deletePriority') }}</QTooltip>
</QBtn> </QBtn>
<QBtn <QBtn
icon="format_list_numbered" icon="format_list_numbered"
@ -290,7 +304,7 @@ const openSmsDialog = async () => {
> >
<QTooltip <QTooltip
>{{ >{{
t('Renumber all tickets in the order you see on the screen') t('route.ticket.renumberAllTickets')
}} }}
</QTooltip> </QTooltip>
</QBtn> </QBtn>
@ -301,7 +315,7 @@ const openSmsDialog = async () => {
:disable="!selectedRows?.length" :disable="!selectedRows?.length"
@click="openSmsDialog" @click="openSmsDialog"
> >
<QTooltip>{{ t('Send SMS to all clients') }}</QTooltip> <QTooltip>{{ t('route.ticket.sendSmsClients') }}</QTooltip>
</QBtn> </QBtn>
</div> </div>
</QToolbar> </QToolbar>
@ -339,7 +353,7 @@ const openSmsDialog = async () => {
@click="setHighestPriority(row, rows)" @click="setHighestPriority(row, rows)"
> >
<QTooltip> <QTooltip>
{{ t('Assign highest priority') }} {{ t('route.ticket.assignHighestPriority') }}
</QTooltip> </QTooltip>
</QIcon> </QIcon>
<VnInput <VnInput
@ -354,7 +368,7 @@ const openSmsDialog = async () => {
<QTd> <QTd>
<span class="link" @click="goToBuscaman(row)"> <span class="link" @click="goToBuscaman(row)">
{{ value }} {{ value }}
<QTooltip>{{ t('Open buscaman') }}</QTooltip> <QTooltip>{{ t('route.ticket.openBuscaman') }}</QTooltip>
</span> </span>
</QTd> </QTd>
</template> </template>
@ -411,7 +425,7 @@ const openSmsDialog = async () => {
@click="openTicketsDialog" @click="openTicketsDialog"
> >
<QTooltip> <QTooltip>
{{ t('Add ticket') }} {{ t('route.ticket.addTicket') }}
</QTooltip> </QTooltip>
</QBtn> </QBtn>
</QPageSticky> </QPageSticky>
@ -432,24 +446,3 @@ const openSmsDialog = async () => {
gap: 12px; gap: 12px;
} }
</style> </style>
<i18n>
es:
Order: Orden
Street: Dirección fiscal
City: Población
PC: CP
Client: Cliente
Warehouse: Almacén
Packages: Bultos
Packaging: Encajado
Confirm removal from route: Quitar de la ruta
Are you sure you want to remove this ticket from the route?: ¿Seguro que quieres quitar este ticket de la ruta?
Sort routes: Ordenar rutas
Open buscaman: Abrir buscaman
Delete priority: Borrar orden
Renumber all tickets in the order you see on the screen: Renumerar todos los tickets con el orden que ves por pantalla
Assign highest priority: Asignar máxima prioridad
Send SMS to all clients: Mandar sms a todos los clientes de las rutas
Send SMS to the selected tickets: Enviar SMS a los tickets seleccionados
Add ticket: Añadir ticket
</i18n>