0
0
Fork 0

Merge branch 'dev' into 5989-redirectSalix

This commit is contained in:
Carlos Satorres 2023-08-08 10:12:02 +00:00
commit ab71e36053
4 changed files with 138 additions and 9 deletions

View File

@ -161,6 +161,7 @@ export default {
summary: 'Summary', summary: 'Summary',
basicData: 'Basic Data', basicData: 'Basic Data',
boxing: 'Boxing', boxing: 'Boxing',
sms: 'Sms',
}, },
list: { list: {
nickname: 'Nickname', nickname: 'Nickname',
@ -295,7 +296,7 @@ export default {
result: 'Result', result: 'Result',
responsible: 'Responsible', responsible: 'Responsible',
worker: 'Worker', worker: 'Worker',
redelivery: 'Redelivery' redelivery: 'Redelivery',
}, },
basicData: { basicData: {
customer: 'Customer', customer: 'Customer',
@ -411,7 +412,7 @@ export default {
wagonEdit: 'Edit wagon', wagonEdit: 'Edit wagon',
typesList: 'Types List', typesList: 'Types List',
typeCreate: 'Create type', typeCreate: 'Create type',
typeEdit: 'Edit type' typeEdit: 'Edit type',
}, },
type: { type: {
name: 'Name', name: 'Name',
@ -431,7 +432,7 @@ export default {
plate: 'Plate', plate: 'Plate',
volume: 'Volume', volume: 'Volume',
type: 'Type', type: 'Type',
label: 'Label' label: 'Label',
}, },
warnings: { warnings: {
noData: 'No data available', noData: 'No data available',
@ -444,7 +445,7 @@ export default {
minHeightBetweenTrays: 'The minimum height between trays is ', minHeightBetweenTrays: 'The minimum height between trays is ',
maxWagonHeight: 'The maximum height of the wagon is ', maxWagonHeight: 'The maximum height of the wagon is ',
uncompleteTrays: 'There are incomplete trays', uncompleteTrays: 'There are incomplete trays',
} },
}, },
components: { components: {
topbar: {}, topbar: {},

View File

@ -63,7 +63,7 @@ export default {
webPayments: 'Pagos Web', webPayments: 'Pagos Web',
createCustomer: 'Crear cliente', createCustomer: 'Crear cliente',
basicData: 'Datos básicos', basicData: 'Datos básicos',
summary: 'Resumen' summary: 'Resumen',
}, },
list: { list: {
phone: 'Teléfono', phone: 'Teléfono',
@ -160,6 +160,7 @@ export default {
summary: 'Resumen', summary: 'Resumen',
basicData: 'Datos básicos', basicData: 'Datos básicos',
boxing: 'Encajado', boxing: 'Encajado',
sms: 'Sms',
}, },
list: { list: {
nickname: 'Alias', nickname: 'Alias',
@ -294,7 +295,7 @@ export default {
result: 'Consecuencias', result: 'Consecuencias',
responsible: 'Responsable', responsible: 'Responsable',
worker: 'Trabajador', worker: 'Trabajador',
redelivery: 'Devolución' redelivery: 'Devolución',
}, },
basicData: { basicData: {
customer: 'Cliente', customer: 'Cliente',
@ -411,7 +412,7 @@ export default {
wagonEdit: 'Editar tipo', wagonEdit: 'Editar tipo',
typesList: 'Listado tipos', typesList: 'Listado tipos',
typeCreate: 'Crear tipo', typeCreate: 'Crear tipo',
typeEdit: 'Editar tipo' typeEdit: 'Editar tipo',
}, },
type: { type: {
name: 'Nombre', name: 'Nombre',
@ -444,7 +445,7 @@ export default {
minHeightBetweenTrays: 'La distancia mínima entre bandejas es ', minHeightBetweenTrays: 'La distancia mínima entre bandejas es ',
maxWagonHeight: 'La altura máxima del vagón es ', maxWagonHeight: 'La altura máxima del vagón es ',
uncompleteTrays: 'Hay bandejas sin completar', uncompleteTrays: 'Hay bandejas sin completar',
} },
}, },
components: { components: {
topbar: {}, topbar: {},

View File

@ -0,0 +1,118 @@
<script setup>
import { date } from 'quasar';
import { computed } from 'vue';
import { useRouter } from 'vue-router';
import { useSession } from 'src/composables/useSession';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
const router = useRouter();
const session = useSession();
const token = session.getToken();
const entityId = computed(function () {
return router.currentRoute.value.params.id;
});
const filter = {
fields: ['ticketFk', 'smsFk'],
include: {
relation: 'sms',
scope: {
fields: [
'senderFk',
'sender',
'destination',
'message',
'statusCode',
'status',
'created',
],
include: {
relation: 'sender',
scope: {
fields: ['name'],
},
},
},
},
where: {
ticketFk: entityId,
},
};
function formatNumer(number) {
if (number.length <= 10) return number;
return number.slice(0, 4) + ' ' + number.slice(4);
}
</script>
<template>
<div class="column items-center">
<div class="list">
<VnPaginate
data-key="TicketSms"
url="TicketSms"
:filter="filter"
order="smsFk DESC"
:offset="100"
:limit="5"
auto-load
>
<template #body="{ rows }">
<QCard
flat
bordered
class="card q-pa-md"
v-for="row of rows"
:key="row.smsFk"
>
<QItem>
<QItmSection top avatar>
<QItemLabel class="column items-center">
<QAvatar>
<QImg
:src="`/api/Images/user/160x160/${row.sms.senderFk}/download?access_token=${token}`"
spinner-color="white"
/>
</QAvatar>
<span class="link">
{{ row.sms.sender.name }}
<WorkerDescriptorProxy :id="row.sms.senderFk" />
</span>
</QItemLabel>
</QItmSection>
<QSeparator spaced inset="item" />
<QItemSection>
<QItemLabel caption>{{
formatNumer(row.sms.destination)
}}</QItemLabel>
<QItemLabel>{{ row.sms.message }}</QItemLabel>
</QItemSection>
<QItemSection side top>
<QItemLabel caption>{{
date.formatDate(
row.sms.created,
'YYYY-MM-DD HH:mm:ss'
)
}}</QItemLabel>
<QItemLabel>
<QChip
:color="
row.sms.status == 'OK'
? 'positive'
: 'negative'
"
>
{{ row.sms.status }}
</QChip>
</QItemLabel>
</QItemSection>
</QItem>
</QCard>
</template>
</VnPaginate>
</div>
</div>
</template>

View File

@ -11,7 +11,7 @@ export default {
redirect: { name: 'TicketMain' }, redirect: { name: 'TicketMain' },
menus: { menus: {
main: ['TicketList'], main: ['TicketList'],
card: ['TicketBoxing'], card: ['TicketBoxing', 'TicketSms'],
}, },
children: [ children: [
{ {
@ -74,6 +74,15 @@ export default {
}, },
component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'), component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
}, },
{
path: 'sms',
name: 'TicketSms',
meta: {
title: 'sms',
icon: 'sms',
},
component: () => import('src/pages/Ticket/Card/TicketSms.vue'),
},
], ],
}, },
], ],