2676-worker_time-control add timestamp url param #809
|
@ -83,7 +83,7 @@
|
||||||
"worker": "$ctrl.worker"
|
"worker": "$ctrl.worker"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"url": "/time-control",
|
"url": "/time-control?timestamp",
|
||||||
"state": "worker.card.timeControl",
|
"state": "worker.card.timeControl",
|
||||||
"component": "vn-worker-time-control",
|
"component": "vn-worker-time-control",
|
||||||
"description": "Time control",
|
"description": "Time control",
|
||||||
|
|
|
@ -91,6 +91,7 @@
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</div>
|
</div>
|
||||||
<vn-calendar
|
<vn-calendar
|
||||||
|
vn-id="calendar"
|
||||||
class="vn-pt-md"
|
class="vn-pt-md"
|
||||||
ng-model="$ctrl.date"
|
ng-model="$ctrl.date"
|
||||||
has-events="$ctrl.hasEvents($day)">
|
has-events="$ctrl.hasEvents($day)">
|
||||||
|
|
|
@ -15,7 +15,15 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
$postLink() {
|
$postLink() {
|
||||||
this.date = new Date();
|
const timestamp = this.$params.timestamp;
|
||||||
|
let initialDate = new Date();
|
||||||
|
|
||||||
|
if (timestamp) {
|
||||||
|
initialDate = new Date(timestamp * 1000);
|
||||||
|
this.$.calendar.defaultDate = initialDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.date = initialDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
get worker() {
|
get worker() {
|
||||||
|
|
Loading…
Reference in New Issue