From 15c2e85cf6bf1100e5fd56be88a8b7b6f50c6f3c Mon Sep 17 00:00:00 2001 From: KazumaSun Date: Sun, 12 Nov 2023 11:51:51 +0000 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E3=82=AB=E3=83=A9=E3=83=A0=E5=90=8D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/purchasereports/index.tsx | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/view/next-project/src/pages/purchasereports/index.tsx b/view/next-project/src/pages/purchasereports/index.tsx index dd53e909a..3bffc0025 100644 --- a/view/next-project/src/pages/purchasereports/index.tsx +++ b/view/next-project/src/pages/purchasereports/index.tsx @@ -86,9 +86,14 @@ export default function PurchaseReports(props: Props) { const [selectedYear, setSelectedYear] = useState(currentYear); const filteredPurchaseReportViews = useMemo(() => { - return purchaseReportViews.filter((purchaseReportViewItem) => { - return purchaseReportViewItem.purchaseOrder.createdAt?.includes(selectedYear); - }); + if (purchaseReportViews.length > 0) { + return purchaseReportViews.filter((purchaseReportViewItem: PurchaseReportView) => { + return purchaseReportViewItem.purchaseOrder.createdAt?.includes(selectedYear); + }); + } + else { + return []; + } }, [purchaseReportViews, selectedYear]); const TotalFee = useCallback((purchaseReport: PurchaseReport, purchaseItems: PurchaseItem[]) => { @@ -213,34 +218,34 @@ export default function PurchaseReports(props: Props) { - - - - - - - - - - + From 7e97908d8ad6df8e7c078255ac0711504d625a25 Mon Sep 17 00:00:00 2001 From: KazumaSun Date: Sun, 12 Nov 2023 11:54:29 +0000 Subject: [PATCH 2/2] formatted by workflow --- view/next-project/src/pages/purchasereports/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/view/next-project/src/pages/purchasereports/index.tsx b/view/next-project/src/pages/purchasereports/index.tsx index 3bffc0025..44f9d0569 100644 --- a/view/next-project/src/pages/purchasereports/index.tsx +++ b/view/next-project/src/pages/purchasereports/index.tsx @@ -90,8 +90,7 @@ export default function PurchaseReports(props: Props) { return purchaseReportViews.filter((purchaseReportViewItem: PurchaseReportView) => { return purchaseReportViewItem.purchaseOrder.createdAt?.includes(selectedYear); }); - } - else { + } else { return []; } }, [purchaseReportViews, selectedYear]);
-
財務局長チェック
+
+
+
ID
+
購入した局
+
報告日
+
期限日
+
購入物品 (個数)
+
合計金額
+
備考
+
購入者