0
0
Fork 0

feat: change QBadge color

This commit is contained in:
Javier Segarra 2024-08-27 12:13:49 +02:00
parent 61c7c622f7
commit 452b084caf
1 changed files with 7 additions and 1 deletions

View File

@ -48,15 +48,18 @@ const columns = computed(() => [
align: 'left', align: 'left',
label: t('Nickname'), label: t('Nickname'),
name: 'nickname', name: 'nickname',
columnClass: 'expand',
}, },
{ {
align: 'left', align: 'left',
format: (row) => row.agencyMode.name, format: (row) => row.agencyMode.name,
columnClass: 'expand',
label: t('Agency'), label: t('Agency'),
}, },
{ {
align: 'left', align: 'left',
name: 'routeFk', name: 'routeFk',
columnClass: 'shrink',
label: t('Route'), label: t('Route'),
}, },
{ {
@ -64,6 +67,7 @@ const columns = computed(() => [
field: 'packages', field: 'packages',
label: t('Packages'), label: t('Packages'),
name: 'packages', name: 'packages',
columnClass: 'shrink',
}, },
{ {
align: 'left', align: 'left',
@ -169,8 +173,8 @@ const setShippedColor = (date) => {
class="q-pa-sm" class="q-pa-sm"
v-if="setTotalPriceColor(row)" v-if="setTotalPriceColor(row)"
:color="setTotalPriceColor(row)" :color="setTotalPriceColor(row)"
text-color="black"
> >
<!-- {{ setTotalPriceColor(row) }} -->
{{ toCurrency(row.totalWithVat) }} {{ toCurrency(row.totalWithVat) }}
</QBadge> </QBadge>
<span v-else> {{ toCurrency(row.totalWithVat) }}</span> <span v-else> {{ toCurrency(row.totalWithVat) }}</span>
@ -185,6 +189,7 @@ const setShippedColor = (date) => {
<QBadge <QBadge
class="q-pa-sm" class="q-pa-sm"
:color="setStateColor(row)" :color="setStateColor(row)"
text-color="black"
v-else-if="setStateColor(row)" v-else-if="setStateColor(row)"
> >
{{ row?.ticketState?.state.name }} {{ row?.ticketState?.state.name }}
@ -195,6 +200,7 @@ const setShippedColor = (date) => {
<QBadge <QBadge
class="q-pa-sm" class="q-pa-sm"
:color="setShippedColor(row.shipped)" :color="setShippedColor(row.shipped)"
text-color="black"
v-if="setShippedColor(row.shipped)" v-if="setShippedColor(row.shipped)"
> >
{{ toDateFormat(row.shipped) }} {{ toDateFormat(row.shipped) }}