Merge pull request 'fix: add order and sortBy' (!1541) from hotfix_agencyModes_sortBy into master
gitea/salix-front/pipeline/pr-test This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1541
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Javier Segarra 2025-03-04 10:35:44 +00:00
commit edfbeca915
9 changed files with 10 additions and 11 deletions

View File

@ -124,7 +124,7 @@ const selectTravel = ({ id }) => {
<FetchData
url="AgencyModes"
@on-fetch="(data) => (agenciesOptions = data)"
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
auto-load
/>
<FetchData

View File

@ -145,6 +145,7 @@ const entryFilterPanel = ref();
v-model="params.agencyModeId"
@update:model-value="searchFn()"
url="AgencyModes"
sort-by="name ASC"
:fields="['id', 'name']"
hide-selected
dense

View File

@ -44,8 +44,7 @@ const exprBuilder = (param, value) => {
<template>
<FetchData
url="AgencyModes"
:filter="{ fields: ['id', 'name'] }"
sort-by="name ASC"
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
@on-fetch="(data) => (agencyList = data)"
auto-load
/>

View File

@ -48,7 +48,7 @@ const getGroupedStates = (data) => {
/>
<FetchData
url="AgencyModes"
:sort-by="['name ASC']"
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
@on-fetch="(data) => (agencies = data)"
auto-load
/>
@ -256,8 +256,6 @@ const getGroupedStates = (data) => {
v-model="params.agencyModeFk"
@update:model-value="searchFn()"
:options="agencies"
option-value="id"
option-label="name"
emit-value
map-options
use-input

View File

@ -73,6 +73,7 @@ warehouses();
/>
<FetchData
url="AgencyModes"
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
@on-fetch="(data) => (agenciesOptions = data)"
auto-load
/>

View File

@ -39,6 +39,7 @@ const redirectToTravelBasicData = (_, { id }) => {
<template>
<FetchData
url="AgencyModes"
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
@on-fetch="(data) => (agenciesOptions = data)"
auto-load
/>

View File

@ -52,9 +52,8 @@ defineExpose({ states });
v-model="params.agencyModeFk"
@update:model-value="searchFn()"
url="agencyModes"
sort-by="name ASC"
:use-like="false"
option-value="id"
option-label="name"
option-filter="name"
dense
outlined

View File

@ -5,6 +5,7 @@ import VnInput from 'components/common/VnInput.vue';
import FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnSelect from 'components/common/VnSelect.vue';
import order from 'src/router/modules/order';
const { t } = useI18n();
const props = defineProps({
@ -24,7 +25,7 @@ const agencies = ref([]);
<template>
<FetchData
url="AgencyModes"
:filter="{ fields: ['id', 'name'] }"
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
@on-fetch="(data) => (agencies = data)"
auto-load
/>

View File

@ -199,9 +199,8 @@ function formatRow(row) {
<template #more-create-dialog="{ data }">
<VnSelect
url="AgencyModes"
sort-by="name ASC"
v-model="data.agencyModeFk"
option-value="id"
option-label="name"
:label="t('list.agency')"
/>
<VnInput