From 5d30fd3f1168bbbd21085fffe12681486a87991b Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:11:17 +0700 Subject: [PATCH] fix: edit image not show --- src/pages/03_customer-management/form.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index 5464e944..48dfe420 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -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;