diff --git a/admin-portal-frontend/src/app/Profile Icon.png b/admin-portal-frontend/src/app/Profile Icon.png
new file mode 100644
index 0000000..33b031a
Binary files /dev/null and b/admin-portal-frontend/src/app/Profile Icon.png differ
diff --git a/admin-portal-frontend/src/app/RightArrowComponent.tsx b/admin-portal-frontend/src/app/RightArrowComponent.tsx
new file mode 100644
index 0000000..6b78de5
--- /dev/null
+++ b/admin-portal-frontend/src/app/RightArrowComponent.tsx
@@ -0,0 +1,11 @@
+import React, { FC } from 'react';
+
+const RightArrowComponent: FC = () => (
+
+);
+
+export default RightArrowComponent;
+
+
diff --git a/admin-portal-frontend/src/app/api/categories.tsx b/admin-portal-frontend/src/app/api/categories.tsx
new file mode 100644
index 0000000..879dcc8
--- /dev/null
+++ b/admin-portal-frontend/src/app/api/categories.tsx
@@ -0,0 +1,26 @@
+export interface CategoriesData {
+ title: string;
+ items: [],
+ type: String
+ }
+
+ const port = process.env.DEV_PORT || 3001;
+ const CATEGORIES_URL = `http://localhost:${port}/api/categories`;
+
+ export const getAllCategories = async () => {
+ try {
+ const response = await fetch(CATEGORIES_URL, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ });
+ let data = await response.json();
+ data = data.categories;
+ console.log(data);
+ return data;
+ } catch (error) {
+ console.log(error)
+ return [];
+ }
+ };
diff --git a/admin-portal-frontend/src/app/components/BlankPageComponent.tsx b/admin-portal-frontend/src/app/components/BlankPageComponent.tsx
new file mode 100644
index 0000000..8187283
--- /dev/null
+++ b/admin-portal-frontend/src/app/components/BlankPageComponent.tsx
@@ -0,0 +1,15 @@
+import React, { FC } from 'react';
+
+interface Props {
+ category?: string;
+ }
+
+const BlankPageComponent: FC = ({ category }) => {
+ return (
+
+
This is the blank page
+
+ );
+};
+
+export default BlankPageComponent;
diff --git a/admin-portal-frontend/src/app/components/VerticalNavBar.tsx b/admin-portal-frontend/src/app/components/VerticalNavBar.tsx
index 523d548..2a0f607 100644
--- a/admin-portal-frontend/src/app/components/VerticalNavBar.tsx
+++ b/admin-portal-frontend/src/app/components/VerticalNavBar.tsx
@@ -2,14 +2,15 @@
import styles from './VerticalNavBarStyles';
import HomeComponent from './HomeComponent';
-import React, { ReactNode } from 'react';
+import React, { ReactNode, useEffect, useState } from 'react';
import Accordion from 'react-bootstrap/Accordion';
import 'bootstrap/dist/css/bootstrap.css';
import { Card } from 'react-bootstrap';
import GpComponent from './GPComponent';
import SearchComponent from './SearchComponent';
+import { getAllCategories } from '../api/categories';
+import { NavLink } from 'react-router-dom';
-
const VerticalNavBar: React.FC = () => {
interface CustomAccordionProps {
@@ -26,6 +27,24 @@ import SearchComponent from './SearchComponent';
);
}
+ interface Category {
+ _id: string;
+ title: String;
+ items: [];
+ type: String;
+ }
+
+ const [items, setItems] = useState([]);
+ useEffect(() => {
+ (async () => {
+ const categories = await getAllCategories();
+ setItems(categories);
+ })();
+ }, []);
+
+ const generalPrinciples = items.filter(category => category.type === 'General Principle');
+
+
return (
@@ -82,19 +101,19 @@ import SearchComponent from './SearchComponent';
-
- - All
- - Emergency Action Plan
- - Trauma Centers
- - Burn Centers
- - Stroke Centers
- - Serious On-Field Injury
- - Catastrophic Incident
- - Adminstering Medication
- - Muscle Injuries
- - Ligament Injuries
- - Dislocations/Sublaxations
- - Fractures
+
+
+ {generalPrinciples.map(category => (
+ -
+ {
+ return {
+ textDecoration: 'none',
+ fontWeight: isActive ? "bold" : "",
+ color: isActive ? "var(--DFM-Navy, #182B49)" : "var(--Neutral-Gray6, #484848)",
+ };
+ }} className="active">{category.title}
+
+ ))}
@@ -110,5 +129,6 @@ import SearchComponent from './SearchComponent';
);
};
+
export default VerticalNavBar;
\ No newline at end of file
diff --git a/admin-portal-frontend/src/app/icons/Home.png b/admin-portal-frontend/src/app/icons/Home.png
new file mode 100644
index 0000000..445b9ae
Binary files /dev/null and b/admin-portal-frontend/src/app/icons/Home.png differ
diff --git a/admin-portal-frontend/src/app/icons/gen principles.png b/admin-portal-frontend/src/app/icons/gen principles.png
new file mode 100644
index 0000000..573f28b
Binary files /dev/null and b/admin-portal-frontend/src/app/icons/gen principles.png differ
diff --git a/admin-portal-frontend/src/app/icons/ic_search.png b/admin-portal-frontend/src/app/icons/ic_search.png
new file mode 100644
index 0000000..ae1752a
Binary files /dev/null and b/admin-portal-frontend/src/app/icons/ic_search.png differ
diff --git a/admin-portal-frontend/src/app/page.tsx b/admin-portal-frontend/src/app/page.tsx
index 67d77fb..0273476 100644
--- a/admin-portal-frontend/src/app/page.tsx
+++ b/admin-portal-frontend/src/app/page.tsx
@@ -1,15 +1,28 @@
+'use client'
import HorizontalNavBar from './components/HorizontalNavbar'
-import React from 'react';
+import React, { ReactNode, useEffect, useState } from 'react';
import VerticalNavBar from './components/VerticalNavBar';
import styles from './pageStyles'
+import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
+import BlankPageComponent from './components/BlankPageComponent';
const AnotherPage: React.FC = () => {
-
return (
-
-
-
+
+
+
+
+
+
+
+ } />
+
+
+
+
+
diff --git a/admin-portal-frontend/src/app/pageStyles.tsx b/admin-portal-frontend/src/app/pageStyles.tsx
index 6c14721..31a36e4 100644
--- a/admin-portal-frontend/src/app/pageStyles.tsx
+++ b/admin-portal-frontend/src/app/pageStyles.tsx
@@ -11,6 +11,14 @@ const styles = {
zIndex: 1,
position: 'absolute' as const
},
+ blankPage: {
+ position: 'absolute' as const,
+ zIndex: 2,
+ backgroundColor: 'white',
+ top: '50vh',
+ left: '50vw',
+ bottom: '50vh',
+ },
};
export default styles;