forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#972 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
bc73996dfe
|
@ -215,7 +215,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => {
|
||||||
|
|
||||||
if (!newLanded) {
|
if (!newLanded) {
|
||||||
notify(t('advanceTickets.noDeliveryZone'), 'negative');
|
notify(t('advanceTickets.noDeliveryZone'), 'negative');
|
||||||
return;
|
throw new Error(t('advanceTickets.noDeliveryZone'));
|
||||||
}
|
}
|
||||||
|
|
||||||
ticket.landed = newLanded.landed;
|
ticket.landed = newLanded.landed;
|
||||||
|
@ -299,10 +299,10 @@ const splitTickets = async () => {
|
||||||
const { query, params } = await requestComponentUpdate(ticket, true);
|
const { query, params } = await requestComponentUpdate(ticket, true);
|
||||||
await axios.post(query, params);
|
await axios.post(query, params);
|
||||||
progressAdd(ticket.futureId);
|
progressAdd(ticket.futureId);
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
splitErrors.value.push({
|
splitErrors.value.push({
|
||||||
id: ticket.futureId,
|
id: ticket.futureId,
|
||||||
reason: error.response?.data?.error?.message,
|
reason: e.message || e.response?.data?.error?.message,
|
||||||
});
|
});
|
||||||
progressAdd(ticket.futureId);
|
progressAdd(ticket.futureId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue