forked from verdnatura/salix-front
fix(TicketService): pay use selected
This commit is contained in:
parent
7b9e26528a
commit
3b18375cdb
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue