forked from verdnatura/salix-front
Add searchbar
This commit is contained in:
parent
7cc5c0bdbd
commit
b4f983b946
|
@ -81,14 +81,14 @@ async function search() {
|
||||||
const staticParams = Object.entries(store.userParams).filter(
|
const staticParams = Object.entries(store.userParams).filter(
|
||||||
([key, value]) => value && (props.staticParams || []).includes(key)
|
([key, value]) => value && (props.staticParams || []).includes(key)
|
||||||
);
|
);
|
||||||
// const filter =props?.where? { where: JSON.parse(props.where) }: {}
|
store.skip = 0;
|
||||||
await arrayData.applyFilter({
|
await arrayData.applyFilter({
|
||||||
params: {
|
params: {
|
||||||
// filter ,
|
|
||||||
...Object.fromEntries(staticParams),
|
...Object.fromEntries(staticParams),
|
||||||
search: searchText.value,
|
search: searchText.value,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!props.redirect) return;
|
if (!props.redirect) return;
|
||||||
|
|
||||||
if (props.customRouteRedirectName)
|
if (props.customRouteRedirectName)
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { useStateStore } from 'stores/useStateStore';
|
||||||
import SalesClientTable from './SalesClientsTable.vue';
|
import SalesClientTable from './SalesClientsTable.vue';
|
||||||
import SalesOrdersTable from './SalesOrdersTable.vue';
|
import SalesOrdersTable from './SalesOrdersTable.vue';
|
||||||
import SalesTicketsTable from './SalesTicketsTable.vue';
|
import SalesTicketsTable from './SalesTicketsTable.vue';
|
||||||
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -20,6 +21,17 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<template v-if="stateStore.isHeaderMounted()">
|
||||||
|
<Teleport to="#searchbar">
|
||||||
|
<VnSearchbar
|
||||||
|
data-key="SalesMonitorTickets"
|
||||||
|
url="SalesMonitors/salesFilter"
|
||||||
|
:redirect="false"
|
||||||
|
:label="t('searchBar.label')"
|
||||||
|
:info="t('searchBar.info')"
|
||||||
|
/>
|
||||||
|
</Teleport>
|
||||||
|
</template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<QCard class="full-width q-mb-lg">
|
<QCard class="full-width q-mb-lg">
|
||||||
<QExpansionItem v-model="expanded" dense :duration="150">
|
<QExpansionItem v-model="expanded" dense :duration="150">
|
||||||
|
|
|
@ -38,3 +38,6 @@ salesTicketsTable:
|
||||||
preview: Preview
|
preview: Preview
|
||||||
total: Total
|
total: Total
|
||||||
preparation: Preparation
|
preparation: Preparation
|
||||||
|
searchBar:
|
||||||
|
label: Search tickets
|
||||||
|
info: Search tickets by id or alias
|
||||||
|
|
|
@ -38,3 +38,6 @@ salesTicketsTable:
|
||||||
preview: Vista previa
|
preview: Vista previa
|
||||||
total: Total
|
total: Total
|
||||||
preparation: Preparación
|
preparation: Preparación
|
||||||
|
searchBar:
|
||||||
|
label: Buscar tickets
|
||||||
|
info: Buscar tickets por identificador o alias
|
||||||
|
|
Loading…
Reference in New Issue