diff --git a/src/App.tsx b/src/App.tsx
index d294418..ddc36da 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -22,6 +22,7 @@ import AddTransactionPage from "./Pages/AddTransactionPage/AddTransactionPage";
import TransactionPage from "./Pages/TransactionPage/TransactionPage";
import EquipmentInstanceTallyPage from "./Pages/EquipmentTallyPage/EquipmentTallyPage";
import TransactionReportPage from "./Pages/TransactionReportPage/TransactionReportPage";
+import ManageEquipmentPage from "./Pages/ManageEquipmentPage/ManageEquipmentPage";
const queryClient = new QueryClient();
const router = createHashRouter([
@@ -67,6 +68,17 @@ const router = createHashRouter([
),
errorElement:
- Student Actions -
+- New Transaction + CLICK TO REQUEST BORROW ITEMS
+ Feature +
+ + + + +- Pending Equipments -
- -- {queries[1].data?.filter( - (equipment) => equipment.status == "Pending" - ).length || "Loading..."} + 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 || "Loading..."} + Borrowing Transaction
- Available Equipments -
+ {/* Pending Req */} ++ {queries[1].data?.length || "Loading..."} +
-- {queries[1].data?.filter( - (equipment) => equipment.status == "Available" - ).length || "Loading..."} -
-- Broken Equipments -
++ Total Equipment +
++ Available +
++ {queries[1].data?.filter( + (equipment) => equipment.status == "Available" + ).length || "Loading..."} +
-- {queries[1].data?.filter( - (equipment) => equipment.status == "Broken" - ).length || "Loading..."} -
-- 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 || "Loading..."} -
-- 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 || "Loading..."} + Equipment Tracking
- {props.label} -
+ +{props.label}
+Welcome back!
+ ++ Welcome back! +
++ Sign In to Continue +
{error}
+{error}
-- ID: {props.transaction.id} + Transaction ID: {props.transaction.id}
-
+
- {props.transaction.timestamp} -
+ ...styles.text_M, + ...{ + textAlign: "center", + margin: 0, + color: StatusTextColor(props.transaction.transaction_status), + }, + }} + > + {`${props.transaction.transaction_status}`} + + + +- Borrower: {props.transaction.borrower.name}{" "} - {`(ID:${props.transaction.borrower.id})`} -
-- {`(${props.transaction.borrower.course})`} -
-- Teacher: {props.transaction.teacher.name}{" "} - {`(ID:${props.transaction.teacher.id})`} -
-- Subject: {props.transaction.subject} -
-- Remarks: {props.transaction.remarks} -
-- Consumables: {props.transaction.consumables} + {props.transaction.timestamp}
- Equipments: -
-- {` - ${equipment.name} (ID:${equipment.id})`} -
- ))} -- {`${props.transaction.transaction_status}`} -
+ + + {/* //GIWALA */} + + + + + ); } diff --git a/src/Components/TransactionFilterMenu/TransactionFilterMenu.tsx b/src/Components/TransactionFilterMenu/TransactionFilterMenu.tsx index 467b007..a3c9f24 100644 --- a/src/Components/TransactionFilterMenu/TransactionFilterMenu.tsx +++ b/src/Components/TransactionFilterMenu/TransactionFilterMenu.tsx @@ -41,10 +41,11 @@ export default function TransactionFilterMenu(props: props) { alignSelf: "center", justifyContent: "center", flexWrap: "wrap", + width: "100%" }, }} > -New Transaction
+Borrowing Form
+ Total equipment to borrow: {calculateTotalEquipmentCount()} +
+{error}
+ + > +{error}
++ Create Transaction +
++ Add SKU +
+- 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 + } +
++ Tap To View {"\n"} or Print this slip. +
+