refactor: refs #6919 update model naming and default values in Ticket components
This commit is contained in:
parent
793084eb74
commit
43fc2e2312
|
@ -10,7 +10,7 @@ import { useStateStore } from 'stores/useStateStore';
|
|||
import { toCurrency } from 'filters/index';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
|
||||
const haveNegatives = defineModel('haveNegatives', { type: Boolean, required: true });
|
||||
const haveNegatives = defineModel('have-negatives', { type: Boolean, required: true });
|
||||
const formData = defineModel({ type: Object, required: true });
|
||||
|
||||
const stateStore = useStateStore();
|
||||
|
|
|
@ -18,7 +18,7 @@ const stepperRef = ref(null);
|
|||
const { openConfirmationModal } = useVnConfirm();
|
||||
|
||||
const step = ref(1);
|
||||
const haveNegatives = ref(false);
|
||||
const haveNegatives = ref(true);
|
||||
|
||||
const ticket = computed(() => useArrayData('Ticket').store?.data);
|
||||
|
||||
|
@ -105,8 +105,9 @@ const onNextStep = async () => {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<template v-if="ticket">
|
||||
<template>
|
||||
<QStepper
|
||||
v-if="ticket"
|
||||
v-model="step"
|
||||
ref="stepperRef"
|
||||
color="primary"
|
||||
|
@ -118,10 +119,10 @@ const onNextStep = async () => {
|
|||
}"
|
||||
>
|
||||
<QStep :name="1" :title="t('globals.pageTitles.basicData')" :done="step > 1">
|
||||
<TicketBasicDataForm v-if="ticket" v-model="ticket" />
|
||||
<TicketBasicDataForm v-model="ticket" />
|
||||
</QStep>
|
||||
<QStep :name="2" :title="t('basicData.priceDifference')">
|
||||
<TicketBasicData :form-data="ticket" v-model:haveNegatives="haveNegatives" />
|
||||
<TicketBasicData v-model="ticket" v-model:have-negatives="haveNegatives" />
|
||||
</QStep>
|
||||
<template #navigation>
|
||||
<QStepperNavigation class="flex justify-between">
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
<script setup>
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import TicketDescriptor from './TicketDescriptor.vue';
|
||||
import filter from './TicketFilter.js';
|
||||
</script>
|
||||
<template>
|
||||
<VnCardBeta data-key="Ticket" base-url="Tickets" :descriptor="TicketDescriptor" />
|
||||
<VnCardBeta
|
||||
data-key="Ticket"
|
||||
base-url="Tickets"
|
||||
:descriptor="TicketDescriptor"
|
||||
:filter="filter"
|
||||
/>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue