diff --git a/view/next-project/src/pages/purchasereports/index.tsx b/view/next-project/src/pages/purchasereports/index.tsx index dd53e909a..44f9d0569 100644 --- a/view/next-project/src/pages/purchasereports/index.tsx +++ b/view/next-project/src/pages/purchasereports/index.tsx @@ -86,9 +86,13 @@ 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 +217,34 @@ export default function PurchaseReports(props: Props) { - - - - - - - - - - +
-
財務局長チェック
+
+
+
ID
+
購入した局
+
報告日
+
期限日
+
購入物品 (個数)
+
合計金額
+
備考
+
購入者