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 = [];