feat: refs #8388 save & continue onEnter
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-04-24 17:25:21 +02:00
parent b2202d7843
commit ce8127b723
1 changed files with 3 additions and 7 deletions

View File

@ -247,6 +247,7 @@ async function save() {
res: response?.data,
old: originalData.value,
});
if ($props.goTo) return push({ path: $props.goTo });
if ($props.reload) await arrayData.fetch({});
hasChanges.value = false;
} finally {
@ -254,11 +255,6 @@ async function save() {
}
}
async function saveAndGo() {
await save();
push({ path: $props.goTo });
}
function reset() {
formData.value = JSON.parse(JSON.stringify(originalData.value));
updateAndEmit('onFetch', { val: originalData.value });
@ -379,7 +375,7 @@ defineExpose({
<QBtnDropdown
data-cy="saveAndContinueDefaultBtn"
v-if="$props.goTo"
@click="saveAndGo"
@click="submitForm"
:label="tMobile('globals.saveAndContinue')"
:title="t('globals.saveAndContinue')"
:disable="!hasChanges"
@ -391,7 +387,7 @@ defineExpose({
<QItem
clickable
v-close-popup
@click="save"
@click="submitForm"
:title="t('globals.save')"
>
<QItemSection>