forked from verdnatura/salix-front
Merge branch 'dev' into 6722-showDegrees
This commit is contained in:
commit
36457f704d
|
@ -277,13 +277,14 @@ async function createRefund(withWarehouse) {
|
|||
const params = {
|
||||
ticketsIds: [parseInt(ticketId)],
|
||||
withWarehouse: withWarehouse,
|
||||
negative: true,
|
||||
};
|
||||
const { data } = await axios.post(`Tickets/refund`, params);
|
||||
const { data } = await axios.post(`Tickets/cloneAll`, params);
|
||||
|
||||
if (data) {
|
||||
const refundTicket = data;
|
||||
|
||||
push({ name: 'TicketSale', params: { id: refundTicket[0].id } });
|
||||
const [refundTicket] = data;
|
||||
notify(t('refundTicketCreated', { ticketId: refundTicket.id }), 'positive');
|
||||
push({ name: 'TicketSale', params: { id: refundTicket.id } });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
const { push } = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { dialog } = useQuasar();
|
||||
const { notify } = useNotify();
|
||||
|
@ -142,7 +142,7 @@ const onCreateClaimAccepted = async () => {
|
|||
try {
|
||||
const params = { ticketId: ticket.value.id, sales: props.sales };
|
||||
const { data } = await axios.post(`Claims/createFromSales`, params);
|
||||
router.push({ name: 'ClaimBasicData', params: { id: data.id } });
|
||||
push({ name: 'ClaimBasicData', params: { id: data.id } });
|
||||
} catch (error) {
|
||||
console.error('Error creating claim: ', error);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ const createRefund = async (withWarehouse) => {
|
|||
const { data } = await axios.post('Tickets/cloneAll', params);
|
||||
const [refundTicket] = data;
|
||||
notify(t('refundTicketCreated', { ticketId: refundTicket.id }), 'positive');
|
||||
router.push({ name: 'TicketSale', params: { id: refundTicket.id } });
|
||||
push({ name: 'TicketSale', params: { id: refundTicket.id } });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue