diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index b5842fc9..c1a3c025 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -72,9 +72,10 @@ interface Data { interface RecordingsTableProps { handleEditRecording: (fileName: string) => void; handleRunRecording: (fileName: string, params: string[]) => void; + handleScheduleRecording: (fileName: string, params: string[]) => void; } -export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: RecordingsTableProps) => { +export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handleScheduleRecording }: RecordingsTableProps) => { const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); const [rows, setRows] = React.useState([]); @@ -171,7 +172,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: Rec case 'schedule': return ( - {/* todo: schedule logic here */ }} /> + handleScheduleRecording(row.name, row.params || []) } /> ); case 'delete': @@ -230,18 +231,20 @@ const InterpretButton = ({ handleInterpret }: InterpretButtonProps) => { ) } + interface ScheduleButtonProps { handleSchedule: () => void; } const ScheduleButton = ({ handleSchedule }: ScheduleButtonProps) => { return ( - { + handleSchedule(); + }} sx={{ '&:hover': { color: '#1976d2', backgroundColor: 'transparent' } }}> - + - ); -}; + ) +} + +