added homepage navigation, and configure header

This commit is contained in:
Pongot, Jophiel 2024-01-09 07:17:14 +08:00
parent 8a53d12c8a
commit fa89268e0a
7 changed files with 238 additions and 36 deletions

View file

@ -6,36 +6,39 @@ import TechnicianEquipmentButtons from "../../Components/DashboardPage/Technicia
import TechnicianLogButtons from "../../Components/DashboardPage/Technician/TechnicianLogButtons";
import StudentTransactionListView from "../../Components/DashboardPage/Student/StudentTransactionListView";
import StudentDashboard from "../../Components/DashboardPage/Student/StudentDashboard";
import TechnicianNavigation from "../../Components/DashboardPage/Technician/TechnicianNavigation";
import TeacherTransactionListView from "../../Components/DashboardPage/Teacher/TeacherTransactionListView";
export default function Dashboard() {
return (
<div style={styles.background}>
<Header label={"Dashboard"} />
<RestrictedComponent allow_only={"Technician"}>
<TechnicianWidgets />
<TechnicianEquipmentButtons />
<TechnicianLogButtons />
</RestrictedComponent>
<RestrictedComponent allow_only={"Student"}>
<div
style={{
...styles.flex_column,
...{
justifyContent: "center",
alignItems: "center",
marginInline: "10px"
},
}}
>
<StudentDashboard />
<StudentTransactionListView />
</div>
</RestrictedComponent>
<RestrictedComponent allow_only={"Teacher"}>
<TeacherTransactionListView />
</RestrictedComponent>
<div style={{ position: "relative", zIndex: 999, marginTop: 80 }}>
<RestrictedComponent allow_only={"Technician"}>
<TechnicianWidgets />
<TechnicianNavigation />
<TechnicianEquipmentButtons />
<TechnicianLogButtons />
</RestrictedComponent>
<RestrictedComponent allow_only={"Student"}>
<div
style={{
...styles.flex_row,
...{
flexWrap: "wrap",
justifyContent: "center",
marginLeft: "16px",
marginRight: "16px",
},
}}
>
<StudentTransactionListView />
<StudentDashboard />
</div>
</RestrictedComponent>
<RestrictedComponent allow_only={"Teacher"}>
<TeacherTransactionListView />
</RestrictedComponent>
</div>
</div>
);
}