fix: jsegarra ticketList proposal

This commit is contained in:
Javier Segarra 2025-03-05 22:41:38 +01:00
parent 85716cac19
commit 2c33205cdc
2 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,12 @@ export async function getAddresses(clientId, _filter = {}) {
relation: 'client',
scope: {
fields: ['defaultAddressFk'],
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
},
},
},
],

View File

@ -267,6 +267,7 @@ const onClientSelected = async (formData) => {
};
const fetchAddresses = async (formData) => {
if (!formData.clientId) return;
const { data } = await getAddresses(formData.clientId);
formInitialData.value = { clientId: formData.clientId };
if (!data) return;