From e6d6e63255b39916a59929f9b5eb2fcf60314f94 Mon Sep 17 00:00:00 2001 From: Bernat Date: Thu, 9 May 2019 14:40:59 +0200 Subject: [PATCH] 1413 ticket.summary refactor checkbox triple state --- modules/ticket/front/request/index/index.html | 3 ++- modules/ticket/front/request/index/index.js | 11 +++++++++++ modules/ticket/front/summary/index.html | 5 ++++- modules/ticket/front/summary/index.js | 11 +++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/request/index/index.html b/modules/ticket/front/request/index/index.html index 015aa0615..24dcd39f6 100644 --- a/modules/ticket/front/request/index/index.html +++ b/modules/ticket/front/request/index/index.html @@ -43,7 +43,7 @@ - {{::request.atender.user.nickname | dashIfEmpty}} @@ -63,6 +63,7 @@ diff --git a/modules/ticket/front/request/index/index.js b/modules/ticket/front/request/index/index.js index f1cef924b..2c8996760 100644 --- a/modules/ticket/front/request/index/index.js +++ b/modules/ticket/front/request/index/index.js @@ -67,6 +67,17 @@ class Controller { this.$.workerDescriptor.parent = event.target; this.$.workerDescriptor.show(); } + + getRequestState(state) { + switch (state) { + case null: + return 'New'; + case false: + return 'Denied'; + case true: + return 'Acepted'; + } + } } Controller.$inject = ['$scope', '$stateParams']; diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 866283a6a..0e6052d3d 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -184,8 +184,11 @@ + diff --git a/modules/ticket/front/summary/index.js b/modules/ticket/front/summary/index.js index 52ffa40cf..2bdbe7fef 100644 --- a/modules/ticket/front/summary/index.js +++ b/modules/ticket/front/summary/index.js @@ -84,6 +84,17 @@ class Controller { this.getSummary(); }); } + + getRequestState(state) { + switch (state) { + case null: + return 'New'; + case false: + return 'Denied'; + case true: + return 'Acepted'; + } + } } Controller.$inject = ['$scope', '$state', '$http', 'vnApp', '$translate'];