Skip to content

Standardized icon and Balancer logo sizes in the sidebar #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: listOfMed
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 121 additions & 105 deletions frontend/src/pages/AdminPortal/AdminPortal.tsx
Original file line number Diff line number Diff line change
@@ -1,115 +1,131 @@
//import Welcome from "../../components/Welcome/Welcome.tsx";
import { Link } from "react-router-dom";
import {Link} from "react-router-dom";
import pencilSVG from "../../assets/pencil.svg";
import uploadSVG from "../../assets/upload.svg";
import Layout_V2_Main from "../Layout/Layout_V2_Main";
import React from "react";

const AdminPortal = () => {
return (
<>
<Layout_V2_Main>
<div className="flex h-full w-full justify-center">
<div className="mt-10 flex w-1/2 flex-col">
<div className="mb-8 items-center justify-center">
<div className="text-lg text-gray-500">
Let's take a look inside Balancer's brain. You can manage the
brain from this portal.
</div>
</div>
{/* <div className="mb-8 grid grid-cols-1 gap-4 md:grid-cols-2"> */}
<div className="mb-8 grid grid-cols-1 gap-4 md:grid-cols-2 ">
<Link to={`/listoffiles`} className="w-full">
<div className="flex-basis-0 transition-border border-border3 shadow-feint flex h-[5.5rem] flex-grow cursor-pointer flex-row items-start justify-between rounded-xl border p-4 px-4 duration-150 ease-in hover:scale-[1.015] hover:bg-gray-100">
<div>
<span className="text-md mb-0.5 block font-semibold">
Manage Files
</span>
<span className="text-textGray block text-sm">
Manage the files stored in the Balancer's brain
</span>
</div>
<img
src={pencilSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</div>
</Link>
<Link to={`/UploadFile`} className="w-full">
<div className="flex-basis-0 transition-border border-border3 shadow-feint flex h-[5.5rem] flex-grow cursor-pointer flex-row items-start justify-between rounded-xl border p-4 px-4 duration-150 ease-in hover:scale-[1.015] hover:bg-gray-100">
<div>
<span className="text-md mb-0.5 block font-semibold">
Upload PDF
</span>
<span className="text-textGray block text-sm">
Add to Balancer's brain
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</div>
</Link>
<Link to={`/drugSummary`} className="w-full">
<div className="flex-basis-0 transition-border border-border3 shadow-feint flex h-[5.5rem] flex-grow cursor-pointer flex-row items-start justify-between rounded-xl border p-4 px-4 duration-150 ease-in hover:scale-[1.015] hover:bg-gray-100">
<div>
<span className="text-md mb-0.5 block font-semibold">
Ask General Questions
</span>
<span className="text-textGray block text-sm">
Get answers from Balancer's brain
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</div>
</Link>
<Link to={`/rulesmanager`} className="w-full">
<div className="flex-basis-0 transition-border border-border3 shadow-feint flex h-[5.5rem] flex-grow cursor-pointer flex-row items-start justify-between rounded-xl border p-4 px-4 duration-150 ease-in hover:scale-[1.015] hover:bg-gray-100">
<div>
<span className="text-md mb-0.5 block font-semibold">
Rules Manager for Medication Suggester
</span>
<span className="text-textGray block text-sm">
Manage and view the rules for the Medication Suggester
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</div>
</Link>
<Link to={`/ManageMeds`} className="w-full">
<div className="flex-basis-0 transition-border border-border3 shadow-feint flex h-[5.5rem] flex-grow cursor-pointer flex-row items-start justify-between rounded-xl border p-4 px-4 duration-150 ease-in hover:scale-[1.015] hover:bg-gray-100">
<div>
<span className="text-md mb-0.5 block font-semibold">
Medications Database Manager
</span>
<span className="text-textGray block text-sm">
Manager the Medications store currently inside Balancer's
brain
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
return (
<>
<Layout_V2_Main>
<div className="flex h-full w-full justify-center">
<div className="mt-10 flex flex-col w-3/4 md:w-2/3 max-w-3xl">
<div className="mb-8 items-center justify-center">
<div className="text-lg text-gray-500">
Let's take a look inside Balancer's brain. You can manage the
brain from this portal.
</div>
</div>
{/* <div className="mb-8 grid grid-cols-1 gap-4 md:grid-cols-2"> */}
<div className="mb-8 grid grid-cols-1 lg:grid-cols-2 gap-4 ">

<Link to={`/listoffiles`} className="w-full">
<AdminDashboardItemWrapper>
<div className="min-w-0">
<span className="text-md mb-0.5 block font-semibold">
Manage Files
</span>
<span className="text-textGray block text-sm truncate">
Manage the files stored in the Balancer's brain
</span>
</div>
<img
src={pencilSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</AdminDashboardItemWrapper>
</Link>

<Link to={`/UploadFile`} className="w-full">
<AdminDashboardItemWrapper>
<div className="min-w-0">
<span className="text-md mb-0.5 block font-semibold">
Upload PDF
</span>
<span className="text-textGray block text-sm truncate">
Add to Balancer's brain
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>

</AdminDashboardItemWrapper>
</Link>
<Link to={`/drugSummary`} className="w-full">
<AdminDashboardItemWrapper>
<div className="min-w-0">
<span className="text-md mb-0.5 block font-semibold">
Ask General Questions
</span>
<span className="text-textGray block text-sm truncate">
Get answers from Balancer's brain
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</AdminDashboardItemWrapper>
</Link>
<Link to={`/rulesmanager`} className="w-full">
<AdminDashboardItemWrapper>
<div className="min-w-0">
<span className="text-md mb-0.5 block font-semibold">
Rules Manager
</span>
<span
className="text-textGray block text-sm truncate">
Manage and view the rules for the Medication Suggester
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</AdminDashboardItemWrapper>
</Link>
<Link to={`/ManageMeds`} className="w-full">
<AdminDashboardItemWrapper>
<div className="min-w-0">
<span className="text-md mb-0.5 block font-semibold">
Medications Database
</span>
<span className="text-textGray block text-sm truncate ">
Manager the Medications store currently inside Balancer's
brain
</span>
</div>
<img
src={uploadSVG}
alt="Description of SVG"
className="mr-2 h-5 w-5"
></img>
</AdminDashboardItemWrapper>

</Link>
</div>
</div>
</div>
</Link>
</div>
</div>
</div>
</Layout_V2_Main>
</>
);
</Layout_V2_Main>
</>
);
};

export default AdminPortal;


const AdminDashboardItemWrapper = ({children}: { children: React.ReactNode }) => {
return (
<div
className="flex-basis-0 transition-border border-border3 shadow-feint flex h-[5.75rem] flex-grow cursor-pointer flex-row items-start justify-between rounded-xl border p-4 px-4 duration-150 ease-in hover:scale-[1.015] hover:bg-gray-100 max-w-[26rem]">
{children}
</div>
)
}
Loading
Loading