Updated claim state field
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2023-02-24 14:32:56 +01:00
parent 335f259eba
commit 1bc715cde5
3 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -52,8 +52,8 @@
</span>
</td>
<td>
<span class="chip {{::$ctrl.stateColor(claim)}}">
{{::claim.description}}
<span class="chip {{::$ctrl.stateColor(claim.stateCode)}}">
{{::claim.stateDescription}}
</span>
</td>
<td shrink>

View File

@ -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';
}
}