feat: detect if closeable

This commit is contained in:
Methapon Metanipat 2024-10-18 13:34:45 +07:00
parent 5099e43dee
commit 818ee3d3dd

View file

@ -220,6 +220,10 @@ function closeTab() {
}
}
function closeAble() {
return window.opener !== null;
}
async function assignToProductServiceList() {
const ret = await productServiceStore.fetchProductGroup({
page: 1,
@ -911,7 +915,11 @@ function storeDataLocal() {
@click="closeTab()"
v-if="quotationFormState.mode === 'edit'"
/>
<CancelButton solid @click="closeTab()" v-else />
<CancelButton
solid
@click="closeTab()"
v-if="quotationFormState.mode === 'info' && closeAble()"
/>
<SaveButton
v-if="
quotationFormState.mode === 'create' ||