feat: add date math for filters #1342

Merged
konrad merged 88 commits from feature/date-math into main 2022-03-28 17:30:43 +00:00
1 changed files with 6 additions and 6 deletions
Showing only changes of commit eeee1c842a - Show all commits

View File

@ -124,16 +124,16 @@ const userAuthenticated = computed(() => store.state.auth.authenticated)
const loading = computed(() => store.state[LOADING] && store.state[LOADING_MODULE] === 'tasks')
interface dateStrings {
from: string,
to: string,
dateFrom: string,
dateTo: string,
}
function setDate({from, to}: dateStrings) {
function setDate(dates: dateStrings) {
router.push({
name: route.name as string,
query: {
from: from ?? dateFrom,
to: to ?? dateTo,
from: dates.dateFrom ?? dateFrom,
to: dates.dateTo ?? dateTo,
showOverdue: showOverdue.value ? 'true' : 'false',
showNulls: showNulls.value ? 'true' : 'false',
},
@ -160,7 +160,7 @@ function setShowNulls(show: boolean) {
})
}
async function loadPendingTasks(from:string, to:string) {
async function loadPendingTasks(from: string, to: string) {
// Since this route is authentication only, users would get an error message if they access the page unauthenticated.
// Since this component is mounted as the home page before unauthenticated users get redirected
// to the login page, they will almost always see the error message.