Ticket basic data #474

Merged
jsegarra merged 15 commits from :feature/TicketBasicData into dev 2024-06-25 20:28:01 +00:00
2 changed files with 9 additions and 10 deletions
Showing only changes of commit 4de347d0e8 - Show all commits

View File

@ -116,12 +116,12 @@ const totalDifference = computed(() => {
return rows.value.reduce((acc, item) => acc + item.component?.difference || 0, 0); return rows.value.reduce((acc, item) => acc + item.component?.difference || 0, 0);
}); });
const showMovablecolumn = computed(() => (haveDifferences.value > 0 ? ['movable'] : [])); const showMovablecolumn = computed(() => (haveDifferences.value > 0 ? ['movable'] : []));
const haveDifferences = computed(() => _ticketData.value.sale.haveDifferences); const haveDifferences = computed(() => _ticketData.value.sale?.haveDifferences);
const ticketHaveNegatives = () => { const ticketHaveNegatives = () => {
let _haveNegatives = false; let _haveNegatives = false;
let haveNotNegatives = false; let haveNotNegatives = false;
_ticketData.value.withoutNegatives = false; _ticketData.value.withoutNegatives = false;
_ticketData.value.sale.items.forEach((item) => { _ticketData.value?.sale?.items.forEach((item) => {
if (item.quantity > item.movable) _haveNegatives = true; if (item.quantity > item.movable) _haveNegatives = true;
else haveNotNegatives = true; else haveNotNegatives = true;
}); });

View File

@ -156,7 +156,6 @@ onBeforeMount(async () => await getTicketData());
v-model="step" v-model="step"
ref="stepperRef" ref="stepperRef"
color="primary" color="primary"
header-nav
animated animated
keep-alive keep-alive
style="max-width: 800px; margin: auto" style="max-width: 800px; margin: auto"
@ -176,19 +175,19 @@ onBeforeMount(async () => await getTicketData());
/> />
</QStep> </QStep>
<template #navigation> <template #navigation>
<QStepperNavigation> <QStepperNavigation class="flex justify-between">
<QBtn <QBtn
@click="onNextStep()"
color="primary"
:label="step === 2 ? t('basicData.finalize') : t('basicData.next')"
/>
<QBtn
v-if="step > 1"
flat flat
color="primary" color="primary"
@click="stepperRef.previous()" @click="stepperRef.previous()"
:label="t('basicData.back')" :label="t('basicData.back')"
class="q-ml-sm" class="q-ml-sm"
:class="{ invisible: step === 1 }"
/>
<QBtn
@click="onNextStep()"
color="primary"
:label="step === 2 ? t('basicData.finalize') : t('basicData.next')"
/> />
</QStepperNavigation> </QStepperNavigation>
</template> </template>