diff --git a/index.html b/index.html index 6010514..cd834f8 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -
CLICK TO REQUEST BORROW ITEMS diff --git a/src/Components/DashboardPage/Student/StudentTransactionListView.tsx b/src/Components/DashboardPage/Student/StudentTransactionListView.tsx index ef08e2c..07c1fd7 100644 --- a/src/Components/DashboardPage/Student/StudentTransactionListView.tsx +++ b/src/Components/DashboardPage/Student/StudentTransactionListView.tsx @@ -1,6 +1,6 @@ import { useQuery } from "@tanstack/react-query"; import { TransactionsByStudentAPI } from "../../API/API"; -import styles from "../../../styles"; +import styles, { colors } from "../../../styles"; import CircularProgress from "@mui/material/CircularProgress/CircularProgress"; import React, { useState } from "react"; import TransactionEntry from "../../TransactionEntry/TransactionEntry"; @@ -39,10 +39,11 @@ export default function StudentTransactionListView() { ); } return ( -
+ Feature +
++ Manage Transactions +
++ Manage Equipments +
++ Generate Report +
+- Loading -
- > - ); - } return (- Pending Equipments -
- -- {queries[1].data?.filter( - (equipment) => equipment.status == "Pending" - ).length || 0} + Summary
- Equipments in Inventory -
+ {/* Transactions all */} ++ Total Transactions Today +
+ ++ {queries[3].data?.filter((transaction) => + moment(transaction.timestamp, "MM-DD-YYYY hh:mm A").isBetween( + todayStartOfDay, + todayEndOfDay + ) + ).length || "0"} +
++ Total Transactions this Month +
+ ++ {queries[3].data?.filter((transaction) => + moment(transaction.timestamp, "MM-DD-YYYY hh:mm A").isBetween( + thisMonthStart, + thisMonthEnd + ) + ).length || "Loading..."} +
++ {queries[3].data?.filter( + (transaction) => + transaction.transaction_status == "Approved" + ).length || 0} +
++ Pending Request +
++ {queries[3].data?.filter( + (transaction) => + transaction.transaction_status == "Borrowed" + ).length || 0} +
++ On Borrow +
++ {queries[3].data?.filter( + (transaction) => + transaction.transaction_status == "Finalized" + ).length || 0} +
++ Success +
+- {queries[1].data?.length || 0} + Borrowing Transaction
- Available Equipments -
+ {/* Pending Req */} ++ {queries[1].data?.length || "Loading..."} +
-- {queries[1].data?.filter( - (equipment) => equipment.status == "Available" - ).length || 0} -
-- Broken Equipments -
++ Total Equipment +
++ Available +
++ {queries[1].data?.filter( + (equipment) => equipment.status == "Available" + ).length || "Loading..."} +
-- {queries[1].data?.filter( - (equipment) => equipment.status == "Broken" - ).length || 0} -
-- Total Transactions Today -
++ Pending +
++ {queries[1].data?.filter( + (equipment) => equipment.status == "Pending" + ).length || 0} +
-- {queries[3].data?.filter((transaction) => - moment(transaction.timestamp, "MM-DD-YYYY hh:mm A").isBetween( - todayStartOfDay, - todayEndOfDay - ) - ).length || 0} -
-- Total Transactions this Month -
++ Broken +
++ {queries[1].data?.filter( + (equipment) => equipment.status == "Broken" + ).length || 0} +
+- {queries[3].data?.filter((transaction) => - moment(transaction.timestamp, "MM-DD-YYYY hh:mm A").isBetween( - thisMonthStart, - thisMonthEnd - ) - ).length || 0} + Equipment Tracking
- {props.label} -
+ +{props.label}
+Welcome back!
+ ++ Welcome back! +
++ Sign In to Continue +
{error}
+{error}
-Get Started
--
+ Enter required fields +
++ {error} +
+{error}
- -- TAP TO VIEW -
-Borrowing Form
{error}
+ + -{error}
+ +Create Transaction
+ ++ theme.palette.getContrastText(theme.palette.background.paper), + }, }} - > - Add Item -
-- Glassware -
-- Miscellaneous + Results Found:{" "} + { + equipment_instances?.data?.filter((equipment) => + filter !== null + ? // If filter is not null, we filter if it matches any criteria + equipment.equipment_name + .toLowerCase() + .includes(filter.toLowerCase()) || + equipment.category + .toLowerCase() + .includes(filter.toLowerCase()) || + equipment.last_updated + .toLowerCase() + .includes(filter?.toLowerCase()) || + equipment.status.toLowerCase() == filter.toLowerCase() + : // If filter keyword is null then we just pass through everything as if we did not filter at all + true + ).length + }
-- Results Found:{" "} - { - equipment_instances?.data?.filter((equipment) => - filter !== null - ? // If filter is not null, we filter if it matches any criteria - equipment.equipment_name - .toLowerCase() - .includes(filter.toLowerCase()) || - equipment.category - .toLowerCase() - .includes(filter.toLowerCase()) || - equipment.last_updated - .toLowerCase() - .includes(filter?.toLowerCase()) || - equipment.status.toLowerCase() == filter.toLowerCase() - : // If filter keyword is null then we just pass through everything as if we did not filter at all - true - ).length - } -
-+ Add SKU +
+- Add SKU -
-
-
- Results Found:{" "}
- {
- equipments?.data?.filter((equipment) =>
- filter !== null
- ? // If filter is not null, we filter if it matches any criteria
- equipment.name
- .toLowerCase()
- .includes(filter.toLowerCase()) ||
- equipment.category
- .toLowerCase()
- .includes(filter.toLowerCase()) ||
- equipment.last_updated
- .toLowerCase()
- .includes(filter?.toLowerCase()) ||
- equipment.category.toLowerCase() == filter.toLowerCase()
- : // If filter keyword is null then we just pass through everything as if we did not filter at all
- true
- ).length
- }
-
- CSM Inventory + Welcome! +
+ +
+ CSM Borrowing and Inventory
Monitoring and Management System
Involved Items: {transaction.equipments.length} @@ -403,6 +441,46 @@ export default function TransactionsListPage() {
+ Tap To View {"\n"} or Print +
+