29 lines
687 B
JavaScript
29 lines
687 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
export default class Controller extends Section {
|
|
preview(order) {
|
|
this.selectedOrder = order;
|
|
this.$.summary.show();
|
|
}
|
|
|
|
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';
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnOrderIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|