From 260d67f9a53f3539867966d26423978e8ae4d569 Mon Sep 17 00:00:00 2001 From: Meliora Ho Date: Mon, 5 Feb 2024 00:54:32 +0000 Subject: [PATCH] Added collection class --- compass/utils/classes/CollectionImpl.tsx | 16 ++++++++++++++++ compass/utils/constants.tsx | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 compass/utils/classes/CollectionImpl.tsx diff --git a/compass/utils/classes/CollectionImpl.tsx b/compass/utils/classes/CollectionImpl.tsx new file mode 100644 index 0000000..8d8a46a --- /dev/null +++ b/compass/utils/classes/CollectionImpl.tsx @@ -0,0 +1,16 @@ +class CollectionImpl { + title: string; + icon: any; + data: any; + + constructor(title: string, icon: any) { + this.title = title; + this.icon = icon; + } + + // subject to change + setData(data: any){ + this.data = data; + } + +} \ No newline at end of file diff --git a/compass/utils/constants.tsx b/compass/utils/constants.tsx index 7c2c826..ad0169d 100644 --- a/compass/utils/constants.tsx +++ b/compass/utils/constants.tsx @@ -45,4 +45,10 @@ export enum DATATYPE { EMAIL, MULTISELECT, SELECT +} + +export const COLLECTION_MAP: {[key in COLLECTION]: CollectionImpl} = { + [COLLECTION.RESOURCE]: new CollectionImpl('Resources', Icons.ResourceIcon), + [COLLECTION.SERVICE]: new CollectionImpl('Services', Icons.ServiceIcon), + [COLLECTION.USER]: new CollectionImpl('Users', Icons.UserIcon) } \ No newline at end of file