diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 1058e088..5e97418d 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -27,9 +27,11 @@ import DialogForm from 'components/DialogForm.vue'; import SideMenu from 'src/components/SideMenu.vue'; import BasicInformation from 'src/components/03_customer-management/employee/BasicInformation.vue'; import FormPerson from 'src/components/02_personnel-management/FormPerson.vue'; -import FormBasicInfo from './components/FormBasicInfo.vue'; -import FormBranch from './components/FormBranch.vue'; -import CustomerInfoComponent from './components/CustomerBranch.vue'; +import { + EmployerFormBasicInfo, + EmployerFormBranch, + EmployerBranch, +} from './components'; import FormAddress from 'src/components/02_personnel-management/FormAddress.vue'; import FormEmployeePassport from 'src/components/03_customer-management/FormEmployeePassport.vue'; import FormEmployeeVisa from 'src/components/03_customer-management/FormEmployeeVisa.vue'; @@ -1754,7 +1756,7 @@ watch(
- - - import { ref } from 'vue'; import FormAddress from 'src/components/02_personnel-management/FormAddress.vue'; -import FormBusiness from './FormBusiness.vue'; +import FormBusiness from './EmployerFormBusiness.vue'; +import FormContact from './EmployerFormContact.vue'; import { CustomerCreate } from 'src/stores/customer/types'; import { dateFormat, parseAndFormatDate } from 'src/utils/datetime'; -import FormContact from './FormContact.vue'; import { EditButton } from 'src/components/button'; import DeleteButton from 'src/components/button/DeleteButton.vue'; import SaveButton from 'src/components/button/SaveButton.vue'; diff --git a/src/pages/03_customer-management/components/FormBusiness.vue b/src/pages/03_customer-management/components/employer/EmployerFormBusiness.vue similarity index 100% rename from src/pages/03_customer-management/components/FormBusiness.vue rename to src/pages/03_customer-management/components/employer/EmployerFormBusiness.vue diff --git a/src/pages/03_customer-management/components/FormContact.vue b/src/pages/03_customer-management/components/employer/EmployerFormContact.vue similarity index 100% rename from src/pages/03_customer-management/components/FormContact.vue rename to src/pages/03_customer-management/components/employer/EmployerFormContact.vue diff --git a/src/pages/03_customer-management/components/index.ts b/src/pages/03_customer-management/components/index.ts new file mode 100644 index 00000000..3d293249 --- /dev/null +++ b/src/pages/03_customer-management/components/index.ts @@ -0,0 +1,5 @@ +export { default as EmployerBranch } from './employer/EmployerBranch.vue'; +export { default as EmployerFormBasicInfo } from './employer/EmployerFormBasicInfo.vue'; +export { default as EmployerFormBranch } from './employer/EmployerFormBranch.vue'; +export { default as EmployerFormBusiness } from './employer/EmployerFormBusiness.vue'; +export { default as EmployerFormContact } from './employer/EmployerFormContact.vue'; diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index f9d2a317..e00031c2 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -58,7 +58,6 @@ export const useCustomerForm = defineStore('form-customer', () => { ); function isFormDataDifferent() { - console.log(resetFormData, currentFormData.value); return ( JSON.stringify(resetFormData) !== JSON.stringify(currentFormData.value) ); @@ -66,6 +65,7 @@ export const useCustomerForm = defineStore('form-customer', () => { function resetForm(clean = false) { state.value.branchIndex = -1; + state.value.readonly = true; if (clean) { defaultFormData.customerType = currentFormData.value.customerType; currentFormData.value = structuredClone(defaultFormData);