Merge branch '2020-worker_index' of verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-02-03 13:10:46 +00:00 committed by Gitea
commit e55645486a
2 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,11 @@
</vn-label-value>
</vn-item-section>
<vn-item-section side>
<vn-icon-button
ng-click="$ctrl.goToTimeControl($event, worker.id)"
vn-tooltip="Preview"
icon="access_time">
</vn-icon-button>
<vn-icon-button
ng-click="$ctrl.preview($event, worker)"
vn-tooltip="Preview"

View File

@ -18,6 +18,7 @@ export default class Controller {
preview(event, worker) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
@ -25,6 +26,14 @@ export default class Controller {
this.$.preview.show();
}
goToTimeControl(event, workerId) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
this.$state.go('worker.card.timeControl', {id: workerId}, {absolute: true});
}
onMoreChange(callback) {
callback.call(this);
}