From ac990aea50bd29545b603eaad14a80828ab7db35 Mon Sep 17 00:00:00 2001 From: "Pongot, Jophiel" Date: Wed, 10 Jan 2024 06:03:25 +0800 Subject: [PATCH 1/8] commit --- .../TransactionPDF/TransactionPDF.tsx | 17 +- .../TransactionReportPDF.tsx | 323 ++++++++++++------ .../EquipmentInstancesListPage.tsx | 2 +- 3 files changed, 219 insertions(+), 123 deletions(-) diff --git a/src/Components/TransactionPDF/TransactionPDF.tsx b/src/Components/TransactionPDF/TransactionPDF.tsx index 767b66a..e8efb2c 100644 --- a/src/Components/TransactionPDF/TransactionPDF.tsx +++ b/src/Components/TransactionPDF/TransactionPDF.tsx @@ -52,16 +52,7 @@ export default function TransactionPDF(props: props) { /> - - Department of Chemistry (Laboratory) - + University of Science and Technology of Southern Philippines{" "} {"\n"} - Lapasan Cagayan de Oro City {"\n"} + Lapasan, Cagayan de Oro City {"\n"} + College of Science and Mathematics + - BORROWER'S SLIP + BORROWER'S SLIP diff --git a/src/Components/TransactionReportPDF/TransactionReportPDF.tsx b/src/Components/TransactionReportPDF/TransactionReportPDF.tsx index 2c6889c..e98df3a 100644 --- a/src/Components/TransactionReportPDF/TransactionReportPDF.tsx +++ b/src/Components/TransactionReportPDF/TransactionReportPDF.tsx @@ -1,4 +1,4 @@ -import { Document, Page, Text, View } from "@react-pdf/renderer"; +import { Document, Page, Text, View, Image } from "@react-pdf/renderer"; import { TransactionListType } from "../Types/Types"; import { colors } from "../../styles"; import count_transaction_equipments from "../../CountTransactionEquipments/CountTransactionEquipments"; @@ -6,6 +6,7 @@ import { filter_today, filter_thismonth, } from "../FilterTransaction/FilterTransaction"; +import ustplogo from "../../assets/ustp-logo.png"; type props = { transactions: TransactionListType | []; @@ -18,143 +19,245 @@ export default function TransactionReportPDF(props: props) { return ( - - Daily Transaction Report - + {/* Header */} - + + - Total Equipments Processed:{" "} - {count_transaction_equipments(transactions_today)} - - - Total Transactions: {transactions_today.length} - - - Rejected Transactions:{" "} - { - transactions_today.filter( - (transaction) => transaction.transaction_status == "Rejected" - ).length - } - - - Finalized Transactions:{" "} - { - transactions_today.filter( - (transaction) => transaction.transaction_status == "Finalized" - ).length - } - + + + Republic of the Philippines{"\n"} + + {" "} + UNIVERSITY OF SCIENCE and TECHNOLOGY OF SCIENCE AND TECHNOLOGY{" "} + + {"\n"} + College of Science and Mathematics + + + + {" "} + Department of Chemistry (Laboratory) + + + + - Monthly Transaction Report + + LABORATORY REPORTS + + - - Total Equipments Processed:{" "} - {count_transaction_equipments(transactions_thismonth)} - - + Transaction + + + - Total Transactions: {transactions_thismonth.length} - - Daily Transaction Report + + {" "} + • Total Equipments Processed:{" "} + {count_transaction_equipments(transactions_today)} + + + + {" "} + • Total Transactions: {transactions_today.length} + + + + {" "} + • Rejected Transactions:{" "} + { + transactions_today.filter( + (transaction) => transaction.transaction_status == "Rejected" + ).length + } + + + + {" "} + • Finalized Transactions:{" "} + { + transactions_today.filter( + (transaction) => transaction.transaction_status == "Finalized" + ).length + } + + + - Rejected Transactions:{" "} - { - transactions_thismonth.filter( - (transaction) => transaction.transaction_status == "Rejected" - ).length - } - - - Finalized Transactions:{" "} - { - transactions_thismonth.filter( - (transaction) => transaction.transaction_status == "Finalized" - ).length - } - + Monthly Transaction Report + + {" "} + • Total Equipments Processed:{" "} + {count_transaction_equipments(transactions_thismonth)} + + + + {" "} + • Total Transactions: {transactions_thismonth.length} + + + + {" "} + • Rejected Transactions:{" "} + { + transactions_thismonth.filter( + (transaction) => transaction.transaction_status == "Rejected" + ).length + } + + + + {" "} + • Finalized Transactions:{" "} + { + transactions_thismonth.filter( + (transaction) => transaction.transaction_status == "Finalized" + ).length + } + + diff --git a/src/Pages/EquipmentInstancesListPage/EquipmentInstancesListPage.tsx b/src/Pages/EquipmentInstancesListPage/EquipmentInstancesListPage.tsx index d284330..6076761 100644 --- a/src/Pages/EquipmentInstancesListPage/EquipmentInstancesListPage.tsx +++ b/src/Pages/EquipmentInstancesListPage/EquipmentInstancesListPage.tsx @@ -73,7 +73,7 @@ export default function EquipmentInstancesListPage() { width: "100%", minHeight: "100%", minWidth: "100%", - marginTop: "100px" + marginTop: "0px" }} > From 44341e2645c7f3f4d3bfe4ab80dc0f844261230c Mon Sep 17 00:00:00 2001 From: "Pongot, Jophiel" Date: Wed, 10 Jan 2024 06:05:34 +0800 Subject: [PATCH 2/8] Item Tally to Sctock Check. might consider changing kung di japun ganahan amo adviser. --- .../Technician/TechnicianLogButtons.tsx | 34 ++----------------- .../EquipmentInstanceLogsPage.tsx | 1 + .../EquipmentTallyPage/EquipmentTallyPage.tsx | 2 +- 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx b/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx index 1b782e1..180d53f 100644 --- a/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx +++ b/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx @@ -118,40 +118,10 @@ export default function TechnicianLogButtons() { ...styles.text_M, }} > - Item Tally -

- - + ); diff --git a/src/Pages/EquipmentInstanceLogsPage/EquipmentInstanceLogsPage.tsx b/src/Pages/EquipmentInstanceLogsPage/EquipmentInstanceLogsPage.tsx index 80dd527..e78a342 100644 --- a/src/Pages/EquipmentInstanceLogsPage/EquipmentInstanceLogsPage.tsx +++ b/src/Pages/EquipmentInstanceLogsPage/EquipmentInstanceLogsPage.tsx @@ -58,6 +58,7 @@ export default function EquipmentInstanceLogsPage() { minHeight: "100%", minWidth: "100%", flexWrap: "wrap", + marginTop: "2rem", }} >
diff --git a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx index 51101bc..38ab609 100644 --- a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx +++ b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx @@ -54,7 +54,7 @@ export default function EquipmentTallyPage() { } return (
-
+
Date: Wed, 10 Jan 2024 06:30:14 +0800 Subject: [PATCH 3/8] nag butang kog total, borrowed pud, gifix ang magin top, coloran lang og red ang broken. --- .../EquipmentTallyPage/EquipmentTallyPage.tsx | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx index 38ab609..41df947 100644 --- a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx +++ b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx @@ -65,6 +65,7 @@ export default function EquipmentTallyPage() { width: "100%", minHeight: "100%", minWidth: "100%", + marginTop: "6rem" }} >

