fix: refs #7566 fixed summary cards and table
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-06-13 07:43:49 +02:00
parent 79e84175a6
commit fa55e33b54
3 changed files with 76 additions and 65 deletions

View File

@ -159,9 +159,9 @@ function existSummary(routes) {
margin-top: 2px; margin-top: 2px;
.label { .label {
color: var(--vn-label-color); color: var(--vn-label-color);
width: 8em; width: 9em;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: wrap;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-right: 10px; margin-right: 10px;
flex-grow: 0; flex-grow: 0;

View File

@ -306,10 +306,8 @@ const creditWarning = computed(() => {
:value="entity.recommendedCredit" :value="entity.recommendedCredit"
/> />
</QCard> </QCard>
<QCard> <QCard class="vn-one">
<div class="header"> <VnTitle :text="t('Latest tickets')" />
{{ t('Latest tickets') }}
</div>
<CustomerSummaryTable /> <CustomerSummaryTable />
</QCard> </QCard>
</template> </template>

View File

@ -171,67 +171,80 @@ const navigateToticketSummary = (id) => {
auto-load auto-load
url="Tickets" url="Tickets"
/> />
<QTable <QCard class="vn-one q-py-sm flex justify-between">
:columns="columns" <QTable
:pagination="{ rowsPerPage: 12 }" :columns="columns"
:rows="rows" :pagination="{ rowsPerPage: 12 }"
class="full-width q-mt-md" :rows="rows"
row-key="id" class="full-width"
v-if="rows?.length" row-key="id"
> v-if="rows?.length"
<template #body-cell="props"> >
<QTd :props="props" @click="navigateToticketSummary(props.row.id)"> <template #body-cell="props">
<QTr :props="props" class="cursor-pointer"> <QTd :props="props" @click="navigateToticketSummary(props.row.id)">
<component <QTr :props="props" class="cursor-pointer">
:is="tableColumnComponents[props.col.name].component" <component
@click="tableColumnComponents[props.col.name].event(props)" :is="tableColumnComponents[props.col.name].component"
class="rounded-borders q-pa-sm" @click="tableColumnComponents[props.col.name].event(props)"
v-bind="tableColumnComponents[props.col.name].props(props)" class="rounded-borders"
> v-bind="tableColumnComponents[props.col.name].props(props)"
<template
v-if="
props.col.name === 'id' ||
props.col.name === 'nickname' ||
props.col.name === 'agency' ||
props.col.name === 'route' ||
props.col.name === 'packages'
"
> >
{{ props.value }} <template
</template> v-if="
<template v-if="props.col.name === 'date'"> props.col.name === 'id' ||
<QBadge class="q-pa-sm" color="warning"> props.col.name === 'nickname' ||
{{ props.value }} props.col.name === 'agency' ||
</QBadge> props.col.name === 'route' ||
</template> props.col.name === 'packages'
<template v-if="props.col.name === 'state'"> "
<QBadge :color="setStateColor(props.row)" class="q-pa-sm">
{{ props.value }}
</QBadge>
</template>
<template v-if="props.col.name === 'total'">
<QBadge
:color="setTotalPriceColor(props.row)"
class="q-pa-sm"
v-if="setTotalPriceColor(props.row)"
> >
{{ toCurrency(props.value) }} <span
</QBadge> v-if="
<div v-else>{{ toCurrency(props.value) }}</div> props.col.name === 'nickname' ||
</template> props.col.name === 'route'
<CustomerDescriptorProxy "
:id="props.row.clientFk" class="link"
v-if="props.col.name === 'nickname'" >
/> {{ props.value }}
<RouteDescriptorProxy </span>
:id="props.row.routeFk" <span v-else>
v-if="props.col.name === 'route'" {{ props.value }}
/> </span>
</component> </template>
</QTr> <template v-if="props.col.name === 'date'">
</QTd> <QBadge class="q-pa-sm" color="warning">
</template> {{ props.value }}
</QTable> </QBadge>
</template>
<template v-if="props.col.name === 'state'">
<QBadge :color="setStateColor(props.row)" class="q-pa-sm">
{{ props.value }}
</QBadge>
</template>
<template v-if="props.col.name === 'total'">
<QBadge
:color="setTotalPriceColor(props.row)"
class="q-pa-sm"
v-if="setTotalPriceColor(props.row)"
>
{{ toCurrency(props.value) }}
</QBadge>
<div v-else>{{ toCurrency(props.value) }}</div>
</template>
<CustomerDescriptorProxy
:id="props.row.clientFk"
v-if="props.col.name === 'nickname'"
/>
<RouteDescriptorProxy
:id="props.row.routeFk"
v-if="props.col.name === 'route'"
/>
</component>
</QTr>
</QTd>
</template>
</QTable>
</QCard>
</template> </template>
<i18n> <i18n>