diff --git a/src/index.ts b/src/index.ts index 4ebbf48..4423e56 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,10 +118,12 @@ const searchParams: { appointment: AppointmentType | null, kind: TestKind | null, dcc: boolean | null, + includeOutdated: boolean | null } = { appointment: null, kind: null, - dcc: null + dcc: null, + includeOutdated: false }; (window as any).initMap = initMap; @@ -198,6 +200,14 @@ function initializeFilterOptions() { searchByMapBounds(0); }; } + + const outdatedCheckbox = document.getElementById('includeOutdated-checkbox') as HTMLInputElement; + if (outdatedCheckbox != null) { + outdatedCheckbox.onclick = () => { + searchParams.includeOutdated = outdatedCheckbox.checked; + searchByMapBounds(0); + }; + } } /** @@ -277,6 +287,7 @@ function prepareSearchParams(params: { [id: string]: string | number | boolean | params['dcc'] = searchParams.dcc; params['kind'] = searchParams.kind; params['appointment'] = searchParams.appointment; + params['includeOutdated'] = searchParams.includeOutdated; return Object.keys(params) .filter(k => params[k] != null) diff --git a/static/index.html b/static/index.html index 9f0bd60..df9d828 100644 --- a/static/index.html +++ b/static/index.html @@ -7,7 +7,8 @@