add icon in worker.index
gitea/salix/2020-worker_index This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-02-03 14:03:09 +01:00
parent 5d56ed8f88
commit 759ac5b5c7
2 changed files with 14 additions and 0 deletions

View File

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

View File

@ -18,6 +18,7 @@ export default class Controller {
preview(event, worker) { preview(event, worker) {
if (event.defaultPrevented) return; if (event.defaultPrevented) return;
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
@ -25,6 +26,14 @@ export default class Controller {
this.$.preview.show(); 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) { onMoreChange(callback) {
callback.call(this); callback.call(this);
} }