diff --git a/src/components/molecules/ScheduleSettings.tsx b/src/components/molecules/ScheduleSettings.tsx index 50b7b41c..e1791f5a 100644 --- a/src/components/molecules/ScheduleSettings.tsx +++ b/src/components/molecules/ScheduleSettings.tsx @@ -22,8 +22,8 @@ export interface ScheduleSettings { export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: ScheduleSettingsProps) => { const [settings, setSettings] = useState({ runEvery: 1, - runEveryUnit: 'hours', - startFrom: 'Monday', + runEveryUnit: 'HOURS', + startFrom: 'MONDAY', atTime: '00:00', timezone: 'UTC' }); @@ -32,6 +32,8 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche setSettings(prev => ({ ...prev, [field]: value })); }; + console.log(`Settings:`, settings); + const textStyle = { width: '150px', height: '52px', @@ -45,6 +47,14 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche marginRight: '10px', }; + const timezones = [ + 'UTC', + 'America/New_York', + 'Europe/London', + 'Asia/Tokyo', + 'Asia/Kolkata' + ]; + return ( handleChange('runEvery', parseInt(e.target.value))} sx={textStyle} + inputProps={{ min: 1 }} /> handleChange('runEveryUnit', e.target.value)} sx={dropDownStyle} > - minutes - hours - days - weeks - months + hours + days + weeks + months @@ -92,13 +102,13 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche handleSelect={(e) => handleChange('startFrom', e.target.value)} sx={dropDownStyle} > - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday + Sunday @@ -121,11 +131,9 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche handleSelect={(e) => handleChange('timezone', e.target.value)} sx={dropDownStyle} > - UTC - America/New_York - Europe/London - Asia/Tokyo - Asia/Kolkata + {timezones.map((tz) => ( + {tz} + ))}