From 8a36fc03b840baa95b6de7c30ea1db09164ccd6b Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 21 Dec 2023 18:59:13 +0100 Subject: [PATCH 1/2] refactor(ticketsms): refs #6259 add vnSms create customerSms --- src/components/ui/VnAvatar.vue | 3 + src/components/ui/VnSms.vue | 118 +++++++++++++++++ src/composables/useArrayData.js | 4 +- src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Claim/ClaimList.vue | 9 -- src/pages/Customer/Card/CustomerSms.vue | 25 ++++ src/pages/Ticket/Card/TicketSms.vue | 122 ++---------------- src/router/modules/customer.js | 11 +- .../__tests__/components/common/VnSms.spec.js | 25 ++++ 10 files changed, 200 insertions(+), 119 deletions(-) create mode 100644 src/components/ui/VnSms.vue create mode 100644 src/pages/Customer/Card/CustomerSms.vue create mode 100644 test/vitest/__tests__/components/common/VnSms.spec.js diff --git a/src/components/ui/VnAvatar.vue b/src/components/ui/VnAvatar.vue index b385b684f..85bece243 100644 --- a/src/components/ui/VnAvatar.vue +++ b/src/components/ui/VnAvatar.vue @@ -1,8 +1,10 @@ + + + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 523340cc9..ba917a2e1 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -155,7 +155,9 @@ export function useArrayData(key, userOptions) { delete store.userParams[param]; delete params[param]; if (store.filter?.where) { - delete store.filter.where[Object.keys(exprBuilder ? exprBuilder(param) : param)[0]]; + delete store.filter.where[ + Object.keys(exprBuilder ? exprBuilder(param) : param)[0] + ]; if (Object.keys(store.filter.where).length === 0) { delete store.filter.where; } diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 5e7e116c5..9776ac34c 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -114,6 +114,7 @@ export default { createCustomer: 'Create customer', summary: 'Summary', basicData: 'Basic Data', + sms: 'Sms', }, list: { phone: 'Phone', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 4e570e7b4..3518afee9 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -113,6 +113,7 @@ export default { createCustomer: 'Crear cliente', basicData: 'Datos básicos', summary: 'Resumen', + sms: 'Sms', }, list: { phone: 'Teléfono', diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index fbf28bc8e..c4a728aa2 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -38,15 +38,6 @@ function viewSummary(id) { }, }); } - -function viewDescriptor(id) { - quasar.dialog({ - component: CustomerDescriptorProxy, - componentProps: { - id, - }, - }); -}