From 3a3ae14dc54153a8a0c3b9836456f323eacd6bf3 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 31 Aug 2023 09:05:21 +0200 Subject: [PATCH 001/124] ref #6175 VnLinkPhone and MicroSIP icon created --- src/components/ui/VnLinkPhone.vue | 36 +++++++++++++++ src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Customer/Card/CustomerSummary.vue | 23 +++++++++- src/pages/Customer/CustomerList.vue | 10 ++++- src/pages/Ticket/Card/TicketDescriptor.vue | 1 + src/pages/Ticket/Card/TicketSummary.vue | 49 ++++++++++++++------- src/pages/Worker/Card/WorkerDescriptor.vue | 25 ++++++++++- src/pages/Worker/Card/WorkerSummary.vue | 40 +++++++++++------ 9 files changed, 152 insertions(+), 34 deletions(-) create mode 100644 src/components/ui/VnLinkPhone.vue diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue new file mode 100644 index 000000000..e17ffb158 --- /dev/null +++ b/src/components/ui/VnLinkPhone.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index d7519ba53..022c2eed1 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -36,6 +36,7 @@ export default { summary: { basicData: 'Basic data', }, + microsip: 'Open in MicroSIP', }, errors: { statusUnauthorized: 'Access denied', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index fc2c80f55..3e9dc5177 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -36,6 +36,7 @@ export default { summary: { basicData: 'Datos básicos', }, + microsip: 'Abrir en MicroSIP', }, errors: { statusUnauthorized: 'Acceso denegado', diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 081bdd157..e1b8fe4be 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -6,6 +6,7 @@ import { toCurrency, toPercentage, toDate } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; import { getUrl } from 'src/composables/getUrl'; import VnLv from 'src/components/ui/VnLv.vue'; +import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; const route = useRoute(); const { t } = useI18n(); @@ -68,8 +69,26 @@ const creditWarning = computed(() => { - - + + + + + + - + + + diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 05ccdc373..3badfcd35 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -8,6 +8,7 @@ import { getUrl } from 'src/composables/getUrl'; import VnLv from 'src/components/ui/VnLv.vue'; import WorkerDescriptorProxy from './WorkerDescriptorProxy.vue'; import { dashIfEmpty } from 'src/filters'; +import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; const route = useRoute(); const { t } = useI18n(); @@ -92,15 +93,27 @@ const filter = { - - - + + + + + + + + + @@ -110,10 +123,11 @@ const filter = { - + + + From 48b4fd96e5c2f8a9f0f0f92bab1888770a58cb09 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 6 Sep 2023 14:40:26 +0200 Subject: [PATCH 002/124] ref #6175 scheme url removed --- src/components/ui/VnLinkPhone.vue | 3 +-- src/pages/Customer/Card/CustomerSummary.vue | 12 ++---------- src/pages/Customer/CustomerList.vue | 5 +---- src/pages/Ticket/Card/TicketSummary.vue | 20 ++++---------------- src/pages/Worker/Card/WorkerDescriptor.vue | 13 ++----------- src/pages/Worker/Card/WorkerSummary.vue | 12 +++--------- 6 files changed, 13 insertions(+), 52 deletions(-) diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue index e17ffb158..712aaafc5 100644 --- a/src/components/ui/VnLinkPhone.vue +++ b/src/components/ui/VnLinkPhone.vue @@ -4,7 +4,6 @@ const props = defineProps({ phoneNumber: { type: [String, Number], default: null }, icon: { type: Boolean, default: true }, showNumber: { type: Boolean, default: true }, - schemeUrl: { type: String, default: 'tel' }, }); const { t } = useI18n(); @@ -22,7 +21,7 @@ const { t } = useI18n(); class="q-ml-xs" color="primary" padding="none" - :href="`${props.schemeUrl}:${props.phoneNumber}`" + :href="`sip:${props.phoneNumber}`" :title="t('globals.microsip')" @click.stop /> diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index e1b8fe4be..6b718932f 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -72,21 +72,13 @@ const creditWarning = computed(() => { diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 83f11f184..35734b5da 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -80,10 +80,7 @@ function viewSummary(id) { diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 7e322d7a2..997a26343 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -211,34 +211,22 @@ async function changeState(value) { diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 3badfcd35..95bbe2f6e 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -95,23 +95,17 @@ const filter = { From e4efffb33686e18b6112dac7ac11aaedecbcd943 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 7 Sep 2023 08:23:55 +0200 Subject: [PATCH 003/124] ref #6175 simplify the component --- src/components/ui/VnLinkPhone.vue | 37 +++++++-------------- src/pages/Customer/Card/CustomerSummary.vue | 4 +-- src/pages/Customer/CustomerList.vue | 2 ++ src/pages/Ticket/Card/TicketSummary.vue | 6 +++- src/pages/Worker/Card/WorkerDescriptor.vue | 4 +-- src/pages/Worker/Card/WorkerSummary.vue | 4 +++ 6 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue index 712aaafc5..ca005107b 100644 --- a/src/components/ui/VnLinkPhone.vue +++ b/src/components/ui/VnLinkPhone.vue @@ -2,34 +2,21 @@ import { useI18n } from 'vue-i18n'; const props = defineProps({ phoneNumber: { type: [String, Number], default: null }, - icon: { type: Boolean, default: true }, - showNumber: { type: Boolean, default: true }, }); const { t } = useI18n(); diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 6b718932f..6693274ac 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -72,13 +72,13 @@ const creditWarning = computed(() => { diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 35734b5da..286b659c5 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -10,6 +10,7 @@ import CustomerFilter from './CustomerFilter.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; +import { dashIfEmpty } from 'src/filters'; const stateStore = useStateStore(); const router = useRouter(); @@ -80,6 +81,7 @@ function viewSummary(id) { diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 997a26343..4d1fa4318 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -181,7 +181,7 @@ async function changeState(value) { diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 95bbe2f6e..f16835636 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -95,16 +95,19 @@ const filter = { @@ -119,6 +122,7 @@ const filter = { From 71d3f0c4c6c3f1c7d68758c8c4ca33309b39d875 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 7 Sep 2023 08:42:39 +0200 Subject: [PATCH 004/124] ref #6175 tests fixed --- test/cypress/integration/ClaimNotes.spec.js | 2 +- test/cypress/integration/workerList.spec.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/cypress/integration/ClaimNotes.spec.js b/test/cypress/integration/ClaimNotes.spec.js index 5b52dd339..0a0f28fe7 100644 --- a/test/cypress/integration/ClaimNotes.spec.js +++ b/test/cypress/integration/ClaimNotes.spec.js @@ -7,7 +7,7 @@ describe('ClaimNotes', () => { it('should add a new note', () => { const message = 'This is a new message.'; - cy.get('.q-page-sticky button').click(); + cy.get('.q-page-sticky > div > button').click(); cy.get('.q-dialog .q-card__section:nth-child(2)').type(message); cy.get('.q-card__actions button:nth-child(2)').click(); cy.get('.q-card .q-card__section:nth-child(2)') diff --git a/test/cypress/integration/workerList.spec.js b/test/cypress/integration/workerList.spec.js index d76958367..219633263 100644 --- a/test/cypress/integration/workerList.spec.js +++ b/test/cypress/integration/workerList.spec.js @@ -8,18 +8,18 @@ describe('WorkerList', () => { it('should load workers', () => { cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') .eq(0) - .should('have.text', 'victorvd'); - cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') - .eq(1) .should('have.text', 'JessicaJones'); cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') - .eq(2) + .eq(1) .should('have.text', 'BruceBanner'); + cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') + .eq(2) + .should('have.text', 'CharlesXavier'); }); it('should open the worker summary', () => { cy.get('.card-list-body .actions .q-btn:nth-child(2)').eq(1).click(); - cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones'); + cy.get('.summaryHeader div').should('have.text', '1109 - Bruce Banner'); cy.get('.summary .header').eq(0).invoke('text').should('include', 'Basic data'); cy.get('.summary .header').eq(1).should('have.text', 'User data'); }); From a4a62c8e3b0c80d59a7bb4bb464c37219247c65d Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 7 Sep 2023 09:27:23 +0200 Subject: [PATCH 005/124] ref #6175 match linkPhone --- src/components/ui/CardList.vue | 2 +- src/components/ui/VnLinkPhone.vue | 2 +- src/pages/Customer/CustomerList.vue | 7 +++---- src/pages/Ticket/Card/TicketSummary.vue | 24 ++++++++++++------------ src/pages/Worker/Card/WorkerSummary.vue | 24 ++++++++++++------------ 5 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/components/ui/CardList.vue b/src/components/ui/CardList.vue index ed1df7668..af2398ebd 100644 --- a/src/components/ui/CardList.vue +++ b/src/components/ui/CardList.vue @@ -32,7 +32,7 @@ const $props = defineProps({ gap: 2%; width: 50%; .label { - width: 30%; + width: 35%; color: var(--vn-label); overflow: hidden; text-overflow: ellipsis; diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue index ca005107b..4445b99c9 100644 --- a/src/components/ui/VnLinkPhone.vue +++ b/src/components/ui/VnLinkPhone.vue @@ -13,7 +13,7 @@ const { t } = useI18n(); icon="phone" size="sm" color="primary" - padding="xs" + padding="none" :href="`sip:${props.phoneNumber}`" :title="t('globals.microsip')" @click.stop diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 286b659c5..41512d12f 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -10,7 +10,6 @@ import CustomerFilter from './CustomerFilter.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; -import { dashIfEmpty } from 'src/filters'; const stateStore = useStateStore(); const router = useRouter(); @@ -79,9 +78,9 @@ function viewSummary(id) { - diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index af6999b5b..693d6fce2 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -105,7 +105,11 @@ async function search() { class="cursor-pointer" /> - + {{ props.info }} diff --git a/src/composables/useCamelCase.js b/src/composables/useCamelCase.js new file mode 100644 index 000000000..5285b022a --- /dev/null +++ b/src/composables/useCamelCase.js @@ -0,0 +1,3 @@ +export function useCamelCase(value) { + return value.replace(/[-_](.)/g, (_, char) => char.toUpperCase()); +} diff --git a/src/composables/useFirstUpper.js b/src/composables/useFirstUpper.js new file mode 100644 index 000000000..36378c05f --- /dev/null +++ b/src/composables/useFirstUpper.js @@ -0,0 +1,3 @@ +export function useFirstUpper(str) { + return str && str.charAt(0).toUpperCase() + str.substr(1); +} diff --git a/src/pages/Wagon/Card/WagonCard.vue b/src/pages/Wagon/Card/WagonCard.vue new file mode 100644 index 000000000..18ec121e3 --- /dev/null +++ b/src/pages/Wagon/Card/WagonCard.vue @@ -0,0 +1,29 @@ + + + + +es: + Search customer: Buscar cliente + You can search by customer id or name: Puedes buscar por id o nombre del cliente + diff --git a/src/pages/Wagon/Type/Card/WagonTypeCard.vue b/src/pages/Wagon/Type/Card/WagonTypeCard.vue new file mode 100644 index 000000000..a23122947 --- /dev/null +++ b/src/pages/Wagon/Type/Card/WagonTypeCard.vue @@ -0,0 +1,26 @@ + + + + +es: + Search customer: Buscar cliente + You can search by customer id or name: Puedes buscar por id o nombre del cliente + diff --git a/src/router/modules/route.js b/src/router/modules/route.js index a3550885c..acda898de 100644 --- a/src/router/modules/route.js +++ b/src/router/modules/route.js @@ -21,13 +21,13 @@ export default { redirect: { name: 'CmrList' }, children: [ { - path: 'cmr/list', + path: 'cmr', name: 'CmrList', meta: { title: 'cmrsList', icon: 'fact_check', }, - component: () => import('src/pages/Route/Cmr/CmrList.vue') + component: () => import('src/pages/Route/Cmr/CmrList.vue'), }, ], }, diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js index 02513d5a8..5a491cf1e 100644 --- a/src/router/modules/wagon.js +++ b/src/router/modules/wagon.js @@ -11,11 +11,11 @@ export default { redirect: { name: 'WagonMain' }, menus: { main: ['WagonList', 'WagonTypeList'], - card: [], + card: ['WagonEdit'], }, children: [ { - path: '/wagon', + path: '', name: 'WagonMain', component: () => import('src/pages/Wagon/WagonMain.vue'), redirect: { name: 'WagonList' }, @@ -27,7 +27,7 @@ export default { title: 'wagonsList', icon: 'vn:trolley', }, - component: () => import('src/pages/Wagon/WagonList.vue') + component: () => import('src/pages/Wagon/WagonList.vue'), }, { path: 'create', @@ -36,53 +36,78 @@ export default { title: 'wagonCreate', icon: 'create', }, - component: () => import('src/pages/Wagon/WagonCreate.vue') + component: () => import('src/pages/Wagon/WagonCreate.vue'), }, { - path: ':id/edit', + path: 'type', + name: 'WagonTypeMain', + meta: { + title: 'typesList', + icon: 'view_list', + }, + redirect: { name: 'WagonTypeList' }, + children: [ + { + path: 'list', + name: 'WagonTypeList', + meta: { + title: 'typesList', + icon: 'view_list', + }, + component: () => + import('src/pages/Wagon/Type/WagonTypeList.vue'), + }, + { + path: 'create', + name: 'WagonTypeCreate', + meta: { + title: 'typeCreate', + icon: 'create', + }, + component: () => + import('src/pages/Wagon/Type/WagonTypeCreate.vue'), + }, + { + path: ':id', + name: 'WagonTypeCard', + component: () => + import('src/pages/Wagon/Type/Card/WagonTypeCard.vue'), + redirect: { name: 'WagonTypeEdit' }, + children: [ + { + path: 'edit', + name: 'WagonTypeEdit', + meta: { + title: 'typeEdit', + icon: 'edit', + }, + component: () => + import( + 'src/pages/Wagon/Type/WagonTypeCreate.vue' + ), + }, + ], + }, + ], + }, + ], + }, + { + name: 'WagonCard', + path: ':id', + component: () => import('src/pages/Wagon/Card/WagonCard.vue'), + redirect: { name: 'WagonEdit' }, + children: [ + { + path: 'edit', name: 'WagonEdit', meta: { title: 'wagonEdit', icon: 'edit', }, - component: () => import('src/pages/Wagon/WagonCreate.vue') + component: () => import('src/pages/Wagon/WagonCreate.vue'), }, ], }, - { - path: '/wagon/type', - name: 'WagonTypeMain', - component: () => import('src/pages/Wagon/WagonMain.vue'), - redirect: { name: 'WagonTypeList' }, - children: [ - { - path: 'list', - name: 'WagonTypeList', - meta: { - title: 'typesList', - icon: 'view_list', - }, - component: () => import('src/pages/Wagon/Type/WagonTypeList.vue') - }, - { - path: 'create', - name: 'WagonTypeCreate', - meta: { - title: 'typeCreate', - icon: 'create', - }, - component: () => import('src/pages/Wagon/Type/WagonTypeCreate.vue') - }, - { - path: ':id/edit', - name: 'WagonTypeEdit', - meta: { - title: 'typeEdit', - icon: 'edit', - }, - component: () => import('src/pages/Wagon/Type/WagonTypeCreate.vue') - }, - ], - } ], }; diff --git a/test/cypress/integration/vnBreadCrumbs.spec.js b/test/cypress/integration/vnBreadCrumbs.spec.js new file mode 100644 index 000000000..9e17b6b80 --- /dev/null +++ b/test/cypress/integration/vnBreadCrumbs.spec.js @@ -0,0 +1,19 @@ +/// +describe('VnBreadCrumbs', () => { + beforeEach(() => { + cy.login('developer'); + cy.visit('/'); + }); + + it('should not be breadcrumbs', () => { + cy.get('.q-breadcrumbs').should('not.exist'); + }); + it('should get the correct breadcrumbs', () => { + cy.get('[href="#/customer"]').click(); + cy.get('.q-breadcrumbs .q-breadcrumbs--last').should('have.length', 1); + cy.get('.q-breadcrumbs .q-breadcrumbs--last').contains('Clientes'); + cy.get('.q-infinite-scroll > :nth-child(1)').click(); + cy.get('.q-breadcrumbs .q-breadcrumbs__el').should('have.length', 2); + cy.get('.q-breadcrumbs .q-breadcrumbs__el').eq(1).contains('Resumen'); + }); +}); diff --git a/test/cypress/integration/workerList.spec.js b/test/cypress/integration/workerList.spec.js index d76958367..8d4dd770d 100644 --- a/test/cypress/integration/workerList.spec.js +++ b/test/cypress/integration/workerList.spec.js @@ -8,17 +8,17 @@ describe('WorkerList', () => { it('should load workers', () => { cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') .eq(0) - .should('have.text', 'victorvd'); - cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') - .eq(1) .should('have.text', 'JessicaJones'); cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') - .eq(2) + .eq(1) .should('have.text', 'BruceBanner'); + cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') + .eq(2) + .should('have.text', 'CharlesXavier'); }); it('should open the worker summary', () => { - cy.get('.card-list-body .actions .q-btn:nth-child(2)').eq(1).click(); + cy.get('.card-list-body .actions .q-btn:nth-child(2)').eq(0).click(); cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones'); cy.get('.summary .header').eq(0).invoke('text').should('include', 'Basic data'); cy.get('.summary .header').eq(1).should('have.text', 'User data'); From b29d32679748f410e6e61a65d59fae34a2d5a2d8 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 13 Oct 2023 12:26:37 +0200 Subject: [PATCH 025/124] ref #6104 vnSelectFilter added --- src/components/common/VnLog.vue | 92 +++++++----------------- src/components/common/VnSelectFilter.vue | 5 +- test/cypress/integration/vnLog.spec.js | 4 +- 3 files changed, 30 insertions(+), 71 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 049613670..b0583b884 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -13,6 +13,7 @@ import VnAvatar from '../ui/VnAvatar.vue'; import VnJsonValue from '../common/VnJsonValue.vue'; import FetchData from '../FetchData.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import VnSelectFilter from './VnSelectFilter.vue'; const stateStore = useStateStore(); const validationsStore = useValidator(); @@ -120,7 +121,6 @@ const validDate = new RegExp( /T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/.source ); -const filteredActions = ref([]); const filteredWorkers = ref([]); function castJsonValue(value) { @@ -361,40 +361,13 @@ async function clearFilter() { changeInput.value = undefined; dateFrom.value = undefined; dateTo.value = undefined; + userRadio.value = undefined; Object.keys(checkboxOptions.value).forEach( (opt) => (checkboxOptions.value[opt].selected = false) ); await applyFilter(); } -function filterFn(val, update, abortFn, type) { - if (!val) { - update(() => { - if (type === 'actions') filteredActions.value = actions.value; - if (type === 'workers') filteredWorkers.value = workers.value; - }); - return; - } - - update(() => { - const needle = val.toLowerCase(); - if (type === 'actions') - filteredActions.value = actions.value.filter((item) => - validations[item].locale.name.includes(needle) - ); - if (type === 'workers') { - if (isNaN(needle)) - filteredWorkers.value = workers.value.filter( - (item) => - item.name.toLowerCase().includes(needle) || - item.nickname.toLowerCase().includes(needle) - ); - else - filteredWorkers.value = workers.value.filter((item) => item.id == needle); - } - }); -} - setLogTree(); - diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue index c9460bce6..b2c1eee0b 100644 --- a/src/pages/Customer/Card/CustomerBasicData.vue +++ b/src/pages/Customer/Card/CustomerBasicData.vue @@ -6,6 +6,7 @@ import { useI18n } from 'vue-i18n'; import { useSession } from 'src/composables/useSession'; import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; +import RowWrapper from 'components/RowWrapper.vue'; const route = useRoute(); const { t } = useI18n(); @@ -61,7 +62,7 @@ const filterOptions = {
@@ -317,11 +326,10 @@ async function updateDestinations(claimDestinationFk) { -