fix: refs #8166 show zone error
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-11-19 15:35:57 +01:00
parent 19cb781800
commit e54eb50265
1 changed files with 3 additions and 6 deletions

View File

@ -213,10 +213,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => {
warehouseFk: ticket.futureWarehouseFk,
});
if (!newLanded) {
notify(t('advanceTickets.noDeliveryZone'), 'negative');
return;
}
if (!newLanded) throw new Error(t('advanceTickets.noDeliveryZone'));
ticket.landed = newLanded.landed;
ticket.zoneFk = newLanded.zoneFk;
@ -299,10 +296,10 @@ const splitTickets = async () => {
const { query, params } = await requestComponentUpdate(ticket, true);
await axios.post(query, params);
progressAdd(ticket.futureId);
} catch (error) {
} catch (e) {
splitErrors.value.push({
id: ticket.futureId,
reason: error.response?.data?.error?.message,
reason: e.message || e.response?.data?.error?.message,
});
progressAdd(ticket.futureId);
}