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 axios from 'axios';
import agency from 'src/router/modules/agency';
export async function getAgencies(formData, client, _filter = {}) { export async function getAgencies(formData, client, _filter = {}) {
if (!formData.warehouseId || !formData.addressId || !formData.landed) return; if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
const filter = { const filter = {
..._filter order: ['name ASC'],
..._filter,
}; };
let defaultAgency = null; let defaultAgency = null;
@ -19,8 +19,10 @@ export async function getAgencies(formData, client, _filter = {}) {
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params }); const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
if (data && client) { if (data && client) {
defaultAgency = data.find((agency) => agency.agencyModeFk === client.defaultAddress.agencyModeFk ); 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 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 /> <FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
<VnFilterPanel <VnFilterPanel
:data-key="props.dataKey" :data-key="props.dataKey"

View File

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