From c31eee4906a53eb7eda4a8123b120b7f26684671 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 17 May 2023 13:35:55 +0200 Subject: [PATCH 1/3] refs #5696 landed --- modules/ticket/front/sale/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 24b077476..8ae9a53e4 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -194,7 +194,7 @@ class Controller extends Section { } createClaim() { - const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime(); + const timeDifference = new Date().getTime() - new Date(this.ticket.landed).getTime(); const pastDays = Math.floor(timeDifference / 86400000); if (pastDays >= this.ticketConfig[0].daysForWarningClaim) From 69a25d8d0342980e8e4ed613300dd2b7a1b25a62 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 17 May 2023 14:04:13 +0200 Subject: [PATCH 2/3] refs #5696 horas a 00 --- modules/ticket/front/sale/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 8ae9a53e4..5a927d724 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -194,12 +194,18 @@ class Controller extends Section { } createClaim() { - const timeDifference = new Date().getTime() - new Date(this.ticket.landed).getTime(); + const today = new Date(); + today.setHours(0, 0, 0, 0); + const timeDifference = today.getTime() - new Date(this.ticket.landed).getTime(); + const pastDays = Math.floor(timeDifference / 86400000); if (pastDays >= this.ticketConfig[0].daysForWarningClaim) + this.$.claimConfirm.show(); + else + this.onCreateClaimAccepted(); } From 02451818efb61677e502cb88d32dbb58d554a939 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 17 May 2023 14:31:19 +0200 Subject: [PATCH 3/3] typo --- modules/ticket/front/sale/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 5a927d724..b7cdc22b9 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -201,11 +201,8 @@ class Controller extends Section { const pastDays = Math.floor(timeDifference / 86400000); if (pastDays >= this.ticketConfig[0].daysForWarningClaim) - this.$.claimConfirm.show(); - else - this.onCreateClaimAccepted(); }