55 lines
1.3 KiB
Vue
55 lines
1.3 KiB
Vue
<script setup>
|
|
import { ref } from 'vue';
|
|
import TicketTransfer from './TicketTransfer.vue';
|
|
import TicketSplit from './TicketSplit.vue';
|
|
const emit = defineEmits(['ticketTransferred']);
|
|
|
|
const $props = defineProps({
|
|
mana: {
|
|
type: Number,
|
|
default: null,
|
|
},
|
|
newPrice: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
transfer: {
|
|
type: Object,
|
|
default: () => {},
|
|
},
|
|
ticket: {
|
|
type: [Array, Object],
|
|
default: () => {},
|
|
},
|
|
split: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
});
|
|
|
|
const popupProxyRef = ref(null);
|
|
const splitRef = ref(null);
|
|
const transferRef = ref(null);
|
|
</script>
|
|
|
|
<template>
|
|
<QPopupProxy ref="popupProxyRef" data-cy="ticketTransferPopup">
|
|
<div class="flex row items-center q-ma-lg" v-if="$props.split">
|
|
<TicketSplit
|
|
ref="splitRef"
|
|
@splitSelectedRows="splitSelectedRows"
|
|
:ticket="$props.ticket"
|
|
/>
|
|
</div>
|
|
|
|
<div style="display: flex; flex-direction: row" v-else>
|
|
<TicketTransfer
|
|
ref="transferRef"
|
|
:ticket="$props.ticket"
|
|
:sales="$props.sales"
|
|
:transfer="$props.transfer"
|
|
/>
|
|
</div>
|
|
</QPopupProxy>
|
|
</template>
|