diff --git a/src/pages/05_quotation/MainPage.vue b/src/pages/05_quotation/MainPage.vue index 8ea1b842..6ccab236 100644 --- a/src/pages/05_quotation/MainPage.vue +++ b/src/pages/05_quotation/MainPage.vue @@ -2,24 +2,20 @@ import { pageTabs, fieldSelectedOption } from './constants'; import { onMounted, reactive, ref, watch } from 'vue'; -import { useRouter } from 'vue-router'; import { storeToRefs } from 'pinia'; // NOTE: Import stores -import useProductServiceStore from 'src/stores/product-service'; import { useQuotationStore } from 'src/stores/quotations'; import { isRoleInclude } from 'stores/utils'; import useFlowStore from 'src/stores/flow'; import useMyBranch from 'stores/my-branch'; import { useQuotationForm } from './form'; -import useOcrStore from 'stores/ocr'; // NOTE Import Types import { CustomerBranchCreate } from 'stores/customer/types'; import { Employee } from 'src/stores/employee/types'; // NOTE: Import Components -import TreeView from 'src/components/shared/TreeView.vue'; import QuotationCard from 'src/components/05_quotation/QuotationCard.vue'; import PaginationComponent from 'src/components/PaginationComponent.vue'; import StatCardComponent from 'src/components/StatCardComponent.vue'; @@ -44,19 +40,12 @@ import { EmployerFormAbout, } from 'src/pages/03_customer-management/components'; -import { - useCustomerForm, - useEmployeeForm, -} from 'src/pages/03_customer-management/form'; -import QuotationView from './QuotationView.vue'; -import { quotationProductTree } from './utils'; +import { useCustomerForm } from 'src/pages/03_customer-management/form'; const quotationFormStore = useQuotationForm(); const customerFormStore = useCustomerForm(); -const employeeFormStore = useEmployeeForm(); const flowStore = useFlowStore(); const userBranch = useMyBranch(); -const ocrStore = useOcrStore(); const { currentFormData: quotationFormData, @@ -69,33 +58,12 @@ const { currentMyBranch } = storeToRefs(userBranch); const special = ref(false); const branchId = ref(''); const agentPrice = ref(false); -const currentCustomerId = ref(); -const refreshImageState = ref(false); const emptyCreateDialog = ref(false); const onCreateImageList = ref<{ selectedImage: string; list: { url: string; imgFile: File | null; name: string }[]; }>({ selectedImage: '', list: [] }); -const tabFieldRequired = ref<{ [key: string]: (keyof CustomerBranchCreate)[] }>( - { - main: [], - business: ['businessType', 'jobPosition'], - address: [ - 'homeCode', - 'address', - 'addressEN', - 'provinceId', - 'districtId', - 'subDistrictId', - ], - contact: [], - }, -); - -const productServiceStore = useProductServiceStore(); -const router = useRouter(); - const selectedEmployee = ref([]); const pageState = reactive({ @@ -242,16 +210,6 @@ function triggerQuotationDialog(opts: { window.open(url.toString(), '_blank'); } -function triggerSelectEmployeeDialog() { - pageState.employeeModal = true; - // TODO: form and state controll -} - -function triggerProductServiceDialog() { - pageState.productServiceModal = true; - // TODO: form and state controll -} - const quotationStore = useQuotationStore(); const { data: quotationData, @@ -345,39 +303,6 @@ watch(() => pageState.currentTab, fetchQuotationList); :style="pageState.hideStat ? 'rotate: 90deg' : ''" style="transition: 0.1s ease-in-out" /> - - -