diff --git a/src/components/displays/pagination/models/SuperUserDashboard/InvoiceOrdersPagination.vue b/src/components/displays/pagination/models/SuperUserDashboard/InvoiceOrdersPagination.vue index 89b18827..99d6ac27 100644 --- a/src/components/displays/pagination/models/SuperUserDashboard/InvoiceOrdersPagination.vue +++ b/src/components/displays/pagination/models/SuperUserDashboard/InvoiceOrdersPagination.vue @@ -1,4 +1,5 @@ diff --git a/src/components/pagination/paginatedList.vue b/src/components/pagination/paginatedList.vue index 6dde5170..73658458 100644 --- a/src/components/pagination/paginatedList.vue +++ b/src/components/pagination/paginatedList.vue @@ -104,6 +104,12 @@ export const setFilter = (newFilter, value, autoLoad = true) => { // If the filter is not set, add it to the filter filter.value = filter.value ? `${filter.value},${newFilter}:${value}` : `${newFilter}:${value}`; } + // Remove duplicates + filter.value = [...new Set(filter.value.split(','))].join(','); + // If the filter is empty, set it to null + if (filter.value === '') { + filter.value = null; + } // Reset the page to 1 setPage(1); // Load the list (If the endpoint is set) diff --git a/src/components/session/token/SessionUser.vue b/src/components/session/token/SessionUser.vue index 86fcf509..3deeb99f 100644 --- a/src/components/session/token/SessionUser.vue +++ b/src/components/session/token/SessionUser.vue @@ -350,7 +350,13 @@ export const SessionUser = { friday: 5, saturday: 6, sunday: 7, - } + }, + getDateMonthStart() { + return new Date(new Date().getFullYear(), new Date().getMonth(), 1); + }, + getDateMonthEnd() { + return new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0); + }, }, /** Redirect to */ redirectTo: { diff --git a/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue b/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue index f5cbe3c4..eea43617 100644 --- a/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue +++ b/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue @@ -42,6 +42,10 @@ export const ObjectsGlobal = { at_hour: 'Kl.', today: 'I dag', yesterday: 'I går', + this_month: 'Denne måned', + last_month: 'Sidste måned', + this_year: 'I år', + all: 'Altid', }, nothing_left_to_show: 'Der er ikke mere at vise', pending: 'Afventer',