Refactor #1627 worker.timeControl
This commit is contained in:
parent
3d88d41bd0
commit
7e1eba53f1
|
@ -27,7 +27,7 @@
|
||||||
icon="arrow_{{($index % 2) == 0 ? 'forward' : 'back'}}"
|
icon="arrow_{{($index % 2) == 0 ? 'forward' : 'back'}}"
|
||||||
title="{{(($index % 2) == 0 ? 'In' : 'Out') | translate}}">
|
title="{{(($index % 2) == 0 ? 'In' : 'Out') | translate}}">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
<span class="chip notice">{{hour.timed | dateTime: 'HH:mm'}}</span>
|
<span class="chip {{$ctrl.hourColor(hour)}}">{{hour.timed | dateTime: 'HH:mm'}}</span>
|
||||||
</section>
|
</section>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
|
|
|
@ -112,6 +112,12 @@ class Controller {
|
||||||
this.weekDays = weekdays;
|
this.weekDays = weekdays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hourColor(weekDay) {
|
||||||
|
if (weekDay.manual)
|
||||||
|
return 'alert';
|
||||||
|
|
||||||
|
return 'warning';
|
||||||
|
}
|
||||||
get weekOffset() {
|
get weekOffset() {
|
||||||
const timed = this.defaultDate;
|
const timed = this.defaultDate;
|
||||||
const weekDay = timed.getDay() == 0 ? 7 : timed.getDay();
|
const weekDay = timed.getDay() == 0 ? 7 : timed.getDay();
|
||||||
|
|
Loading…
Reference in New Issue