From d2359af6ba99a5363f50e3aac46983e2fe275d6f Mon Sep 17 00:00:00 2001 From: gerard Date: Thu, 26 Jul 2018 14:02:23 +0200 Subject: [PATCH] added client descriptor popover to ticket descriptor --- client/salix/src/styles/misc.scss | 2 +- client/ticket/src/descriptor/index.html | 21 ++++++++++++--------- client/ticket/src/descriptor/index.js | 17 +++++++++++++++-- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss index 3099607f8..b97470b86 100644 --- a/client/salix/src/styles/misc.scss +++ b/client/salix/src/styles/misc.scss @@ -20,7 +20,7 @@ input[type=reset]::-moz-focus-inner .link{ text-decoration: underline; &:hover{ - color: $main-01; + color: $main-01!important; } } diff --git a/client/ticket/src/descriptor/index.html b/client/ticket/src/descriptor/index.html index 2b09180fc..e7a8a37cf 100644 --- a/client/ticket/src/descriptor/index.html +++ b/client/ticket/src/descriptor/index.html @@ -9,30 +9,32 @@
-
{{$ctrl.client.name}}
+
{{::$ctrl.client.name}}
+ value="{{::$ctrl.ticket.id}}"> + class="link" + ng-click="$ctrl.showDescriptor($event, $ctrl.ticket.client.id)" + value="{{::$ctrl.ticket.client.name}}"> + value="{{::$ctrl.ticket.tracking.state.name}}"> + value="{{::$ctrl.ticket.client.salesPerson.firstName}} {{::$ctrl.ticket.client.salesPerson.name}}"> + value="{{::$ctrl.ticket.shipped | date: 'dd/MM/yyyy HH:mm' }}"> + value="{{::$ctrl.ticket.agencyMode.name}}"> + value="{{::$ctrl.ticket.warehouse.name}}"> + value="{{::$ctrl.ticket.nickname}}">
@@ -58,3 +60,4 @@ + \ No newline at end of file diff --git a/client/ticket/src/descriptor/index.js b/client/ticket/src/descriptor/index.js index a1364bda8..0023c144c 100644 --- a/client/ticket/src/descriptor/index.js +++ b/client/ticket/src/descriptor/index.js @@ -2,7 +2,8 @@ import ngModule from '../module'; class Controller { - constructor($http) { + constructor($http, $scope) { + this.$ = $scope; this.$http = $http; } @@ -12,13 +13,25 @@ class Controller { }); } + showDescriptor(event, clientFk) { + this.$.descriptor.clientFk = clientFk; + this.$.descriptor.parent = event.target; + this.$.descriptor.show(); + event.preventDefault(); + event.stopImmediatePropagation(); + } + + onDescriptorLoad() { + this.$.popover.relocate(); + } + $onChanges() { if (this.ticket) this.getClientDebt(this.ticket.clientFk); } } -Controller.$inject = ['$http']; +Controller.$inject = ['$http', '$scope']; ngModule.component('vnTicketDescriptor', { template: require('./index.html'),