refactor: add FormAddress and FormByType
This commit is contained in:
parent
499cd1949b
commit
e8bff94a88
1 changed files with 14 additions and 67 deletions
|
|
@ -35,6 +35,7 @@ import useOptionStore from 'src/stores/options';
|
||||||
import ProfileBanner from 'src/components/ProfileBanner.vue';
|
import ProfileBanner from 'src/components/ProfileBanner.vue';
|
||||||
import SideMenu from 'src/components/SideMenu.vue';
|
import SideMenu from 'src/components/SideMenu.vue';
|
||||||
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
|
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
|
||||||
|
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
|
||||||
|
|
||||||
const { locale, t } = useI18n();
|
const { locale, t } = useI18n();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -1629,73 +1630,19 @@ watch(
|
||||||
separator
|
separator
|
||||||
:readonly="!infoDrawerEdit"
|
:readonly="!infoDrawerEdit"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div
|
<FormAddress
|
||||||
class="col surface-1 q-ma-lg rounded bordered scroll row"
|
id="form-address"
|
||||||
id="branch-info"
|
v-model:modal="modal"
|
||||||
>
|
v-model:address="formData.address"
|
||||||
|
v-model:addressEN="formData.addressEN"
|
||||||
<div class="col-10 q-pa-md q-gutter-y-xl">
|
v-model:provinceId="formData.provinceId"
|
||||||
|
v-model:districtId="formData.districtId"
|
||||||
|
v-model:subDistrictId="formData.subDistrictId"
|
||||||
|
v-model:zipCode="formData.zipCode"
|
||||||
<ProfileUpload
|
|
||||||
prefix-id="drawer-info-personnel"
|
prefix-id="drawer-info-personnel"
|
||||||
v-model:url-profile="profileUrl"
|
|
||||||
v-model:status-toggle="statusToggle"
|
|
||||||
v-model:profile-submit="profileSubmit"
|
|
||||||
@input-file="inputFile.click()"
|
|
||||||
@cancel-file="inputFile.value = ''"
|
|
||||||
/>
|
|
||||||
<AppBox class="surface-1" style="padding: 0">
|
|
||||||
<PersonCard
|
|
||||||
:can-edit-profile="infoDrawerEdit"
|
|
||||||
:data="{
|
|
||||||
code: currentUser.code,
|
|
||||||
name:
|
|
||||||
$i18n.locale === 'en-US'
|
|
||||||
? `${currentUser.firstNameEN} ${currentUser.lastNameEN}`.trim()
|
|
||||||
: `${currentUser.firstName} ${currentUser.lastName}`.trim(),
|
|
||||||
img: currentUser.profileImageUrl,
|
|
||||||
male: currentUser.gender === 'male',
|
|
||||||
female: currentUser.gender === 'female',
|
|
||||||
}"
|
|
||||||
no-hover
|
|
||||||
no-action
|
|
||||||
no-bg
|
|
||||||
@edit-profile="inputFile.click()"
|
|
||||||
/>
|
|
||||||
</AppBox>
|
|
||||||
<FormInformation
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
separator
|
|
||||||
:readonly="!infoDrawerEdit"
|
|
||||||
:usernameReadonly="isEdit"
|
|
||||||
v-model:hqId="hqId"
|
|
||||||
v-model:brId="brId"
|
|
||||||
v-model:userType="formData.userType"
|
|
||||||
v-model:userRole="formData.userRole"
|
|
||||||
v-model:username="formData.username"
|
|
||||||
v-model:userCode="userCode"
|
|
||||||
/>
|
|
||||||
<FormPerson
|
|
||||||
prefix-id="drawer-info-personnel"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
separator
|
|
||||||
:readonly="!infoDrawerEdit"
|
|
||||||
v-model:firstName="formData.firstName"
|
|
||||||
v-model:lastName="formData.lastName"
|
|
||||||
v-model:firstNameEN="formData.firstNameEN"
|
|
||||||
v-model:lastNameEN="formData.lastNameEN"
|
|
||||||
v-model:telephoneNo="formData.telephoneNo"
|
|
||||||
v-model:email="formData.email"
|
|
||||||
v-model:gender="formData.gender"
|
|
||||||
v-model:birthDate="formData.birthDate"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormByType
|
<FormByType
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1717,7 +1664,7 @@ watch(
|
||||||
v-model:userId="userId"
|
v-model:userId="userId"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</InfoForm>
|
</InfoForm>
|
||||||
</DrawerInfo>
|
</DrawerInfo>
|
||||||
|
|
||||||
|
|
@ -1739,7 +1686,7 @@ watch(
|
||||||
:submit="() => onSubmit()"
|
:submit="() => onSubmit()"
|
||||||
:close="() => onClose()"
|
:close="() => onClose()"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<!-- <template #prepend>
|
||||||
<ProfileUpload
|
<ProfileUpload
|
||||||
prefix-id="form-dialog-personnel"
|
prefix-id="form-dialog-personnel"
|
||||||
v-model:url-profile="urlProfile"
|
v-model:url-profile="urlProfile"
|
||||||
|
|
@ -1798,7 +1745,7 @@ watch(
|
||||||
v-model:checkpointEN="formData.checkpointEN"
|
v-model:checkpointEN="formData.checkpointEN"
|
||||||
v-model:agencyFile="agencyFile"
|
v-model:agencyFile="agencyFile"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template> -->
|
||||||
</FormDialog>
|
</FormDialog>
|
||||||
|
|
||||||
<ImageUploadDialog
|
<ImageUploadDialog
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue