chore: store customer code in state

This commit is contained in:
Methapon2001 2024-08-08 09:46:51 +07:00
parent 6286e2685a
commit bada761735

View file

@ -38,6 +38,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
imageEdit: boolean;
readonly: boolean;
editCustomerId?: string;
editCustomerCode?: string;
editCustomerBranchId?: string;
}>({
dialogType: 'info',
@ -98,6 +99,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
if (!data) return;
state.value.editCustomerId = id;
state.value.editCustomerCode = data.code;
state.value.customerImageUrl = `${apiBaseUrl}/customer/${id}/image`;
resetFormData.registeredBranchId = data.registeredBranchId;