refactor: customer, employee upload profile after created
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
a6612bf356
commit
7348935d48
2 changed files with 29 additions and 2 deletions
|
|
@ -239,7 +239,17 @@ const mrz = defineModel<Awaited<ReturnType<typeof parseResultMRZ>>>('mrz');
|
|||
}
|
||||
"
|
||||
@edit="
|
||||
employeeFormState.imageDialog = employeeFormState.isImageEdit = true
|
||||
() => {
|
||||
if (currentFromDataEmployee.id) {
|
||||
fetchImageList(
|
||||
currentFromDataEmployee.id,
|
||||
currentFromDataEmployee.selectedImage || '',
|
||||
'employee',
|
||||
);
|
||||
}
|
||||
employeeFormState.imageDialog =
|
||||
employeeFormState.isImageEdit = true;
|
||||
}
|
||||
"
|
||||
@update:toggle-status="
|
||||
() => {
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,17 @@ onMounted(async () => {
|
|||
}
|
||||
"
|
||||
@edit="
|
||||
customerFormState.imageDialog = customerFormState.isImageEdit = true
|
||||
() => {
|
||||
if (customerFormState.editCustomerId) {
|
||||
fetchImageList(
|
||||
customerFormState.editCustomerId,
|
||||
customerFormData.selectedImage,
|
||||
'customer',
|
||||
);
|
||||
}
|
||||
customerFormState.imageDialog =
|
||||
customerFormState.isImageEdit = true;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -1893,24 +1903,31 @@ onMounted(async () => {
|
|||
"
|
||||
@submit="
|
||||
async (v) => {
|
||||
console.log(customerFormState.editCustomerId);
|
||||
if (
|
||||
customerFormState.dialogModal &&
|
||||
!customerFormState.editCustomerId
|
||||
) {
|
||||
console.log(1);
|
||||
customerFormState.customerImageUrl = v;
|
||||
customerFormState.imageDialog = false;
|
||||
} else {
|
||||
console.log(2);
|
||||
refreshImageState = true;
|
||||
customerFormData.selectedImage = v;
|
||||
customerFormState.imageList
|
||||
? (customerFormState.imageList.selectedImage = v)
|
||||
: '';
|
||||
customerFormState.customerImageUrl = `${baseUrl}/customer/${customerFormState.editCustomerId && customerFormState.editCustomerId}/image/${v}`;
|
||||
console.log(customerFormData.selectedImage);
|
||||
customerFormStore.resetForm();
|
||||
console.log(customerFormData.selectedImage);
|
||||
await customerFormStore.submitFormCustomer();
|
||||
console.log(customerFormData.selectedImage);
|
||||
customerFormState.imageDialog = false;
|
||||
refreshImageState = false;
|
||||
await fetchListCustomer();
|
||||
console.log(customerFormData.selectedImage);
|
||||
}
|
||||
}
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue