forked from verdnatura/salix-front
Merge pull request 'refactor: refs #7361 ticket/summary like salix' (!368) from 7361-TicketSummaryRefactor into dev
Reviewed-on: verdnatura/salix-front#368 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
bfbe71c63e
|
@ -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,9 +263,12 @@ 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>
|
||||||
|
@ -360,23 +364,29 @@ 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 class="description-cell">
|
||||||
<div class="fetched-tags">
|
<div class="row full-width justify-between">
|
||||||
<span>{{ props.row.item.name }}</span>
|
{{ props.row.item.name }}
|
||||||
<span v-if="props.row.item.subName" class="subName">{{
|
<div v-if="props.row.item.subName" class="subName">
|
||||||
props.row.item.subName
|
{{ props.row.item.subName.toUpperCase() }}
|
||||||
}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<fetched-tags
|
</div>
|
||||||
|
<FetchedTags
|
||||||
|
class="fetched-tags"
|
||||||
:item="props.row.item"
|
:item="props.row.item"
|
||||||
:max-length="5"
|
:max-length="5"
|
||||||
></fetched-tags>
|
></FetchedTags>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>{{ props.row.price }}</QTd>
|
<QTd>{{ props.row.price }} €</QTd>
|
||||||
<QTd>{{ props.row.discount }} %</QTd>
|
<QTd>{{ props.row.discount }} %</QTd>
|
||||||
<QTd
|
<QTd
|
||||||
>{{
|
>{{
|
||||||
|
@ -453,4 +463,28 @@ async function changeState(value) {
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.q-table {
|
||||||
|
tr,
|
||||||
|
th,
|
||||||
|
.q-td {
|
||||||
|
border-bottom: 1px solid black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.subName {
|
||||||
|
margin-left: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tr-header,
|
||||||
|
.subName {
|
||||||
|
color: var(--vn-label-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.description-cell {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fetched-tags {
|
||||||
|
max-width: 70%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue