fix: trycatch
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
c86601d548
commit
209814e477
|
@ -132,27 +132,22 @@ const getInputEvents = ({ col, ...rows }) => ({
|
|||
'keyup.enter': () => saveChange(col.name, rows),
|
||||
});
|
||||
const saveChange = async (field, { row }) => {
|
||||
try {
|
||||
switch (field) {
|
||||
case 'alertLevelCode':
|
||||
await axios.post(`Tickets/state`, {
|
||||
ticketFk: row.ticketFk,
|
||||
code: row[field],
|
||||
});
|
||||
break;
|
||||
switch (field) {
|
||||
case 'alertLevelCode':
|
||||
await axios.post(`Tickets/state`, {
|
||||
ticketFk: row.ticketFk,
|
||||
code: row[field],
|
||||
});
|
||||
break;
|
||||
|
||||
case 'quantity':
|
||||
await axios.post(`Sales/${row.saleFk}/updateQuantity`, {
|
||||
quantity: +row.quantity,
|
||||
});
|
||||
break;
|
||||
}
|
||||
notify('globals.dataSaved', 'positive');
|
||||
fetchItemLack.value.fetch();
|
||||
} catch (err) {
|
||||
console.error('Error saving changes', err);
|
||||
f;
|
||||
case 'quantity':
|
||||
await axios.post(`Sales/${row.saleFk}/updateQuantity`, {
|
||||
quantity: +row.quantity,
|
||||
});
|
||||
break;
|
||||
}
|
||||
notify('globals.dataSaved', 'positive');
|
||||
fetchItemLack.value.fetch();
|
||||
};
|
||||
|
||||
function onBuysFetched(data) {
|
||||
|
|
Loading…
Reference in New Issue