0
0
Fork 0

refactor: refs #6837 move travel search like other sections

This commit is contained in:
Jon Elias 2024-03-18 09:48:27 +01:00
parent 79b242f3a6
commit fe7d370a0a
2 changed files with 18 additions and 9 deletions

View File

@ -60,15 +60,6 @@ const decrement = (paramsObj, key) => {
</div>
</template>
<template #body="{ params, searchFn }">
<QItem>
<QItemSection>
<VnInput
v-model="params.search"
:label="t('params.search')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelectFilter

View File

@ -8,6 +8,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import TravelSummary from './Card/TravelSummary.vue';
import TravelFilter from './TravelFilter.vue';
import FetchData from 'components/FetchData.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDate } from 'src/filters/index';
@ -17,6 +18,12 @@ const router = useRouter();
const { t } = useI18n();
const stateStore = useStateStore();
const { viewSummary } = useSummaryDialog();
const props = defineProps({
dataKey: {
type: String,
required: true,
},
});
const warehouses = ref([]);
@ -59,6 +66,15 @@ onMounted(async () => {
</script>
<template>
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<VnSearchbar
data-key="TravelList"
:limit="20"
:label="t('searchByIdOrReference')"
/>
</Teleport>
</template>
<FetchData
url="Warehouses"
:filter="{ fields: ['id', 'name'] }"
@ -172,7 +188,9 @@ onMounted(async () => {
<i18n>
en:
addEntry: Add entry
searchByIdOrReference: Search by ID or reference
es:
addEntry: Añadir entrada
searchByIdOrReference: Buscar por ID o por referencia
</i18n>