diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue index cb59d7c4a..ced3b9b30 100644 --- a/src/pages/Order/OrderList.vue +++ b/src/pages/Order/OrderList.vue @@ -149,7 +149,12 @@ onMounted(() => { }); async function fetchClientAddress(id, formData = {}) { const { data } = await axios.get(`Clients/${id}`, { - params: { filter: { include: { relation: 'addresses' } } }, + params: { + filter: { + order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'], + include: { relation: 'addresses' }, + }, + }, }); addressesList.value = data.addresses; formData.addressId = data.defaultAddressFk; @@ -191,7 +196,7 @@ const getDateColor = (date) => { urlCreate: 'Orders/new', title: t('module.cerateOrder'), onDataSaved: (url) => { - tableRef.redirect(`${url}/catalog`); + tableRef.redirect(`${url}/catalog`); }, formInitialData: { active: true, @@ -253,22 +258,27 @@ const getDateColor = (date) => { @update:model-value="() => fetchAgencies(data)" >