diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index c90a7a82..09cd491f 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -10,7 +10,12 @@ import { ProductTree, quotationProductTree } from './utils'; import { setLocale, dateFormat, calculateAge } from 'src/utils/datetime'; import { useEmployeeForm } from 'src/pages/03_customer-management/form'; import useProductServiceStore from 'stores/product-service'; -import { baseUrl, waitAll, calculateDaysUntilExpire } from 'src/stores/utils'; +import { + baseUrl, + waitAll, + calculateDaysUntilExpire, + dialog, +} from 'src/stores/utils'; import useCustomerStore from 'stores/customer'; import useOptionStore from 'stores/options'; import { useQuotationForm } from './form'; @@ -260,6 +265,23 @@ async function assignToProductServiceList() { } } +async function submitAccepted(id: string) { + dialog({ + color: 'info', + icon: 'mdi-account-check', + title: t('dialog.title.confirmQuotationAccept'), + actionText: t('general.confirm'), + persistent: true, + message: t('dialog.message.quotationAccept'), + action: async () => { + if (!quotationFormData.value.id) return; + + const rse = await quotationForm.accepted(quotationFormData.value.id); + }, + cancel: () => {}, + }); +} + async function convertDataToFormSubmit() { quotationFormData.value.productServiceList = JSON.parse( JSON.stringify(