From ab20ec1738a6bc64dcd9c9a9d05db7168fac86e9 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Wed, 14 Feb 2024 12:21:00 -0500 Subject: [PATCH] Solucion a comentarios 8 --- src/components/common/VnSmsDialog.vue | 12 ++-- src/i18n/en/index.js | 2 + src/i18n/es/index.js | 2 + ...omerConsignees.vue => CustomerAddress.vue} | 24 +++---- src/pages/Customer/Card/CustomerContacts.vue | 8 ++- .../Customer/Card/CustomerDescriptor.vue | 15 ++++- .../Customer/Card/CustomerDescriptorMenu.vue | 63 +++++++++++++++++++ src/pages/Customer/Card/CustomerGreuges.vue | 8 --- src/pages/Customer/Card/CustomerNotes.vue | 19 ++---- .../Customer/Card/CustomerRecoveries.vue | 8 --- src/pages/Customer/Card/CustomerSamples.vue | 8 --- ...eeCreate.vue => CustomerAddressCreate.vue} | 6 +- ...signeeEdit.vue => CustomerAddressEdit.vue} | 10 +-- src/router/modules/customer.js | 30 ++++----- 14 files changed, 133 insertions(+), 82 deletions(-) rename src/pages/Customer/Card/{CustomerConsignees.vue => CustomerAddress.vue} (89%) create mode 100644 src/pages/Customer/Card/CustomerDescriptorMenu.vue rename src/pages/Customer/components/{CustomerConsigneeCreate.vue => CustomerAddressCreate.vue} (98%) rename src/pages/Customer/components/{CustomerConsigneeEdit.vue => CustomerAddressEdit.vue} (98%) diff --git a/src/components/common/VnSmsDialog.vue b/src/components/common/VnSmsDialog.vue index 8bb8c3858..8f2827c19 100644 --- a/src/components/common/VnSmsDialog.vue +++ b/src/components/common/VnSmsDialog.vue @@ -21,7 +21,7 @@ const props = defineProps({ }, template: { type: String, - required: true, + required: false, }, locale: { type: String, @@ -49,7 +49,7 @@ updateMessage(); function updateMessage() { const params = props.data; - const key = `templates['${props.template}']`; + const key = props.template ? `templates['${props.template}']` : ''; message.value = t(key, params, { locale: locale.value }); } @@ -188,7 +188,7 @@ en: templates: pendingPayment: 'Your order is pending of payment. Please, enter the website and make the payment with a credit card. Thank you.' - minAmount: 'A minimum amount of 50€ (VAT excluded) is required for your order + minAmount: 'A minimum amount of 50€ (VAT excluded) is required for your order { orderId } of { shipped } to receive it without additional shipping costs.' orderChanges: 'Order {orderId} of { shipped }: { changes }' en: English @@ -205,7 +205,7 @@ es: templates: pendingPayment: 'Su pedido está pendiente de pago. Por favor, entre en la página web y efectue el pago con tarjeta. Muchas gracias.' - minAmount: 'Es necesario un importe mínimo de 50€ (Sin IVA) en su pedido + minAmount: 'Es necesario un importe mínimo de 50€ (Sin IVA) en su pedido { orderId } del día { shipped } para recibirlo sin portes adicionales.' orderChanges: 'Pedido {orderId} día { shipped }: { changes }' en: Inglés @@ -222,7 +222,7 @@ fr: templates: pendingPayment: 'Votre commande est en attente de paiement. Veuillez vous connecter sur le site web et effectuer le paiement par carte. Merci beaucoup.' - minAmount: 'Un montant minimum de 50€ (TVA non incluse) est requis pour votre commande + minAmount: 'Un montant minimum de 50€ (TVA non incluse) est requis pour votre commande { orderId } du { shipped } afin de la recevoir sans frais de port supplémentaires.' orderChanges: 'Commande { orderId } du { shipped }: { changes }' en: Anglais @@ -239,7 +239,7 @@ pt: templates: pendingPayment: 'Seu pedido está pendente de pagamento. Por favor, acesse o site e faça o pagamento com cartão. Muito obrigado.' - minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido + minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido { orderId } do dia { shipped } para recebê-lo sem custos de envio adicionais.' orderChanges: 'Pedido { orderId } dia { shipped }: { changes }' en: Inglês diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 19d7fb67c..73cd207a0 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -64,6 +64,7 @@ export default { markAll: 'Mark all', noResults: 'No results', system: 'System', + notificationSent: 'Notification sent', }, errors: { statusUnauthorized: 'Access denied', @@ -158,6 +159,7 @@ export default { debt: 'Debt', isDisabled: 'Customer is disabled', isFrozen: 'Customer is frozen', + webAccountInactive: 'Web account inactive', hasDebt: 'Customer has debt', notChecked: 'Customer not checked', noWebAccess: 'Web access is disabled', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index a2cb29a53..931266fd9 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -64,6 +64,7 @@ export default { markAll: 'Marcar todo', noResults: 'Sin resultados', system: 'Sistema', + notificationSent: 'Notificación enviada', }, errors: { statusUnauthorized: 'Acceso denegado', @@ -157,6 +158,7 @@ export default { debt: 'Riesgo', isDisabled: 'El cliente está desactivado', isFrozen: 'El cliente está congelado', + webAccountInactive: 'Sin acceso web', hasDebt: 'El cliente tiene riesgo', notChecked: 'El cliente no está comprobado', noWebAccess: 'El acceso web está desactivado', diff --git a/src/pages/Customer/Card/CustomerConsignees.vue b/src/pages/Customer/Card/CustomerAddress.vue similarity index 89% rename from src/pages/Customer/Card/CustomerConsignees.vue rename to src/pages/Customer/Card/CustomerAddress.vue index 57c47c2d0..98a6e47e6 100644 --- a/src/pages/Customer/Card/CustomerConsignees.vue +++ b/src/pages/Customer/Card/CustomerAddress.vue @@ -12,7 +12,7 @@ const router = useRouter(); const provincesLocation = ref([]); -const consigneeFilter = { +const addressFilter = { fields: [ 'id', 'isDefaultAddress', @@ -51,16 +51,16 @@ const setProvince = (provinceFk) => { return result[0]?.name || ''; }; -const toCustomerConsigneeCreate = () => { - router.push({ name: 'CustomerConsigneeCreate' }); +const toCustomerAddressCreate = () => { + router.push({ name: 'CustomerAddressCreate' }); }; -const toCustomerConsigneeEdit = (consigneeId) => { +const toCustomerAddressEdit = (addressId) => { router.push({ - name: 'CustomerConsigneeEdit', + name: 'CustomerAddressEdit', params: { id: route.params.id, - consigneeId, + addressId, }, }); }; @@ -75,21 +75,21 @@ const toCustomerConsigneeEdit = (consigneeId) => { - es: Total: Total diff --git a/src/pages/Customer/Card/CustomerNotes.vue b/src/pages/Customer/Card/CustomerNotes.vue index eca1e165f..d9400e663 100644 --- a/src/pages/Customer/Card/CustomerNotes.vue +++ b/src/pages/Customer/Card/CustomerNotes.vue @@ -59,18 +59,6 @@ const toCustomerNoteCreate = () => { {{ t('globals.noResults') }} - - - - - {{ t('New consignee') }} - - @@ -78,7 +66,7 @@ const toCustomerNoteCreate = () => { - {{ t('New consignee') }} + {{ t('New note') }} @@ -90,3 +78,8 @@ const toCustomerNoteCreate = () => { padding: 10px; } + + +es: + New note: Nueva nota + diff --git a/src/pages/Customer/Card/CustomerRecoveries.vue b/src/pages/Customer/Card/CustomerRecoveries.vue index e275d7d53..e01101562 100644 --- a/src/pages/Customer/Card/CustomerRecoveries.vue +++ b/src/pages/Customer/Card/CustomerRecoveries.vue @@ -118,14 +118,6 @@ const toCustomerRecoverieCreate = () => { - - es: Since: Desde diff --git a/src/pages/Customer/Card/CustomerSamples.vue b/src/pages/Customer/Card/CustomerSamples.vue index f5cc93274..d8b25e012 100644 --- a/src/pages/Customer/Card/CustomerSamples.vue +++ b/src/pages/Customer/Card/CustomerSamples.vue @@ -128,14 +128,6 @@ const toCustomerSamplesCreate = () => { - - es: Sent: Enviado diff --git a/src/pages/Customer/components/CustomerConsigneeCreate.vue b/src/pages/Customer/components/CustomerAddressCreate.vue similarity index 98% rename from src/pages/Customer/components/CustomerConsigneeCreate.vue rename to src/pages/Customer/components/CustomerAddressCreate.vue index c5daa78e4..f296b71f7 100644 --- a/src/pages/Customer/components/CustomerConsigneeCreate.vue +++ b/src/pages/Customer/components/CustomerAddressCreate.vue @@ -53,9 +53,9 @@ const refreshData = () => { getCustomsAgents(); }; -const toCustomerConsignees = () => { +const toCustomerAddress = () => { router.push({ - name: 'CustomerConsignees', + name: 'CustomerAddress', params: { id: route.params.id, }, @@ -92,7 +92,7 @@ const toCustomerConsignees = () => { :form-initial-data="formInitialData" :observe-form-changes="false" :url-create="urlCreate" - @on-data-saved="toCustomerConsignees()" + @on-data-saved="toCustomerAddress()" model="client" >