0
0
Fork 0

fix(TicketService): pay use selected

This commit is contained in:
Alex Moreno 2024-07-01 08:13:49 +02:00
parent 7b9e26528a
commit 3b18375cdb
1 changed files with 4 additions and 5 deletions

View File

@ -19,12 +19,11 @@ const { t } = useI18n();
const ticketServiceTypeFetchRef = ref(null);
const ticketServiceCrudRef = ref(null);
const ticketServiceOptions = ref([]);
const selected = ref([]);
const arrayData = useArrayData('TicketNotes');
const { store } = arrayData;
const { notify } = useNotify();
const selectedServices = ref(new Set());
const selected = ref([]);
const defaultTaxClass = ref(null);
const crudModelFilter = computed(() => ({
@ -48,10 +47,10 @@ onMounted(async () => await getDefaultTaxClass());
const createRefund = async () => {
try {
if (!selectedServices.value.size) return;
if (!selected.value.length) return;
const params = {
servicesIds: Array.from(selectedServices.value),
servicesIds: selected.value.map((s) => s.id),
withWarehouse: false,
negative: true,
};
@ -130,7 +129,7 @@ const columns = computed(() => [
<QBtn
color="primary"
:label="t('service.pay')"
:disabled="!selectedServices.size"
:disabled="!selected.length"
@click.stop="createRefund()"
/>
</template>