test #1439
|
@ -27,10 +27,15 @@ const formModelRef = ref(null);
|
|||
const closeButton = ref(null);
|
||||
const isSaveAndContinue = ref(false);
|
||||
const onDataSaved = (formData, requestResponse) => {
|
||||
if (closeButton.value && isSaveAndContinue) closeButton.value.click();
|
||||
if (closeButton.value && isSaveAndContinue.value) closeButton.value.click();
|
||||
emit('onDataSaved', formData, requestResponse);
|
||||
};
|
||||
|
||||
const onClick = async () => {
|
||||
isSaveAndContinue.value = true;
|
||||
formModelRef.value.save();
|
||||
};
|
||||
|
||||
const isLoading = computed(() => formModelRef.value?.isLoading);
|
||||
const reset = computed(() => formModelRef.value?.reset);
|
||||
|
||||
|
@ -78,10 +83,7 @@ defineExpose({
|
|||
:flat="showSaveAndContinueBtn"
|
||||
:label="t('globals.save')"
|
||||
:title="t('globals.save')"
|
||||
@click="
|
||||
formModelRef.save();
|
||||
isSaveAndContinue = false;
|
||||
"
|
||||
@click="onClick"
|
||||
color="primary"
|
||||
class="q-ml-sm"
|
||||
:disabled="isLoading"
|
||||
|
@ -99,10 +101,7 @@ defineExpose({
|
|||
:loading="isLoading"
|
||||
data-cy="FormModelPopup_isSaveAndContinue"
|
||||
z-max
|
||||
@click="
|
||||
isSaveAndContinue = true;
|
||||
formModelRef.save();
|
||||
"
|
||||
@click="onClick"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue