2020-05-15 10:17:34 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import Section from 'salix/components/section';
|
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
class Controller extends Section {
|
|
|
|
constructor($element, $, vnWeekDays) {
|
|
|
|
super($element, $);
|
2020-05-19 06:46:42 +00:00
|
|
|
this.days = vnWeekDays.days;
|
|
|
|
}
|
|
|
|
|
|
|
|
getWeekDay(jsonDate) {
|
|
|
|
const weekDay = new Date(jsonDate).getDay();
|
|
|
|
|
|
|
|
return this.days[weekDay].locale;
|
2020-05-15 10:17:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Controller.$inject = ['$element', '$scope', 'vnWeekDays'];
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnUpcomingDeliveries', {
|
2020-05-15 10:17:34 +00:00
|
|
|
template: require('./index.html'),
|
2020-05-19 06:46:42 +00:00
|
|
|
controller: Controller
|
2020-05-15 10:17:34 +00:00
|
|
|
});
|