From 54744e7ae84d7fb1cb4e8ec25d0e990bb9550e58 Mon Sep 17 00:00:00 2001 From: Divyank Shah Date: Wed, 30 Oct 2024 23:26:53 -0700 Subject: [PATCH] Delete src/data/admin/Committees.tsx --- src/data/admin/Committees.tsx | 126 ---------------------------------- 1 file changed, 126 deletions(-) delete mode 100644 src/data/admin/Committees.tsx diff --git a/src/data/admin/Committees.tsx b/src/data/admin/Committees.tsx deleted file mode 100644 index 0c0cc647c..000000000 --- a/src/data/admin/Committees.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import { generateAffiliation, generateSelect, generateStatus } from "./columns"; -import { AFFILIATIONS } from "../form/information"; -import { ICONS } from "./icons"; -import { STATUSES } from "@/data/statuses"; -import { ColumnDef, CellContext } from "@tanstack/react-table"; -import { Tags } from "@/types/dashboard"; - -type Committee = { - name: string; - email: string; - discord: string; - phone: string; - age: string; - gender: string; - school: string; - major: string; - grade: string; - shirt: string; - diet: string; - restriction: string; -}; - -type dropdownProps = { - object: Record; -}; - -export const TAGS: Tags[] = [ - { - text: "accept", - value: 1, - }, - { - text: "reject", - value: -1, - }, -]; - -export const COLUMNS: (ColumnDef & { - searchable?: boolean; -})[] = [ - generateSelect(), - { - accessorKey: "name", - header: "Name", - enableColumnFilter: true, - filterFn: "includesString", - searchable: true, - cell: (props: CellContext) => ( -
{props.getValue()}
- ), - }, - { - accessorKey: "email", - header: "Email", - enableColumnFilter: true, - filterFn: "includesString", - searchable: true, - cell: (props: CellContext) => ( -
{props.getValue()}
- ), - }, - { - accessorKey: "discord", - header: "Discord", - enableColumnFilter: true, - filterFn: "includesString", - searchable: true, - cell: (props: CellContext) => ( -
{props.getValue()}
- ), - }, - { - accessorKey: "shirt", - header: "Shirt", - enableColumnFilter: true, - filterFn: "includesString", - searchable: true, - cell: (props: CellContext) => ( -
{props.getValue()}
- ), - }, - { - accessorKey: "grade", - header: "Grade", - enableColumnFilter: true, - filterFn: "includesString", - searchable: true, - cell: (props: CellContext) => ( -
{props.getValue()}
- ), - }, - generateAffiliation(AFFILIATIONS), - generateStatus(STATUSES), -]; - -const attributes: string[] = [ - "email", - "phone", - "age", - "gender", - "school", - "major", - "grade", - "shirt", - "diet", - "restriction", -]; - -export const DROPDOWN: React.FC = ({ object }) => { - return ( -
-
- {attributes.map((attribute, index) => ( -
- {ICONS[attribute]} - {Array.isArray(object[attribute]) - ? object[attribute].length !== 0 - ? object[attribute].join(",") - : "N/A" - : object[attribute]} -
- ))} -
-
- ); -};