From 1b67b7ab3632c25181820ca8533cb24d58ccf676 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 22 Feb 2024 10:38:15 -0300 Subject: [PATCH] Customer description corrections and creation of tickets create view --- src/i18n/en/index.js | 8 + src/i18n/es/index.js | 8 + .../Customer/Card/CustomerDescriptor.vue | 109 +++++---- .../Customer/Card/CustomerDescriptorMenu.vue | 10 +- src/pages/Order/Card/OrderForm.vue | 22 +- src/pages/Ticket/Card/TicketSummary.vue | 2 +- src/pages/Ticket/TicketCreate.vue | 227 ++++++++++++++++++ src/pages/Ticket/TicketList.vue | 8 + src/router/modules/ticket.js | 2 +- 9 files changed, 348 insertions(+), 48 deletions(-) create mode 100644 src/pages/Ticket/TicketCreate.vue diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 05075efe2..a2aefea28 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -170,6 +170,7 @@ export default { hasDebt: 'Customer has debt', notChecked: 'Customer not checked', noWebAccess: 'Web access is disabled', + businessType: 'Business type', passwordRequirements: 'The password must have at least { length } length characters, {nAlpha} alphabetic characters, {nUpper} capital letters, {nDigits} digits and {nPunct} symbols (Ex: $%&.)\n', }, @@ -492,6 +493,13 @@ export default { weight: 'Weight', goTo: 'Go to', }, + create: { + client: 'Client', + address: 'Address', + landed: 'Landed', + warehouse: 'Warehouse', + agency: 'Agency', + }, }, claim: { pageTitles: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 8c594f34f..a04f7b9b6 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -169,6 +169,7 @@ export default { hasDebt: 'El cliente tiene riesgo', notChecked: 'El cliente no está comprobado', noWebAccess: 'El acceso web está desactivado', + businessType: 'Tipo de negocio', passwordRequirements: 'La contraseña debe tener al menos { length } caracteres de longitud, {nAlpha} caracteres alfabéticos, {nUpper} letras mayúsculas, {nDigits} dígitos y {nPunct} símbolos (Ej: $%&.)', }, @@ -492,6 +493,13 @@ export default { weight: 'Peso', goTo: 'Ir a', }, + create: { + client: 'Cliente', + address: 'Dirección', + landed: 'F. entrega', + warehouse: 'Almacén', + agency: 'Agencia', + }, }, claim: { pageTitles: { diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index 021b92c59..9f3a1178a 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -3,15 +3,14 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; -import { toCurrency } from 'src/filters'; - -import useCardDescription from 'src/composables/useCardDescription'; - import CardDescriptor from 'components/ui/CardDescriptor.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue'; +import useCardDescription from 'src/composables/useCardDescription'; +import { toCurrency } from 'src/filters'; + const $props = defineProps({ id: { type: Number, @@ -23,8 +22,10 @@ const $props = defineProps({ default: null, }, }); + const route = useRoute(); const { t } = useI18n(); + const entityId = computed(() => { return $props.id || route.params.id; }); @@ -43,54 +44,68 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity :summary="$props.summary" data-key="customerData" > + -{ - "en": { - "ticketList": "Customer ticket list", - "invoiceOutList": "Customer invoice out list" - }, - "es": { - "ticketList": "Listado de tickets del cliente", - "invoiceOutList": "Listado de facturas del cliente" - } -} +es: + Go to module index: Ir al índice del módulo + Customer ticket list: Listado de tickets del cliente + Customer invoice out list: Listado de facturas del cliente + New order: Nuevo pedido + Go to user: Ir al usuario + Customer unpaid: Cliente impago diff --git a/src/pages/Customer/Card/CustomerDescriptorMenu.vue b/src/pages/Customer/Card/CustomerDescriptorMenu.vue index 91f20e1f7..560ee51c8 100644 --- a/src/pages/Customer/Card/CustomerDescriptorMenu.vue +++ b/src/pages/Customer/Card/CustomerDescriptorMenu.vue @@ -25,7 +25,7 @@ const showSmsDialog = () => { quasar.dialog({ component: VnSmsDialog, componentProps: { - phone: $props.customer.phone, + phone: $props.customer.phone || $props.customer.mobile, promise: sendSms, }, }); @@ -45,7 +45,13 @@ const sendSms = async (payload) => { + + + + {{ t('New ticket') }} + + + @@ -130,4 +137,5 @@ es: Search ticket: Buscar ticket You can search by ticket id or alias: Puedes buscar por id o alias del ticket Zone: Zona + New ticket: Nuevo ticket diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 73c441b4d..214c69e18 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -37,7 +37,7 @@ export default { icon: 'vn:ticketAdd', roles: ['developer'], }, - component: () => import('src/pages/Ticket/TicketList.vue'), + component: () => import('src/pages/Ticket/TicketCreate.vue'), }, ], },