From 0b2c91466e49083cbda0911caf7e1d063062914c Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 8 May 2023 13:25:42 +0200 Subject: [PATCH 1/6] refs #5648 create vn-confirm --- modules/ticket/front/sale/index.html | 9 ++++++++- modules/ticket/front/sale/index.js | 4 ++++ modules/ticket/front/sale/locale/es.yml | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 6c37230ae..2a0c827c7 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -481,12 +481,19 @@ on-accept="$ctrl.transferSales($ctrl.transfer.ticketId)"> + + + - +¡ + = this.ticketConfig[0].daysForWarningClaim) this.$.claimConfirm.show(); diff --git a/modules/ticket/front/sale/locale/es.yml b/modules/ticket/front/sale/locale/es.yml index bb61db824..6eb558a56 100644 --- a/modules/ticket/front/sale/locale/es.yml +++ b/modules/ticket/front/sale/locale/es.yml @@ -42,3 +42,4 @@ Claim mana: Maná reclamación History: Historial Do you want to continue?: ¿Desea continuar? Claim out of time: Reclamación fuera de plazo +Do you want to create a claim?: ¿Quieres crear una reclamación? \ No newline at end of file From 23287e5ebf0c7ad268fdf141234199577807377a Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 22 May 2023 08:30:23 +0200 Subject: [PATCH 2/6] refs #5648 setTimeout --- modules/ticket/front/sale/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 3b359ac23..f10d7df92 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -193,18 +193,18 @@ class Controller extends Section { }); } - sureClaim() { - - } createClaim() { - const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime(); - const pastDays = Math.floor(timeDifference / 86400000); this.$.claimSure.show(); - if (pastDays >= this.ticketConfig[0].daysForWarningClaim) - this.$.claimConfirm.show(); - else - this.onCreateClaimAccepted(); + setTimeout(() => { + const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime(); + const pastDays = Math.floor(timeDifference / 86400000); + + if (pastDays >= this.ticketConfig[0].daysForWarningClaim) + this.$.claimConfirm.show(); + else + this.onCreateClaimAccepted(); + }, 10000000); } onCreateClaimAccepted() { From 1b19035d8d5de812da2acdf791c8904fb242f6a5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 22 May 2023 10:41:02 +0200 Subject: [PATCH 3/6] refs #5648 vn-confirm --- modules/ticket/front/sale/index.html | 22 +++++++++++++--------- modules/ticket/front/sale/index.js | 16 ++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 2a0c827c7..200c23ddc 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -481,18 +481,21 @@ on-accept="$ctrl.transferSales($ctrl.transfer.ticketId)"> - - + -¡ + + + + + @@ -514,11 +517,12 @@ - Add claim - + Add claim + + { - const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime(); - const pastDays = Math.floor(timeDifference / 86400000); - - if (pastDays >= this.ticketConfig[0].daysForWarningClaim) - this.$.claimConfirm.show(); - else - this.onCreateClaimAccepted(); - }, 10000000); + if (pastDays >= this.ticketConfig[0].daysForWarningClaim) + this.$.claimConfirm.show(); + else + this.onCreateClaimAccepted(); } onCreateClaimAccepted() { From 9bc20493fe6dd0be88666cd4b41fd8aa65880cb6 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 22 May 2023 12:02:07 +0200 Subject: [PATCH 4/6] #refs #5648 e2e fix --- e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js | 1 + modules/ticket/front/sale/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index 2c9646708..2158eec8b 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -251,6 +251,7 @@ describe('Ticket Edit sale path', () => { await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim); await page.waitToClick(selectors.globalItems.acceptButton); + await page.waitToClick(selectors.globalItems.acceptButton); await page.waitForState('claim.card.basicData'); }); diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 200c23ddc..7b5c1cd1a 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -494,7 +494,7 @@ +on-accept="$ctrl.createClaim()"> From 6d147e7af7a1592d51945565f46707a789341ba1 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 22 May 2023 14:30:04 +0200 Subject: [PATCH 5/6] refs #5648 fix spaces --- modules/ticket/front/sale/index.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 7b5c1cd1a..4d7e43b5e 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -481,8 +481,6 @@ on-accept="$ctrl.transferSales($ctrl.transfer.ticketId)"> - - - - Date: Mon, 22 May 2023 15:56:14 +0200 Subject: [PATCH 6/6] refs #5648 spaces fix2 --- modules/ticket/front/sale/index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 4d7e43b5e..b2c0db18d 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -489,9 +489,9 @@ + vn-id="claimSure" + message="Do you want to create a claim?" + on-accept="$ctrl.createClaim()"> @@ -517,8 +517,6 @@ on-accept="$ctrl.createClaim()"> ng-if="$ctrl.isClaimable"> Add claim - -