Merge branch 'feature/Monitors' of https://gitea.verdnatura.es/hyervoni/salix-front-mindshore into feature/Monitors
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-05-09 17:46:28 +02:00
commit f374fe859d
5 changed files with 22 additions and 4 deletions

View File

@ -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)

View File

@ -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">

View File

@ -32,7 +32,7 @@ const dateRange = computed(() => {
const filter = reactive({ const filter = reactive({
where: { where: {
'v.stamp': { 'v.stamp': {
between: [from.value, to.value], between: dateRange.value,
}, },
}, },
}); });
@ -148,7 +148,7 @@ const columns = computed(() => [
ref="paginateRef" ref="paginateRef"
data-key="SalesMonitorClients" data-key="SalesMonitorClients"
url="SalesMonitors/clientsFilter" url="SalesMonitors/clientsFilter"
order="dated DESC, hour DESC" :order="['dated DESC', 'hour DESC']"
:limit="6" :limit="6"
:expr-builder="exprBuilder" :expr-builder="exprBuilder"
:user-params="params" :user-params="params"

View File

@ -40,3 +40,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

View File

@ -40,3 +40,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