From 5245d44a799e750eee45d61e4443cee1966ba8af Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 6 Nov 2025 19:13:11 +0700 Subject: [PATCH] feat(FE-170,175): add module_id prop to approval history modal in RecordingTable --- .../pages/production/recording/RecordingTable.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/pages/production/recording/RecordingTable.tsx b/src/components/pages/production/recording/RecordingTable.tsx index a5d3ec48..42642245 100644 --- a/src/components/pages/production/recording/RecordingTable.tsx +++ b/src/components/pages/production/recording/RecordingTable.tsx @@ -136,20 +136,28 @@ const ApprovalHistoryModal = ({ ref, currentApproval, module_name = 'RECORDINGS', + module_id, }: { ref: RefObject; currentApproval?: BaseApproval; module_name?: string; + module_id?: number | undefined; }) => { const [isModalOpen, setIsModalOpen] = useState(false); const approvalHistoryUrl = useMemo(() => { if (!isModalOpen) return null; - return `${ApprovalApi.basePath}?${new URLSearchParams({ + const params = new URLSearchParams({ module_name: module_name, group_step_number: 'true', - }).toString()}`; - }, [module_name, isModalOpen]); + }); + + if (module_id) { + params.append('module_id', module_id.toString()); + } + + return `${ApprovalApi.basePath}?${params.toString()}`; + }, [module_name, module_id, isModalOpen]); type GroupedApprovalResponse = { step_number: number; @@ -993,6 +1001,7 @@ const RecordingTable = () => { ref={approvalHistoryModal.ref} currentApproval={selectedRecording?.approval} module_name={'RECORDINGS'} + module_id={selectedRecording?.id} /> );