perf: minor changes
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
parent
ce15bdd99e
commit
f33d396d82
|
@ -8,7 +8,7 @@ export async function getAgencies(formData, client, _filter = {}) {
|
|||
order: ['name ASC'],
|
||||
};
|
||||
|
||||
let defaultAgency = null;
|
||||
let agency = null;
|
||||
let params = {
|
||||
filter: JSON.stringify(filter),
|
||||
warehouseFk: formData.warehouseId,
|
||||
|
@ -16,13 +16,15 @@ export async function getAgencies(formData, client, _filter = {}) {
|
|||
landed: formData.landed,
|
||||
};
|
||||
|
||||
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
|
||||
const { data: options } = await axios.get('Agencies/getAgenciesWithWarehouse', {
|
||||
params,
|
||||
});
|
||||
|
||||
if (data && client) {
|
||||
defaultAgency = data.find(
|
||||
(agency) => agency.agencyModeFk === client.defaultAddress.agencyModeFk,
|
||||
if (options && client) {
|
||||
agency = options.find(
|
||||
({ agencyModeFk }) => agencyModeFk === client.defaultAddress.agencyModeFk,
|
||||
);
|
||||
}
|
||||
|
||||
return { options: data, agency: defaultAgency };
|
||||
return { options, agency };
|
||||
}
|
||||
|
|
|
@ -478,7 +478,6 @@ watch(
|
|||
auto-load
|
||||
/>
|
||||
<VnSection
|
||||
ref="sectionRef"
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="card"
|
||||
|
|
Loading…
Reference in New Issue