fix: add agencyModeFk to selectedClient #1560

Merged
jsegarra merged 8 commits from hotfix_fixGetAgenciesTicketList into master 2025-03-06 00:30:22 +00:00
2 changed files with 7 additions and 0 deletions
Showing only changes of commit 2c33205cdc - Show all commits

View File

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

View File

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