refs #4856 refactor: make agnostic the component calendar
This commit is contained in:
parent
1693907ee0
commit
4dc9e9e590
|
@ -159,8 +159,6 @@ export default class Calendar extends FormInput {
|
||||||
|
|
||||||
this.repaint();
|
this.repaint();
|
||||||
this.emit('move', {$date: date});
|
this.emit('move', {$date: date});
|
||||||
|
|
||||||
this.getMailStates({$day: date});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -237,7 +235,6 @@ ngModule.vnComponent('vnCalendar', {
|
||||||
bindings: {
|
bindings: {
|
||||||
defaultDate: '=?',
|
defaultDate: '=?',
|
||||||
hasEvents: '&?',
|
hasEvents: '&?',
|
||||||
getMailStates: '&?',
|
|
||||||
getClass: '&?',
|
getClass: '&?',
|
||||||
formatDay: '&?',
|
formatDay: '&?',
|
||||||
formatWeek: '&?',
|
formatWeek: '&?',
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
class="vn-pt-md"
|
class="vn-pt-md"
|
||||||
ng-model="$ctrl.date"
|
ng-model="$ctrl.date"
|
||||||
format-week="$ctrl.formatWeek($element)"
|
format-week="$ctrl.formatWeek($element)"
|
||||||
get-mail-states="$ctrl.getMailStates($day)"
|
on-move="$ctrl.getMailStates($date)"
|
||||||
has-events="$ctrl.hasEvents($day)">
|
has-events="$ctrl.hasEvents($day)">
|
||||||
</vn-calendar>
|
</vn-calendar>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -421,10 +421,10 @@ class Controller extends Section {
|
||||||
return [parseInt(hours), parseInt(minutes), parseInt(seconds)];
|
return [parseInt(hours), parseInt(minutes), parseInt(seconds)];
|
||||||
}
|
}
|
||||||
|
|
||||||
getMailStates(day) {
|
getMailStates(date) {
|
||||||
const params = {
|
const params = {
|
||||||
month: day.getMonth() + 1,
|
month: date.getMonth() + 1,
|
||||||
year: day.getFullYear()
|
year: date.getFullYear()
|
||||||
};
|
};
|
||||||
const query = `WorkerTimeControls/${this.$params.id}/getMailStates`;
|
const query = `WorkerTimeControls/${this.$params.id}/getMailStates`;
|
||||||
this.$http.get(query, {params})
|
this.$http.get(query, {params})
|
||||||
|
|
Loading…
Reference in New Issue