0
0
Fork 0

refactor: refs #7361 ticket/summary like salix

This commit is contained in:
Jon Elias 2024-05-10 12:00:16 +02:00
parent e3a36c0ab1
commit 071e6a7296
1 changed files with 45 additions and 10 deletions

View File

@ -13,6 +13,7 @@ import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue'; import VnTitle from 'src/components/common/VnTitle.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@ -262,15 +263,19 @@ async function changeState(value) {
:url="ticketUrl + 'sale'" :url="ticketUrl + 'sale'"
:text="t('ticket.summary.saleLines')" :text="t('ticket.summary.saleLines')"
/> />
<QTable :rows="ticket.sales"> <QTable :rows="ticket.sales" style="text-align: center">
<template #body-cell="{ value }">
<QTd>{{ value }}</QTd>
</template>
<template #header="props"> <template #header="props">
<QTr :props="props"> <QTr class="tr-header" :props="props">
<QTh auto-width></QTh> <QTh auto-width></QTh>
<QTh auto-width>{{ t('ticket.summary.item') }}</QTh> <QTh auto-width>{{ t('ticket.summary.item') }}</QTh>
<QTh auto-width>{{ t('ticket.summary.visible') }}</QTh> <QTh auto-width>{{ t('ticket.summary.visible') }}</QTh>
<QTh auto-width>{{ t('ticket.summary.available') }}</QTh> <QTh auto-width>{{ t('ticket.summary.available') }}</QTh>
<QTh auto-width>{{ t('ticket.summary.quantity') }}</QTh> <QTh auto-width>{{ t('ticket.summary.quantity') }}</QTh>
<QTh auto-width>{{ t('globals.description') }}</QTh> <QTh auto-width>{{ t('globals.description') }}</QTh>
<QTh auto-width></QTh>
<QTh auto-width>{{ t('ticket.summary.price') }}</QTh> <QTh auto-width>{{ t('ticket.summary.price') }}</QTh>
<QTh auto-width>{{ t('ticket.summary.discount') }}</QTh> <QTh auto-width>{{ t('ticket.summary.discount') }}</QTh>
<QTh auto-width>{{ t('globals.amount') }}</QTh> <QTh auto-width>{{ t('globals.amount') }}</QTh>
@ -360,23 +365,31 @@ async function changeState(value) {
</QTooltip> </QTooltip>
</QIcon> </QIcon>
</QTd> </QTd>
<QTd class="link">{{ props.row.itemFk }}</QTd> <QTd>
<QBtn class="link" flat>
{{ props.row.itemFk }}
<ItemDescriptorProxy :id="props.row.itemFk" />
</QBtn>
</QTd>
<QTd>{{ props.row.visible }}</QTd> <QTd>{{ props.row.visible }}</QTd>
<QTd>{{ props.row.available }}</QTd> <QTd>{{ props.row.available }}</QTd>
<QTd>{{ props.row.quantity }}</QTd> <QTd>{{ props.row.quantity }}</QTd>
<QTd> <QTd>
<div class="fetched-tags"> <span>
<span>{{ props.row.item.name }}</span> {{ props.row.item.name }}
<span v-if="props.row.item.subName" class="subName">{{ </span>
props.row.item.subName
}}</span>
</div>
<fetched-tags <fetched-tags
class="fetched-tags"
:item="props.row.item" :item="props.row.item"
:max-length="5" :max-length="5"
></fetched-tags> ></fetched-tags>
</QTd> </QTd>
<QTd>{{ props.row.price }}</QTd> <QTd>
<span v-if="props.row.item.subName" class="subName">
{{ props.row.item.subName.toUpperCase() }}
</span>
</QTd>
<QTd>{{ props.row.price }} </QTd>
<QTd>{{ props.row.discount }} %</QTd> <QTd>{{ props.row.discount }} %</QTd>
<QTd <QTd
>{{ >{{
@ -453,4 +466,26 @@ async function changeState(value) {
padding: 1%; padding: 1%;
} }
} }
.q-table {
tr,
th,
.q-td {
border-bottom: 1px solid black;
}
}
.tr-header {
color: var(--vn-label-color);
}
.subName {
color: var(--vn-label-color);
margin-left: -40%;
}
.fetched-tags {
width: 70%;
margin-left: 19%;
}
</style> </style>