refactor: add closeTab

This commit is contained in:
Thanaphon Frappet 2024-10-18 09:10:33 +07:00
parent 8f069de610
commit 7a06bfe87e

View file

@ -46,6 +46,7 @@ import {
EditButton, EditButton,
UndoButton, UndoButton,
DeleteButton, DeleteButton,
CancelButton,
} from 'components/button'; } from 'components/button';
import ProductServiceForm from './ProductServiceForm.vue'; import ProductServiceForm from './ProductServiceForm.vue';
import QuotationFormInfo from './QuotationFormInfo.vue'; import QuotationFormInfo from './QuotationFormInfo.vue';
@ -210,6 +211,10 @@ const productServiceList = ref<
Required<QuotationPayload['productServiceList'][number]>[] Required<QuotationPayload['productServiceList'][number]>[]
>([]); >([]);
function closeTab() {
window.close();
}
async function assignToProductServiceList() { async function assignToProductServiceList() {
const ret = await productServiceStore.fetchProductGroup({ const ret = await productServiceStore.fetchProductGroup({
page: 1, page: 1,
@ -873,6 +878,8 @@ async function searchEmployee(text: string) {
<q-icon name="mdi-play-box-outline" size="xs" class="q-mr-xs" /> <q-icon name="mdi-play-box-outline" size="xs" class="q-mr-xs" />
{{ $t('general.view', { msg: $t('general.example') }) }} {{ $t('general.view', { msg: $t('general.example') }) }}
</q-btn> </q-btn>
<div class="row" style="gap: var(--size-2)">
<CancelButton solid @click="closeTab()" />
<SaveButton <SaveButton
v-if=" v-if="
quotationFormState.mode === 'create' || quotationFormState.mode === 'create' ||
@ -892,6 +899,7 @@ async function searchEmployee(text: string) {
solid solid
/> />
</div> </div>
</div>
</footer> </footer>
<!-- SEC: Dialog --> <!-- SEC: Dialog -->