From 1bc715cde51d4abbd6e715a2a4234c477e15d39b Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 24 Feb 2023 14:32:56 +0100 Subject: [PATCH] Updated claim state field --- modules/claim/back/methods/claim/filter.js | 3 ++- modules/claim/front/index/index.html | 4 ++-- modules/claim/front/index/index.js | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/claim/back/methods/claim/filter.js b/modules/claim/back/methods/claim/filter.js index d653229e5..2daee6413 100644 --- a/modules/claim/back/methods/claim/filter.js +++ b/modules/claim/back/methods/claim/filter.js @@ -166,7 +166,8 @@ module.exports = Self => { c.name AS clientName, cl.workerFk, u.name AS workerName, - cs.description, + cs.code stateCode, + cs.description stateDescription, cl.created FROM claim cl LEFT JOIN client c ON c.id = cl.clientFk diff --git a/modules/claim/front/index/index.html b/modules/claim/front/index/index.html index 102e27245..6b2481429 100644 --- a/modules/claim/front/index/index.html +++ b/modules/claim/front/index/index.html @@ -52,8 +52,8 @@ - - {{::claim.description}} + + {{::claim.stateDescription}} diff --git a/modules/claim/front/index/index.js b/modules/claim/front/index/index.js index 084618e16..e3fdabf79 100644 --- a/modules/claim/front/index/index.js +++ b/modules/claim/front/index/index.js @@ -55,13 +55,13 @@ class Controller extends Section { } } - stateColor(claim) { - switch (claim.description) { - case 'Pendiente': + stateColor(code) { + switch (code) { + case 'pending': return 'warning'; - case 'Gestionado': + case 'managed': return 'notice'; - case 'Resuelto': + case 'resolved': return 'success'; } }