From c80908d8f1e31617dcbdef55e2ff2a61b6a22a64 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 11 Jan 2024 08:37:11 +0800 Subject: [PATCH] Omit transaction equipment counting component and simply use transaction.length --- .../TransactionReportPDF/TransactionReportPDF.tsx | 7 ++----- .../CountTransactionEquipments.tsx | 9 --------- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 src/CountTransactionEquipments/CountTransactionEquipments.tsx diff --git a/src/Components/TransactionReportPDF/TransactionReportPDF.tsx b/src/Components/TransactionReportPDF/TransactionReportPDF.tsx index e98df3a..a24d924 100644 --- a/src/Components/TransactionReportPDF/TransactionReportPDF.tsx +++ b/src/Components/TransactionReportPDF/TransactionReportPDF.tsx @@ -1,7 +1,6 @@ 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"; import { filter_today, filter_thismonth, @@ -148,8 +147,7 @@ export default function TransactionReportPDF(props: props) { }} > {" "} - • Total Equipments Processed:{" "} - {count_transaction_equipments(transactions_today)} + • Total Equipments Processed: {transactions_today.length} {" "} - • Total Equipments Processed:{" "} - {count_transaction_equipments(transactions_thismonth)} + • Total Equipments Processed: {transactions_thismonth.length} (n += transaction.equipments.length)); - return n; -}