- Available: + Available: {"\n"} { equipment_instances.data?.filter( (equipment_instance) => @@ -203,7 +204,7 @@ export default function EquipmentTallyPage() { }

- Pending: + Pending: {"\n"} { equipment_instances.data?.filter( (equipment_instance) => @@ -214,7 +215,18 @@ export default function EquipmentTallyPage() { }

- Broken: + Borrowed: {"\n"} + { + equipment_instances.data?.filter( + (equipment_instance) => + equipment_instance.equipment_name == + equipment.name && + equipment_instance.status == "Borrowed" + ).length + } +

+

+ Broken: {"\n"} { equipment_instances.data?.filter( (equipment_instance) => @@ -224,6 +236,20 @@ export default function EquipmentTallyPage() { ).length }

+
+

+ Total: {"\n"} + { + equipment_instances.data?.filter( + (equipment_instance) => + equipment_instance.equipment_name === + equipment.name + ).length + } +

+
From f208582444a7be5dd5e47b9f507ef8ee6efa8d12 Mon Sep 17 00:00:00 2001 From: "Pongot, Jophiel" Date: Wed, 10 Jan 2024 06:41:57 +0800 Subject: [PATCH 4/8] gibutang ko lang sa kilid ang search --- .../DashboardPage/Technician/TechnicianLogButtons.tsx | 4 ++-- src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx b/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx index 180d53f..dde7da6 100644 --- a/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx +++ b/src/Components/DashboardPage/Technician/TechnicianLogButtons.tsx @@ -56,7 +56,7 @@ export default function TechnicianLogButtons() { ...styles.text_M, }} > - SKU Logs + SKU
History