24 lines
563 B
JavaScript
24 lines
563 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
import './style.scss';
|
|
|
|
class Controller extends Section {
|
|
constructor($element, $, vnWeekDays) {
|
|
super($element, $);
|
|
this.days = vnWeekDays.days;
|
|
}
|
|
|
|
getWeekDay(jsonDate) {
|
|
const weekDay = new Date(jsonDate).getDay();
|
|
|
|
return this.days[weekDay].locale;
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$element', '$scope', 'vnWeekDays'];
|
|
|
|
ngModule.component('vnUpcomingDeliveries', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|