feat: detect edit mode
This commit is contained in:
parent
d3112db017
commit
5ddb142f3e
1 changed files with 11 additions and 2 deletions
|
|
@ -213,7 +213,11 @@ const productServiceList = ref<
|
||||||
>([]);
|
>([]);
|
||||||
|
|
||||||
function closeTab() {
|
function closeTab() {
|
||||||
window.close();
|
if (quotationFormState.value.mode === 'edit') {
|
||||||
|
quotationForm.resetForm();
|
||||||
|
} else {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function assignToProductServiceList() {
|
async function assignToProductServiceList() {
|
||||||
|
|
@ -902,7 +906,12 @@ function storeDataLocal() {
|
||||||
{{ $t('general.view', { msg: $t('general.example') }) }}
|
{{ $t('general.view', { msg: $t('general.example') }) }}
|
||||||
</MainButton>
|
</MainButton>
|
||||||
<div class="row" style="gap: var(--size-2)">
|
<div class="row" style="gap: var(--size-2)">
|
||||||
<CancelButton solid @click="closeTab()" />
|
<UndoButton
|
||||||
|
solid
|
||||||
|
@click="closeTab()"
|
||||||
|
v-if="quotationFormState.mode === 'edit'"
|
||||||
|
/>
|
||||||
|
<CancelButton solid @click="closeTab()" v-else />
|
||||||
<SaveButton
|
<SaveButton
|
||||||
v-if="
|
v-if="
|
||||||
quotationFormState.mode === 'create' ||
|
quotationFormState.mode === 'create' ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue