From 3a3ae14dc54153a8a0c3b9836456f323eacd6bf3 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 31 Aug 2023 09:05:21 +0200 Subject: [PATCH 01/89] 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 02/89] 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 03/89] 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 04/89] 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 05/89] 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) {