From c23c10dd5a0715c5eff1151458a9d81dc821b5d3 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 28 Nov 2023 12:28:37 +0100 Subject: [PATCH] Revert "revert merge from dev" This reverts commit e026d487c72a39e770be85b27e819e1d28b264f1. --- modules/ticket/front/advance/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/ticket/front/advance/index.js b/modules/ticket/front/advance/index.js index 950b260b0..8325a9ae1 100644 --- a/modules/ticket/front/advance/index.js +++ b/modules/ticket/front/advance/index.js @@ -89,6 +89,20 @@ export default class Controller extends Section { return 'success'; } + compareDate(date) { + let today = Date.vnNew(); + today.setHours(0, 0, 0, 0); + let timeTicket = new Date(date); + timeTicket.setHours(0, 0, 0, 0); + + let comparation = today - timeTicket; + + if (comparation == 0) + return 'warning'; + if (comparation < 0) + return 'success'; + } + get checked() { const tickets = this.$.model.data || []; const checkedLines = [];