fix: add agencyModeFk to selectedClient
gitea/salix-front/pipeline/pr-master There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-master There was a failure building this commit
Details
This commit is contained in:
parent
6d59dc93a2
commit
a812fc1720
|
@ -21,9 +21,7 @@ export async function getAgencies(formData, client, _filter = {}) {
|
|||
});
|
||||
|
||||
if (options && client) {
|
||||
agency = options.find(
|
||||
({ agencyModeFk }) => agencyModeFk === client.defaultAddress.agencyModeFk,
|
||||
);
|
||||
agency = options.find(({ agencyModeFk }) => agencyModeFk === client.agencyModeFk);
|
||||
}
|
||||
|
||||
return { options, agency };
|
||||
|
|
|
@ -271,7 +271,7 @@ const fetchAddresses = async (formData) => {
|
|||
formInitialData.value = { clientId: formData.clientId };
|
||||
if (!data) return;
|
||||
addressesOptions.value = data;
|
||||
selectedClient.value = data[0].client;
|
||||
selectedClient.value = { ...data[0].client, agencyModeFk: data[0].agencyModeFk };
|
||||
formData.addressId = selectedClient.value.defaultAddressFk;
|
||||
formInitialData.value.addressId = formData.addressId;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue