Monitors #364

Merged
jsegarra merged 13 commits from :feature/Monitors into dev 2024-05-13 16:02:30 +00:00
5 changed files with 22 additions and 4 deletions
Showing only changes of commit f374fe859d - Show all commits

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>
jsegarra marked this conversation as resolved
Review

Falta añadir la searchbar y su respectiva funcionalidad

Falta añadir la searchbar y su respectiva funcionalidad
<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