refactor: add remark and agency status fields to form data
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
0de6921636
commit
f22a7e09b3
2 changed files with 101 additions and 165 deletions
|
|
@ -151,6 +151,8 @@ const defaultFormData = {
|
|||
citizenExpire: null,
|
||||
citizenIssue: null,
|
||||
citizenId: '',
|
||||
remark: '',
|
||||
agencyStatus: null,
|
||||
};
|
||||
|
||||
const formData = ref<UserCreate>({
|
||||
|
|
@ -199,6 +201,8 @@ const formData = ref<UserCreate>({
|
|||
citizenExpire: null,
|
||||
citizenIssue: null,
|
||||
citizenId: '',
|
||||
remark: '',
|
||||
agencyStatus: null,
|
||||
});
|
||||
|
||||
const fieldSelectedOption = ref<{ label: string; value: string }[]>([
|
||||
|
|
@ -419,6 +423,7 @@ async function onSubmit(excludeDialog?: boolean) {
|
|||
: '';
|
||||
const formDataEdit = {
|
||||
...formData.value,
|
||||
checkpointEN: formData.value.checkpoint,
|
||||
status: !statusToggle.value ? 'INACTIVE' : 'ACTIVE',
|
||||
} as const;
|
||||
|
||||
|
|
@ -450,6 +455,7 @@ async function onSubmit(excludeDialog?: boolean) {
|
|||
: hqId.value
|
||||
? hqId.value
|
||||
: '';
|
||||
formData.value.checkpointEN = formData.value.checkpoint;
|
||||
const result = await userStore.create(
|
||||
formData.value,
|
||||
onCreateImageList.value,
|
||||
|
|
@ -603,6 +609,8 @@ async function assignFormData(idEdit: string) {
|
|||
(foundUser.citizenIssue && new Date(foundUser.citizenIssue)) || null,
|
||||
citizenExpire:
|
||||
(foundUser.citizenExpire && new Date(foundUser.citizenExpire)) || null,
|
||||
remark: foundUser.remark,
|
||||
agencyStatus: foundUser.agencyStatus,
|
||||
};
|
||||
|
||||
formData.value.status === 'ACTIVE' || 'CREATED'
|
||||
|
|
@ -1781,10 +1789,11 @@ watch(
|
|||
v-model:import-nationality="formData.importNationality"
|
||||
v-model:training-place="formData.trainingPlace"
|
||||
v-model:checkpoint="formData.checkpoint"
|
||||
v-model:checkpoint-en="formData.checkpointEN"
|
||||
v-model:agency-file="agencyFile"
|
||||
v-model:agency-file-list="agencyFileList"
|
||||
v-model:user-id="currentUser.id"
|
||||
v-model:remark="formData.remark"
|
||||
v-model:agency-status="formData.agencyStatus"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1854,7 +1863,6 @@ watch(
|
|||
|
||||
<div
|
||||
class="col"
|
||||
id="personnel-form"
|
||||
:class="{
|
||||
'q-px-lg q-pb-lg': $q.screen.gt.sm,
|
||||
'q-px-md q-pb-sm': !$q.screen.gt.sm,
|
||||
|
|
@ -1898,7 +1906,7 @@ watch(
|
|||
? [
|
||||
{
|
||||
name: $t('personnel.form.workInformation'),
|
||||
anchor: 'dialog-info-work',
|
||||
anchor: 'dialog-form-work',
|
||||
},
|
||||
]
|
||||
: [],
|
||||
|
|
@ -1914,6 +1922,7 @@ watch(
|
|||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="personnel-form"
|
||||
class="col-md-10 col-12 full-height scroll"
|
||||
:class="{
|
||||
'q-py-md q-pr-md ': $q.screen.gt.sm,
|
||||
|
|
@ -1992,7 +2001,8 @@ watch(
|
|||
v-model:import-nationality="formData.importNationality"
|
||||
v-model:training-place="formData.trainingPlace"
|
||||
v-model:checkpoint="formData.checkpoint"
|
||||
v-model:checkpoint-en="formData.checkpointEN"
|
||||
v-model:agency-status="formData.agencyStatus"
|
||||
v-model:remark="formData.remark"
|
||||
v-model:agency-file="agencyFile"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue