added buttons in student page

This commit is contained in:
Prince Kurt Laurence 2023-12-21 13:55:16 +08:00
parent ad6215d6d0
commit cd742b8822

View file

@ -1,13 +1,12 @@
import styles from "../../styles"; import styles from "../../styles";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { Button } from "@mui/material"; import { Button } from "@mui/material";
import FormatListBulletedIcon from "@mui/icons-material/FormatListBulleted"; import HourglassBottomIcon from '@mui/icons-material/HourglassBottom';
import AddToQueueIcon from "@mui/icons-material/AddToQueue"; import ThumbUpIcon from '@mui/icons-material/ThumbUp';
import NoteAddIcon from "@mui/icons-material/NoteAdd"; import CheckCircleIcon from '@mui/icons-material/CheckCircle';
import NoteIcon from "@mui/icons-material/Note"; import FlashOffIcon from '@mui/icons-material/FlashOff';
import ThumbDownIcon from '@mui/icons-material/ThumbDown';
import { colors } from "../../styles"; import { colors } from "../../styles";
import ScienceIcon from "@mui/icons-material/Science";
import ColorizeIcon from "@mui/icons-material/Colorize";
import Popup from "reactjs-popup"; import Popup from "reactjs-popup";
import AddItemModal from "../AddItemModal/AddItemModal"; import AddItemModal from "../AddItemModal/AddItemModal";
import AddSKUModal from "../AddSKUModal/AddSKUModal"; import AddSKUModal from "../AddSKUModal/AddSKUModal";
@ -28,6 +27,7 @@ export default function StudentTransactionButtons() {
> >
Equipments Equipments
</p> </p>
<div <div
style={{ style={{
...styles.flex_row, ...styles.flex_row,
@ -51,7 +51,7 @@ export default function StudentTransactionButtons() {
navigate("/view/equipment_instances"); navigate("/view/equipment_instances");
}} }}
> >
<FormatListBulletedIcon <HourglassBottomIcon
style={{ style={{
height: 64, height: 64,
width: 64, width: 64,
@ -66,9 +66,10 @@ export default function StudentTransactionButtons() {
...styles.text_M, ...styles.text_M,
}} }}
> >
View All Pending
</p> </p>
</Button> </Button>
<Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
@ -79,10 +80,10 @@ export default function StudentTransactionButtons() {
}, },
}} }}
onClick={() => { onClick={() => {
SetAddItemModalOpen(true); navigate("/view/equipment_instances");
}} }}
> >
<AddToQueueIcon <ThumbUpIcon
style={{ style={{
height: 64, height: 64,
width: 64, width: 64,
@ -97,9 +98,10 @@ export default function StudentTransactionButtons() {
...styles.text_M, ...styles.text_M,
}} }}
> >
Add Item On-Borrow
</p> </p>
</Button> </Button>
<Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
@ -110,10 +112,10 @@ export default function StudentTransactionButtons() {
}, },
}} }}
onClick={() => { onClick={() => {
SetAddSKUModalOpen(true); navigate("/view/equipment_instances");
}} }}
> >
<NoteAddIcon <CheckCircleIcon
style={{ style={{
height: 64, height: 64,
width: 64, width: 64,
@ -128,9 +130,10 @@ export default function StudentTransactionButtons() {
...styles.text_M, ...styles.text_M,
}} }}
> >
Add SKU Completed
</p> </p>
</Button> </Button>
<Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
@ -141,10 +144,10 @@ export default function StudentTransactionButtons() {
}, },
}} }}
onClick={() => { onClick={() => {
navigate("/view/equipments"); navigate("/view/equipment_instances");
}} }}
> >
<NoteIcon <FlashOffIcon
style={{ style={{
height: 64, height: 64,
width: 64, width: 64,
@ -159,9 +162,42 @@ export default function StudentTransactionButtons() {
...styles.text_M, ...styles.text_M,
}} }}
> >
View SKUs Breakage
</p> </p>
</Button> </Button>
<Button
style={{
...styles.flex_column,
...{
alignSelf: "center",
justifyContent: "center",
flexWrap: "wrap",
},
}}
onClick={() => {
navigate("/view/equipment_instances");
}}
>
<ThumbDownIcon
style={{
height: 64,
width: 64,
fill: colors.font_dark,
marginLeft: "1rem",
marginRight: "1rem",
}}
/>
<p
style={{
...styles.text_dark,
...styles.text_M,
}}
>
Rejected
</p>
</Button>
</div> </div>
<div <div
style={{ style={{
@ -173,68 +209,7 @@ export default function StudentTransactionButtons() {
}, },
}} }}
> >
<Button
style={{
...styles.flex_column,
...{
alignSelf: "center",
justifyContent: "center",
flexWrap: "wrap",
},
}}
>
<ScienceIcon
style={{
height: 64,
width: 64,
fill: colors.font_dark,
marginLeft: "1rem",
marginRight: "1rem",
}}
onClick={() => {
navigate("/view/equipment_instances/filter/Glassware");
}}
/>
<p
style={{
...styles.text_dark,
...styles.text_M,
}}
>
Glassware
</p>
</Button>
<Button
style={{
...styles.flex_column,
...{
alignSelf: "center",
justifyContent: "center",
flexWrap: "wrap",
},
}}
>
<ColorizeIcon
style={{
height: 64,
width: 64,
fill: colors.font_dark,
marginLeft: "1rem",
marginRight: "1rem",
}}
onClick={() => {
navigate("/view/equipment_instances/filter/Miscellaneous");
}}
/>
<p
style={{
...styles.text_dark,
...styles.text_M,
}}
>
Miscellaneous
</p>
</Button>
</div> </div>
<Popup <Popup
open={addSKUmodalOpen} open={addSKUmodalOpen}