Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncurtisyoga committed Sep 29, 2024
2 parents 111ea0f + 3c06e62 commit 7378ea6
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 12 deletions.
20 changes: 10 additions & 10 deletions _lib/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Footprints,
TramFront,
ClipboardPlus,
UsersRound,
} from "lucide-react";
import { TravelOption } from "@/_lib/types";
import { OfferingType } from "@/app/(root)/private-sessions/_lib/types";
Expand All @@ -22,16 +23,6 @@ export const adminLinks = [{ name: "Admin", href: "/admin" }];

export const authenticatedLinks = [{ name: "Account", href: "/account" }];

export const signUpLinks = {
crossFitDc: "https://crossfitdc.com/",
dcBoulderingProject: "https://www.dcboulderingproject.com/yoga-fitness",
};

export const locations = {
BOULDERING_PROJECT: "DC Bouldering Project",
CROSSFIT_DC: "CrossFit DC",
};

export const eventFormBasicInfoDefaultValues = {
category: "",
endDateTime: "",
Expand Down Expand Up @@ -89,6 +80,7 @@ export const adminDashboardLinks = [
{ name: "New Event", path: "/admin/events/create", icon: ClipboardPlus },
{ name: "Categories", path: "/admin/categories", icon: Boxes },
{ name: "New Category", path: "/admin/categories/create", icon: Box },
{ name: "Users", path: "/admin/users", icon: UsersRound },
];

export const TableEventManagementColumns = [
Expand All @@ -98,6 +90,14 @@ export const TableEventManagementColumns = [
"Actions",
];

export const TableManageUsersColumns = [
"First Name",
"Last Name",
"Email",
"UID",
"Actions",
];

export const EventHistoryTableColumns = [
"Date",
"Amount",
Expand Down
4 changes: 2 additions & 2 deletions app/(root)/private-sessions/_lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "@/app/(root)/private-sessions/_lib/types";

export const INDIVIDUAL_OFFERINGS: OfferingType[] = [
{
/*{
title: "0 Session",
price: "1",
description: "1 hour of training",
Expand All @@ -15,7 +15,7 @@ export const INDIVIDUAL_OFFERINGS: OfferingType[] = [
"test Meditation",
],
package: "test - Individual - 1 Session",
},
},*/
{
title: "1 Session",
price: "115",
Expand Down
53 changes: 53 additions & 0 deletions app/admin/users/_components/ManageUsersTable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"use client";

import { FC } from "react";
import {
Table,
TableBody,
TableColumn,
TableHeader,
TableRow,
Tooltip,
} from "@nextui-org/react";
import { TableManageUsersColumns } from "@/_lib/constants";
import { Trash2 } from "lucide-react";

const ManageUsersTable: FC = () => {
const users = [];

return (
<>
<Table aria-label={"Table for Managing Users"} className={"mt-5"}>
<TableHeader>
{TableManageUsersColumns.map((column) => (
<TableColumn key={column}>{column}</TableColumn>
))}
</TableHeader>
<TableBody>
{users.map((user) => (
<TableRow key={user.id}>
<TableColumn>{user.firstName}</TableColumn>
<TableColumn>{user.lastName}</TableColumn>
<TableColumn>{user.email}</TableColumn>
<TableColumn>{user.id}</TableColumn>
<TableColumn>
<Tooltip content={"Delete"}>
<span className="text-lg text-danger-600 cursor-pointer active:opacity-50">
<Trash2
size={16}
onClick={() => {
console.log("Delete user");
}}
/>
</span>
</Tooltip>
</TableColumn>
</TableRow>
))}
</TableBody>
</Table>
</>
);
};

export default ManageUsersTable;
13 changes: 13 additions & 0 deletions app/admin/users/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React, { FC } from "react";
import ManageUsersTable from "@/app/admin/users/_components/ManageUsersTable";

const Users: FC = () => {
return (
<div className={"wrapper"}>
<h1 className={"text-xl my-5"}>Users Page</h1>
<ManageUsersTable />
</div>
);
};

export default Users;

0 comments on commit 7378ea6

Please sign in to comment.