feat: add default customemr image url

This commit is contained in:
Methapon2001 2024-08-15 11:02:10 +07:00
parent a7683c2640
commit 293b109e7c

View file

@ -35,6 +35,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
dialogModal: boolean;
branchIndex: number;
customerImageUrl: string;
defaultCustomerImageUrl: string;
imageDialog: boolean;
imageEdit: boolean;
readonly: boolean;
@ -52,6 +53,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
customerImageUrl: '',
editCustomerId: '',
editCustomerBranchId: '',
defaultCustomerImageUrl: '',
});
watch(
@ -105,6 +107,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
state.value.editCustomerId = id;
state.value.editCustomerCode = data.code;
state.value.customerImageUrl = `${apiBaseUrl}/customer/${id}/image`;
state.value.defaultCustomerImageUrl = `${apiBaseUrl}/customer/${id}/image`;
resetFormData.registeredBranchId = data.registeredBranchId;
resetFormData.code = data.code;