fix: แก้ไขรูปนายจ้างไม่ได้
This commit is contained in:
parent
33ca54adca
commit
fe96dba906
1 changed files with 10 additions and 0 deletions
|
|
@ -666,6 +666,9 @@ function onCloseBranch() {
|
|||
}
|
||||
|
||||
function clearForm() {
|
||||
|
||||
profileFile.value = undefined;
|
||||
|
||||
dialogInputForm.value = false;
|
||||
formData.value = {
|
||||
status: 'CREATED',
|
||||
|
|
@ -958,7 +961,9 @@ async function toggleStatusCustomer(id: string, status: boolean) {
|
|||
}
|
||||
|
||||
async function onSubmitEdit(id: string) {
|
||||
|
||||
if (selectorLabel.value === 'EMPLOYER') {
|
||||
|
||||
if (!formData.value) return;
|
||||
|
||||
const tempValue: CustomerUpdate = {
|
||||
|
|
@ -970,10 +975,15 @@ async function onSubmitEdit(id: string) {
|
|||
customerBranch: formData.value.customerBranch,
|
||||
taxNo: formData.value.taxNo,
|
||||
personName: formData.value.personName,
|
||||
image: profileFile.value ,
|
||||
};
|
||||
|
||||
|
||||
|
||||
if (tempValue.status === 'CREATED') delete tempValue['status'];
|
||||
|
||||
|
||||
|
||||
await editById(id, tempValue);
|
||||
infoDrawer.value = false;
|
||||
fetchListCustomer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue