From 5fd2e33507dc37a07dc7f886ab3e3d36afbee081 Mon Sep 17 00:00:00 2001 From: Amagasu Date: Mon, 16 Jun 2025 14:44:38 +0900 Subject: [PATCH] show stuffName, when api/tobuy/buy --- frontend/src/components/BuyDialog.tsx | 15 ++++++++++++++- frontend/src/pages/TaskListPage.tsx | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/BuyDialog.tsx b/frontend/src/components/BuyDialog.tsx index 6acfdd3..27485fe 100644 --- a/frontend/src/components/BuyDialog.tsx +++ b/frontend/src/components/BuyDialog.tsx @@ -26,12 +26,14 @@ const formatDateLocal = (date: Date) => { const BuyDialog = ({ openDialog, setOpenDialog, + stuffName, newStock, setNewStock, onSubmit, }: { openDialog: boolean, setOpenDialog: (open: boolean) => void, + stuffName: string, newStock: NewStock, setNewStock: (tobuy: NewStock) => void, onSubmit: () => void, @@ -40,11 +42,21 @@ const BuyDialog = ({ return ( - setOpenDialog(false)} disableScrollLock={true} PaperProps={{ sx: { minHeight: '500px', maxHeight: '80vh' } }} + setOpenDialog(false)} disableScrollLock={true} PaperProps={{ sx: { minHeight: '600px', maxHeight: '80vh' } }} > 在庫登録 + {/* 材料名表示 */} + + {/* 価格入力フィールド */} {/* 購入日・消費期限を横並びに */} diff --git a/frontend/src/pages/TaskListPage.tsx b/frontend/src/pages/TaskListPage.tsx index 74b756d..9eccffb 100644 --- a/frontend/src/pages/TaskListPage.tsx +++ b/frontend/src/pages/TaskListPage.tsx @@ -251,6 +251,7 @@ const TaskListPage: React.FC = () => { { setOpenInfoDialog(true) + setEditingItem(tobuy) setSelectedToBuyId(tobuy.tobuyId) // handleDeleteTask(tobuy.tobuyId) }}> @@ -330,7 +331,7 @@ const TaskListPage: React.FC = () => { {/* 購入処理(在庫登録)のための数値入力ダイアログ */} - + {/* 数量変更ダイアログ */}