Add Date filter.

This commit is contained in:
Brian Cao 2023-08-21 15:53:19 -07:00
parent 800731f3aa
commit af06f7ead5
6 changed files with 124 additions and 17 deletions

View file

@ -12,9 +12,12 @@ import {
WEBSITE_FILTER_TYPES,
} from './constants';
import * as yup from 'yup';
import { TIME_UNIT } from './date';
type ObjectValues<T> = T[keyof T];
export type TimeUnit = ObjectValues<typeof TIME_UNIT>;
export type CollectionType = ObjectValues<typeof COLLECTION_TYPE>;
export type Role = ObjectValues<typeof ROLES>;
export type EventType = ObjectValues<typeof EVENT_TYPE>;
@ -181,6 +184,8 @@ export interface DateRange {
startDate: Date;
endDate: Date;
value: string;
unit?: TimeUnit;
selectedUnit?: TimeUnit;
}
export interface QueryFilters {