From 0882c3440d6f6cd85756f35c2dbf24142c41ea35 Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Fri, 1 Sep 2023 13:09:30 +0200 Subject: [PATCH 1/2] ref #6105 fix dialog --- src/components/common/SendEmailDialog.vue | 2 +- src/components/common/VnSmsDialog.vue | 2 +- src/components/ui/VnConfirm.vue | 2 +- src/components/ui/VnNotes.vue | 5 +++-- src/pages/Claim/Card/ClaimLinesImport.vue | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/common/SendEmailDialog.vue b/src/components/common/SendEmailDialog.vue index e4fefe00f..ab83c0949 100644 --- a/src/components/common/SendEmailDialog.vue +++ b/src/components/common/SendEmailDialog.vue @@ -40,7 +40,7 @@ async function confirm() { } </script> <template> - <QDialog ref="dialogRef" persistent> + <QDialog ref="dialogRef"> <QCard class="q-pa-sm"> <QCardSection class="row items-center q-pb-none"> <span class="text-h6 text-grey">{{ t('Send email notification') }}</span> diff --git a/src/components/common/VnSmsDialog.vue b/src/components/common/VnSmsDialog.vue index ef25bbf4a..7f019927e 100644 --- a/src/components/common/VnSmsDialog.vue +++ b/src/components/common/VnSmsDialog.vue @@ -83,7 +83,7 @@ async function send() { </script> <template> - <QDialog ref="dialogRef" persistent> + <QDialog ref="dialogRef"> <QCard class="q-pa-sm"> <QCardSection class="row items-center q-pb-none"> <span class="text-h6 text-grey"> diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index a371db970..f8715f685 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -51,7 +51,7 @@ async function confirm() { } </script> <template> - <QDialog ref="dialogRef" persistent> + <QDialog ref="dialogRef"> <QCard class="q-pa-sm"> <QCardSection class="row items-center q-pb-none"> <QAvatar diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index 2b652898a..f02551575 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -24,6 +24,7 @@ async function insert() { Object.assign(body, { text: newNote.value }); await axios.post($props.url, body); vnPaginateRef.value.fetch(); + newNote.value = ''; } </script> <template> @@ -71,7 +72,7 @@ async function insert() { @click="noteModal = true" /> </QPageSticky> - <QDialog v-model="noteModal" persistent> + <QDialog v-model="noteModal" @hide="newNote = ''"> <QCard> <QCardSection> <QItem class="q-px-none"> @@ -86,7 +87,7 @@ async function insert() { <QInput autofocus type="textarea" - :hint="t('Add note here...')" + :label="t('Add note here...')" filled size="lg" autogrow diff --git a/src/pages/Claim/Card/ClaimLinesImport.vue b/src/pages/Claim/Card/ClaimLinesImport.vue index fad1ac3af..26e59bbc0 100644 --- a/src/pages/Claim/Card/ClaimLinesImport.vue +++ b/src/pages/Claim/Card/ClaimLinesImport.vue @@ -103,7 +103,7 @@ function cancel() { @on-fetch="(data) => (claimableSales = data)" auto-load /> - <QDialog ref="dialogRef" persistent> + <QDialog ref="dialogRef"> <QCard> <QCardSection class="row items-center"> <span class="text-h6 text-grey">{{ t('Available sales lines') }}</span> From a7cea458a296370d9c5c730969d03c711f1a3eb2 Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Fri, 1 Sep 2023 13:42:53 +0200 Subject: [PATCH 2/2] ref #6105 fix test --- test/cypress/integration/workerList.spec.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/cypress/integration/workerList.spec.js b/test/cypress/integration/workerList.spec.js index 7a6c1d84d..d76958367 100644 --- a/test/cypress/integration/workerList.spec.js +++ b/test/cypress/integration/workerList.spec.js @@ -6,19 +6,19 @@ describe('WorkerList', () => { }); it('should load workers', () => { - cy.get('.list-items > .vn-label-value:nth-child(2) > .value') + cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') .eq(0) - .should('have.text', 'JessicaJones'); - cy.get('.list-items > .vn-label-value:nth-child(2) > .value') + .should('have.text', 'victorvd'); + cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') .eq(1) - .should('have.text', 'BruceBanner'); - cy.get('.list-items > .vn-label-value:nth-child(2) > .value') + .should('have.text', 'JessicaJones'); + cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span') .eq(2) - .should('have.text', 'CharlesXavier'); + .should('have.text', 'BruceBanner'); }); it('should open the worker summary', () => { - cy.get('.card-list-body .actions .q-btn:nth-child(2)').eq(0).click(); + 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('.summary .header').eq(0).invoke('text').should('include', 'Basic data'); cy.get('.summary .header').eq(1).should('have.text', 'User data');