8713-testToMaster #1539

Merged
alexm merged 118 commits from 8713-testToMaster into master 2025-03-04 06:57:15 +00:00
3 changed files with 19 additions and 9 deletions
Showing only changes of commit df794391ec - Show all commits

View File

@ -1,11 +1,11 @@
import axios from 'axios';
import agency from 'src/router/modules/agency';
export async function getAgencies(formData, client, _filter = {}) {
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
const filter = {
..._filter
order: ['name ASC'],
..._filter,
};
let defaultAgency = null;
@ -18,9 +18,11 @@ export async function getAgencies(formData, client, _filter = {}) {
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
if(data && client) {
defaultAgency = data.find((agency) => agency.agencyModeFk === client.defaultAddress.agencyModeFk );
};
if (data && client) {
defaultAgency = data.find(
(agency) => agency.agencyModeFk === client.defaultAddress.agencyModeFk,
);
}
return {options: data, agency: defaultAgency}
return { options: data, agency: defaultAgency };
}

View File

@ -66,7 +66,12 @@ function validateDateRange(params) {
"
auto-load
/>
<FetchData url="AgencyModes" @on-fetch="(data) => (agencies = data)" auto-load />
<FetchData
url="AgencyModes"
:sort-by="['name ASC']"
@on-fetch="(data) => (agencies = data)"
auto-load
/>
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
<VnFilterPanel
:data-key="props.dataKey"

View File

@ -651,6 +651,9 @@ watch(
{{ scope.opt?.city }}
</span>
</QItemLabel>
<QItemLabel caption>
{{ `#${scope.opt?.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>