diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index caed3b401..a0dc6cc82 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -24,7 +24,7 @@ const $props = defineProps({ type: Boolean, default: true, }, - unRemovableParams: { + unremovableParams: { type: Array, required: false, default: () => [], @@ -148,7 +148,7 @@ async function clearFilters() { arrayData.reset(['skip', 'filter.skip', 'page']); // Filtrar los params no removibles const removableFilters = Object.keys(userParams.value).filter((param) => - $props.unRemovableParams.includes(param) + $props.unremovableParams.includes(param) ); const newParams = {}; // Conservar solo los params que no son removibles @@ -268,7 +268,7 @@ function sanitizer(params) { diff --git a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue index ff9ea5e63..f5917356d 100644 --- a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue +++ b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue @@ -15,13 +15,16 @@ const warehouses = ref(); const groupedStates = ref(); const handleScopeDays = (params, days, callback) => { + const from = Date.vnNew(); + from.setHours(0, 0, 0, 0); + const to = Date.vnNew(); + to.setHours(23, 59, 59, 999); + if (!days) { - Object.assign(params, { from: undefined, to: undefined, scopeDays: undefined }); + Object.assign(params, { from, to, scopeDays: 1 }); } else { - params.from = Date.vnNew(); - const to = Date.vnNew(); + params.from = from; to.setDate(to.getDate() + days); - to.setHours(23, 59, 59, 999); params.to = to; } if (callback) callback(); @@ -29,12 +32,20 @@ const handleScopeDays = (params, days, callback) => {