mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 13:25:11 +00:00
Fix interpretation of day of week in automation form
This commit is contained in:
@@ -83,6 +83,7 @@ function getEveryBlahFromCron(cron: string) {
|
|||||||
|
|
||||||
function getDayOfWeekFromCron(cron: string) {
|
function getDayOfWeekFromCron(cron: string) {
|
||||||
const cronParts = cron.split(' ');
|
const cronParts = cron.split(' ');
|
||||||
|
console.log(cronParts);
|
||||||
if (cronParts[3] === '*' && cronParts[4] !== '*') {
|
if (cronParts[3] === '*' && cronParts[4] !== '*') {
|
||||||
return Number(cronParts[4]);
|
return Number(cronParts[4]);
|
||||||
}
|
}
|
||||||
@@ -631,7 +632,7 @@ function AutomationModificationForm(props: AutomationModificationFormProps) {
|
|||||||
<FormItem
|
<FormItem
|
||||||
className='w-full'>
|
className='w-full'>
|
||||||
<FormLabel>Day of Week</FormLabel>
|
<FormLabel>Day of Week</FormLabel>
|
||||||
<Select onValueChange={field.onChange} defaultValue={String(field.value)}>
|
<Select onValueChange={(value) => field.onChange(Number(value))} defaultValue={String(field.value)}>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger className='w-[200px]'>
|
<SelectTrigger className='w-[200px]'>
|
||||||
On <SelectValue placeholder="" />
|
On <SelectValue placeholder="" />
|
||||||
|
|||||||
Reference in New Issue
Block a user