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