Merge pull request #730 from getmaxun/schedule-ui

fix: schedule modal ui update
This commit is contained in:
Karishma Shukla
2025-08-08 16:15:27 +05:30
committed by GitHub
3 changed files with 16 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next";
interface RecordingsProps {
handleEditRecording: (id: string, fileName: string) => void;
handleRunRecording: (settings: RunSettings) => void;
handleScheduleRecording: (settings: ScheduleSettings) => void;
handleScheduleRecording: (settings: ScheduleSettings) => Promise<boolean>;
setRecordingInfo: (id: string, name: string) => void;
}

View File

@@ -10,7 +10,7 @@ import { getSchedule, deleteSchedule } from '../../api/storage';
interface ScheduleSettingsProps {
isOpen: boolean;
handleStart: (settings: ScheduleSettings) => void;
handleStart: (settings: ScheduleSettings) => Promise<boolean>;
handleClose: () => void;
initialSettings?: ScheduleSettings | null;
}
@@ -272,7 +272,12 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose, initia
</Dropdown>
</Box>
<Box mt={2} display="flex" justifyContent="flex-end">
<Button onClick={() => handleStart(settings)} variant="contained" color="primary">
<Button onClick={async () => {
const success = await handleStart(settings);
if (success) {
await getRobotSchedule();
}
}} variant="contained" color="primary">
{t('schedule_settings.buttons.save_schedule')}
</Button>
<Button