forked from verdnatura/salix-front
refs #5987 refactor descriptors and VnLv
This commit is contained in:
parent
b98179563e
commit
7940d1702b
|
@ -125,7 +125,7 @@ watch($props, async () => {
|
|||
</QItemLabel>
|
||||
<QItem dense>
|
||||
<QItemLabel class="text-subtitle2 text-white" caption>
|
||||
#{{ $props.subtitle ? $props.subtitle : entity.id }}
|
||||
#{{ $props.subtitle ?? entity.id }}
|
||||
</QItemLabel>
|
||||
</QItem>
|
||||
</QList>
|
||||
|
|
|
@ -13,7 +13,9 @@ const isBooleanValue = computed(() => typeof $props.value === 'boolean');
|
|||
<template>
|
||||
<div class="vn-label-value">
|
||||
<div v-if="$props.label || $slots.label" class="label">
|
||||
<slot name="label"> {{ $props.label }}</slot>
|
||||
<slot name="label">
|
||||
<span>{{ $props.label }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
<div v-if="$props.value || $slots.value" class="value">
|
||||
<span v-if="isBooleanValue">
|
||||
|
@ -22,9 +24,9 @@ const isBooleanValue = computed(() => typeof $props.value === 'boolean');
|
|||
:color="$props.value ? `positive` : `negative`"
|
||||
/>
|
||||
</span>
|
||||
<span v-else>
|
||||
<slot name="value">{{ $props.value }}</slot>
|
||||
</span>
|
||||
<slot v-else name="value">
|
||||
<span :title="$props.value">{{ $props.value }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
<div class="info" v-if="$props.info">
|
||||
<QIcon name="info">
|
||||
|
|
|
@ -88,13 +88,7 @@ const setData = (entity) =>
|
|||
<template #body="{ entity }">
|
||||
<VnLv v-if="entity.ticketState" :label="t('ticket.card.state')">
|
||||
<template #value>
|
||||
<QBadge
|
||||
:color="
|
||||
entity.ticketState.state.classColor
|
||||
? entity.ticketState.state.classColor
|
||||
: 'dark'
|
||||
"
|
||||
>
|
||||
<QBadge :color="entity.ticketState.state.classColor ?? 'dark'">
|
||||
{{ entity.ticketState.state.name }}
|
||||
</QBadge>
|
||||
</template>
|
||||
|
|
|
@ -106,11 +106,7 @@ function viewSummary(id) {
|
|||
</QItemLabel>
|
||||
<QItemLabel>
|
||||
<QBadge
|
||||
:color="
|
||||
row.classColor
|
||||
? row.classColor
|
||||
: 'dark'
|
||||
"
|
||||
:color="row.classColor ?? 'dark'"
|
||||
class="q-ma-none"
|
||||
dense
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue