feat: refs #8387 crudModel
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Robert Ferrús 2025-01-13 14:30:58 +01:00
parent c6a9c55ddc
commit 65c2b24b78
1 changed files with 13 additions and 5 deletions

View File

@ -151,6 +151,7 @@ function filter(value, update, filterOptions) {
} }
async function onSubmit() { async function onSubmit() {
try {
if (!hasChanges.value) { if (!hasChanges.value) {
return quasar.notify({ return quasar.notify({
type: 'negative', type: 'negative',
@ -159,6 +160,13 @@ async function onSubmit() {
} }
isLoading.value = true; isLoading.value = true;
await saveChanges($props.saveFn ? formData.value : null); await saveChanges($props.saveFn ? formData.value : null);
} catch (e) {
const errMessage = e?.response?.data?.error?.message;
quasar.notify({
type: 'negative',
message: t(`${errMessage}`),
});
}
} }
async function onSubmitAndGo() { async function onSubmitAndGo() {