5986-redisgnDescriptors #73

Merged
jorgep merged 12 commits from 5986-redisgnDescriptors into dev 2023-08-09 12:59:36 +00:00
2 changed files with 19 additions and 12 deletions
Showing only changes of commit eb95ff18ec - Show all commits

View File

@ -67,12 +67,7 @@ const filter = {
},
],
};
function stateColor(state) {
if (state.code === 'OK') return 'text-green';
if (state.code === 'FREE') return 'text-blue-3';
if (state.alertLevel === 1) return 'text-primary';
if (state.alertLevel === 0) return 'text-red';
}
const data = ref(useCardDescription());
const setData = (entity) =>
(data.value = useCardDescription(entity.client.name, entity.id));
@ -93,9 +88,15 @@ const setData = (entity) =>
<template #body="{ entity }">
<VnLv v-if="entity.ticketState" :label="t('ticket.card.state')">
<template #value>
<span :class="stateColor(entity.ticketState.state)">
<QBadge
:color="
entity.ticketState.state.classColor
? entity.ticketState.state.classColor
: 'dark'
"
>
{{ entity.ticketState.state.name }}
</span>
</QBadge>
</template>
</VnLv>
<VnLv :label="t('ticket.card.shipped')" :value="toDate(entity.shipped)" />

View File

@ -135,10 +135,16 @@ async function changeState(value) {
<QItemLabel caption>
{{ t('ticket.summary.state') }}
</QItemLabel>
<QItemLabel
:class="stateColor(ticket.ticketState.state)"
>
{{ ticket.ticketState.state.name }}
<QItemLabel>
<QBadge
:color="
ticket.ticketState.state.classColor
? ticket.ticketState.state.classColor
: 'dark'
"
>
{{ ticket.ticketState.state.name }}
</QBadge>
</QItemLabel>
</QItemSection>
</QItem>