From 1769b0384622801e55048e03cbb0f400429384b2 Mon Sep 17 00:00:00 2001 From: Bernat Date: Wed, 22 May 2019 07:50:08 +0200 Subject: [PATCH] 1457 client.sample.index --- modules/client/front/sample/index/index.html | 16 ++++++++++++++-- modules/client/front/sample/index/index.js | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/modules/client/front/sample/index/index.html b/modules/client/front/sample/index/index.html index 7420cd14b..48543d135 100644 --- a/modules/client/front/sample/index/index.html +++ b/modules/client/front/sample/index/index.html @@ -23,8 +23,16 @@ {{::sample.created | dateTime:'dd/MM/yyyy HH:mm' }} - {{::sample.type.description}} - {{::sample.worker.user.nickname}} + + {{::sample.type.description}} + + + + {{::sample.worker.user.nickname}} + + {{::sample.company.code}} @@ -33,6 +41,10 @@ + + diff --git a/modules/client/front/sample/index/index.js b/modules/client/front/sample/index/index.js index 646544eb6..4ce12e27c 100644 --- a/modules/client/front/sample/index/index.js +++ b/modules/client/front/sample/index/index.js @@ -1,7 +1,8 @@ import ngModule from '../../module'; class Controller { - constructor($stateParams) { + constructor($scope, $stateParams) { + this.$ = $scope; this.$stateParams = $stateParams; this.filter = { include: [ @@ -32,9 +33,19 @@ class Controller { ] }; } + showWorkerDescriptor(event, workerFk) { + if (event.defaultPrevented) return; + + event.preventDefault(); + event.stopImmediatePropagation(); + + this.selectedWorker = workerFk; + this.$.workerDescriptor.parent = event.target; + this.$.workerDescriptor.show(); + } } -Controller.$inject = ['$stateParams']; +Controller.$inject = ['$scope', '$stateParams']; ngModule.component('vnClientSampleIndex', { template: require('./index.html'),