fix: edit not sent

This commit is contained in:
Methapon2001 2024-07-08 17:55:53 +07:00
parent 7469fa17d1
commit 33ca54adca

View file

@ -341,8 +341,8 @@ const formDataEmployeeOwner = ref<{
subDistrictId: string;
zipCode: string;
}>();
const formDataEmployee = ref<EmployeeCreate >({
code:'',
const formDataEmployee = ref<EmployeeCreate>({
code: '',
image: null,
customerBranchId: '',
nrcNo: '',
@ -724,7 +724,7 @@ function clearFormEmployee() {
formDataEmployeeOwner.value = undefined;
formDataEmployee.value = {
code:'',
code: '',
image: null,
customerBranchId: '',
nrcNo: '',
@ -1223,8 +1223,6 @@ async function assignFormDataEmployee(id: string) {
zipCode: foundBranch.zipCode,
};
formDataEmployee.value = {
code: foundEmployee.code,
image: null,
@ -2379,24 +2377,20 @@ watch([inputSearch, currentStatus], async () => {
<q-td
v-if="fieldSelected.includes('formDialogInputAge')"
>
<div class="row items-center">
<div class="col">
<div class="col">
<div class="col">
{{ props.row.customerBranch.code }}
{{ props.row.customerBranch.code }}
</div>
<div class="col app-text-muted">
{{
$i18n.locale === 'en-US' ? `${props.row.customerBranch.nameEN}` : `${props.row.customerBranch.name}`
{{
$i18n.locale === 'en-US'
? `${props.row.customerBranch.nameEN}`
: `${props.row.customerBranch.name}`
}}
</div>
</div>
</div>
</q-td>
<q-td>
<q-btn
@ -2407,7 +2401,8 @@ watch([inputSearch, currentStatus], async () => {
flat
@click.stop="
() => {
openDialogInputForm('INFO', props.row.id) }
openDialogInputForm('INFO', props.row.id);
}
"
/>
@ -2544,7 +2539,7 @@ watch([inputSearch, currentStatus], async () => {
name:
$i18n.locale === 'en-US'
? `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim()
: `${props.row.firstName} ${props.row.lastName} `.trim() ,
: `${props.row.firstName} ${props.row.lastName} `.trim(),
img: props.row.profileImageUrl,
male: props.row.gender === 'male',
female: props.row.gender === 'female',
@ -3339,16 +3334,8 @@ watch([inputSearch, currentStatus], async () => {
:isEdit="infoDrawerEdit"
:close="() => onClose()"
:editData="() => (infoDrawerEdit = true)"
:submit="
() => () => {
onSubmitEdit(currentCustomerId);
}
"
:deleteData="
() => {
deleteCustomerById(currentCustomerId);
}
"
:submit="() => onSubmitEdit(currentCustomerId)"
:deleteData="() => deleteCustomerById(currentCustomerId)"
>
<template #info>
<InfoForm>
@ -3804,29 +3791,27 @@ watch([inputSearch, currentStatus], async () => {
<template #person-card>
<div class="q-ma-md">
<AppBox class="surface-1" style="padding: 0">
<PersonCard
:can-edit-profile="infoDrawerEmployeeEdit"
no-hover
no-action
no-detail
:data="
{
name:formDataEmployee.firstName + ' ' + formDataEmployee.lastName,
code:formDataEmployee.code ,
<PersonCard
:can-edit-profile="infoDrawerEmployeeEdit"
no-hover
no-action
no-detail
:data="{
name:
formDataEmployee.firstName + ' ' + formDataEmployee.lastName,
code: formDataEmployee.code,
male: formDataEmployee.gender === 'male',
female: formDataEmployee.gender === 'female',
img: profileUrl || undefined,
}
}"
:list="infoEmployeePersonCard ? infoEmployeePersonCard : []"
:gridColumns="1"
@edit-profile="
() => {
inputFile.click();
}
"
:list="infoEmployeePersonCard ? infoEmployeePersonCard : []"
:gridColumns="1"
@edit-profile="
() => {
inputFile.click();
}
"
/>
/>
</AppBox>
</div>
</template>