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'],
|
order: ['name ASC'],
|
||||||
};
|
};
|
||||||
|
|
||||||
let defaultAgency = null;
|
let agency = null;
|
||||||
let params = {
|
let params = {
|
||||||
filter: JSON.stringify(filter),
|
filter: JSON.stringify(filter),
|
||||||
warehouseFk: formData.warehouseId,
|
warehouseFk: formData.warehouseId,
|
||||||
|
@ -16,13 +16,15 @@ export async function getAgencies(formData, client, _filter = {}) {
|
||||||
landed: formData.landed,
|
landed: formData.landed,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
|
const { data: options } = await axios.get('Agencies/getAgenciesWithWarehouse', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
|
||||||
if (data && client) {
|
if (options && client) {
|
||||||
defaultAgency = data.find(
|
agency = options.find(
|
||||||
(agency) => agency.agencyModeFk === client.defaultAddress.agencyModeFk,
|
({ agencyModeFk }) => agencyModeFk === client.defaultAddress.agencyModeFk,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { options: data, agency: defaultAgency };
|
return { options, agency };
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,7 +478,6 @@ watch(
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnSection
|
<VnSection
|
||||||
ref="sectionRef"
|
|
||||||
:data-key="dataKey"
|
:data-key="dataKey"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
prefix="card"
|
prefix="card"
|
||||||
|
|
Loading…
Reference in New Issue