2018-07-18 12:38:43 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-17 14:18:02 +00:00
|
|
|
import Section from 'salix/components/section';
|
2018-07-18 12:38:43 +00:00
|
|
|
|
2020-03-17 14:18:02 +00:00
|
|
|
export default class Controller extends Section {
|
2020-04-25 09:50:04 +00:00
|
|
|
preview(order) {
|
2018-11-19 07:42:29 +00:00
|
|
|
this.selectedOrder = order;
|
2019-02-15 11:39:21 +00:00
|
|
|
this.$.summary.show();
|
2018-07-18 12:38:43 +00:00
|
|
|
}
|
2020-06-30 06:32:04 +00:00
|
|
|
|
|
|
|
compareDate(date) {
|
|
|
|
let today = new Date();
|
|
|
|
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';
|
|
|
|
}
|
2018-07-18 12:38:43 +00:00
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnOrderIndex', {
|
2018-07-18 12:38:43 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|