fix: edit image not show

This commit is contained in:
Methapon2001 2024-08-05 16:11:17 +07:00
parent 26300a189f
commit 5d30fd3f11

View file

@ -5,6 +5,8 @@ import useMyBranch from 'src/stores/my-branch';
import useCustomerStore from 'src/stores/customer';
export const useCustomerForm = defineStore('form-customer', () => {
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
const customerStore = useCustomerStore();
const branchStore = useMyBranch();
@ -85,6 +87,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
if (!data) return;
state.value.customerImageUrl = `${apiBaseUrl}/customer/${id}/image`;
resetFormData.registeredBranchId = data.registeredBranchId;
resetFormData.status = data.status;
resetFormData.customerType = data.customerType;