4856-worker.time-control #1375

Merged
joan merged 32 commits from 4856-worker.time-control into dev 2023-03-16 06:39:02 +00:00
3 changed files with 4 additions and 7 deletions
Showing only changes of commit 4dc9e9e590 - Show all commits

View File

@ -159,8 +159,6 @@ export default class Calendar extends FormInput {
this.repaint();
this.emit('move', {$date: date});
this.getMailStates({$day: date});
}
vicent marked this conversation as resolved Outdated
Outdated
Review

Esta funció pareix específica de la secció que estás modificant. Calendar es un component genéric i deu de ser agnóstic al funcionament de la secció WorkerTimeControl

Esta funció pareix específica de la secció que estás modificant. Calendar es un component genéric i deu de ser agnóstic al funcionament de la secció WorkerTimeControl
/*
@ -237,7 +235,6 @@ ngModule.vnComponent('vnCalendar', {
bindings: {
defaultDate: '=?',
hasEvents: '&?',
getMailStates: '&?',
getClass: '&?',
formatDay: '&?',
formatWeek: '&?',

View File

@ -123,7 +123,7 @@
class="vn-pt-md"
ng-model="$ctrl.date"
format-week="$ctrl.formatWeek($element)"
get-mail-states="$ctrl.getMailStates($day)"
on-move="$ctrl.getMailStates($date)"
has-events="$ctrl.hasEvents($day)">
</vn-calendar>
</div>

View File

@ -421,10 +421,10 @@ class Controller extends Section {
return [parseInt(hours), parseInt(minutes), parseInt(seconds)];
}
getMailStates(day) {
getMailStates(date) {
const params = {
month: day.getMonth() + 1,
year: day.getFullYear()
month: date.getMonth() + 1,
year: date.getFullYear()
};
const query = `WorkerTimeControls/${this.$params.id}/getMailStates`;
this.$http.get(query, {params})