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) {
|
if (options && client) {
|
||||||
agency = options.find(
|
agency = options.find(({ agencyModeFk }) => agencyModeFk === client.agencyModeFk);
|
||||||
({ agencyModeFk }) => agencyModeFk === client.defaultAddress.agencyModeFk,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return { options, agency };
|
return { options, agency };
|
||||||
|
|
|
@ -271,7 +271,7 @@ const fetchAddresses = async (formData) => {
|
||||||
formInitialData.value = { clientId: formData.clientId };
|
formInitialData.value = { clientId: formData.clientId };
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
addressesOptions.value = data;
|
addressesOptions.value = data;
|
||||||
selectedClient.value = data[0].client;
|
selectedClient.value = { ...data[0].client, agencyModeFk: data[0].agencyModeFk };
|
||||||
formData.addressId = selectedClient.value.defaultAddressFk;
|
formData.addressId = selectedClient.value.defaultAddressFk;
|
||||||
formInitialData.value.addressId = formData.addressId;
|
formInitialData.value.addressId = formData.addressId;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue