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} /> );