salix/modules/zone/front/upcoming-deliveries/index.js

24 lines
565 B
JavaScript
Raw Normal View History

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'];
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
});