refactor: move form address to shared component

This commit is contained in:
Methapon2001 2024-08-09 14:00:57 +07:00
parent 0a5e6c48ea
commit 93f75d813b
6 changed files with 548 additions and 11 deletions

View file

@ -22,7 +22,7 @@ import AddButton from 'components/AddButton.vue';
import TooltipComponent from 'components/TooltipComponent.vue';
import StatCard from 'components/StatCardComponent.vue';
import BranchCard from 'components/01_branch-management/BranchCard.vue';
import FormAddress from 'components/02_personnel-management/FormAddress.vue';
import { AddressForm } from 'components/form';
import DialogForm from 'components/DialogForm.vue';
import FormBranchInformation from 'components/01_branch-management/FormBranchInformation.vue';
import FormLocation from 'components/01_branch-management/FormLocation.vue';
@ -1666,7 +1666,7 @@ watch(currentHq, () => {
:dense="true"
:outlined="true"
/>
<FormAddress
<AddressForm
id="form-address"
dense
outlined
@ -1852,7 +1852,7 @@ watch(currentHq, () => {
:dense="true"
:outlined="true"
/>
<FormAddress
<AddressForm
id="info-address"
dense
outlined

View file

@ -35,7 +35,7 @@ import useOptionStore from 'src/stores/options';
import ProfileBanner from 'src/components/ProfileBanner.vue';
import SideMenu from 'src/components/SideMenu.vue';
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
import { AddressForm } from 'src/components/form';
import DialogForm from 'src/components/DialogForm.vue';
const { locale, t } = useI18n();
@ -1682,7 +1682,7 @@ watch(
:readonly="!infoDrawerEdit"
/>
<FormAddress
<AddressForm
id="info-address"
v-model:address="formData.address"
v-model:addressEN="formData.addressEN"
@ -1831,7 +1831,7 @@ watch(
v-model:gender="formData.gender"
v-model:birthDate="formData.birthDate"
/>
<FormAddress
<AddressForm
id="form-address"
v-model:address="formData.address"
v-model:addressEN="formData.addressEN"

View file

@ -32,7 +32,7 @@ import {
EmployerFormBranch,
EmployerBranch,
} from './components';
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
import { AddressForm } from 'src/components/form';
import FormEmployeePassport from 'src/components/03_customer-management/FormEmployeePassport.vue';
import FormEmployeeVisa from 'src/components/03_customer-management/FormEmployeeVisa.vue';
import { AddButton } from 'src/components/button';
@ -2240,7 +2240,7 @@ watch(
v-model:birthDate="currentFromDataEmployee.dateOfBirth"
v-model:nationality="currentFromDataEmployee.nationality"
/>
<FormAddress
<AddressForm
id="form-personal-address"
prefix-id="form-employee"
v-model:same-with-employer="
@ -2583,7 +2583,7 @@ watch(
v-model:birthDate="currentFromDataEmployee.dateOfBirth"
v-model:nationality="currentFromDataEmployee.nationality"
/>
<FormAddress
<AddressForm
id="form-personal-address"
employee
v-model:address="currentFromDataEmployee.address"