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 SideMenu from 'src/components/SideMenu.vue';
|
||||
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
|
||||
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
|
||||
|
||||
const { locale, t } = useI18n();
|
||||
const $q = useQuasar();
|
||||
|
|
@ -1629,73 +1630,19 @@ watch(
|
|||
separator
|
||||
:readonly="!infoDrawerEdit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div
|
||||
class="col surface-1 q-ma-lg rounded bordered scroll row"
|
||||
id="branch-info"
|
||||
>
|
||||
|
||||
<div class="col-10 q-pa-md q-gutter-y-xl">
|
||||
|
||||
|
||||
|
||||
<ProfileUpload
|
||||
<FormAddress
|
||||
id="form-address"
|
||||
v-model:modal="modal"
|
||||
v-model:address="formData.address"
|
||||
v-model:addressEN="formData.addressEN"
|
||||
v-model:provinceId="formData.provinceId"
|
||||
v-model:districtId="formData.districtId"
|
||||
v-model:subDistrictId="formData.subDistrictId"
|
||||
v-model:zipCode="formData.zipCode"
|
||||
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
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -1717,7 +1664,7 @@ watch(
|
|||
v-model:userId="userId"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</InfoForm>
|
||||
</DrawerInfo>
|
||||
|
||||
|
|
@ -1739,7 +1686,7 @@ watch(
|
|||
:submit="() => onSubmit()"
|
||||
:close="() => onClose()"
|
||||
>
|
||||
<template #prepend>
|
||||
<!-- <template #prepend>
|
||||
<ProfileUpload
|
||||
prefix-id="form-dialog-personnel"
|
||||
v-model:url-profile="urlProfile"
|
||||
|
|
@ -1798,7 +1745,7 @@ watch(
|
|||
v-model:checkpointEN="formData.checkpointEN"
|
||||
v-model:agencyFile="agencyFile"
|
||||
/>
|
||||
</template>
|
||||
</template> -->
|
||||
</FormDialog>
|
||||
|
||||
<ImageUploadDialog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue