"use client"; import { Modal } from "@/app/_components/GlobalComponents/UIElements/Modal"; import { Button } from "@/app/_components/GlobalComponents/UIElements/Button"; import { Input } from "@/app/_components/GlobalComponents/FormElements/Input"; import { CronExpressionHelper } from "@/app/_components/FeatureComponents/Scripts/CronExpressionHelper"; import { Edit, Terminal, FileOutput } from "lucide-react"; import { useTranslations } from "next-intl"; interface EditTaskModalProps { isOpen: boolean; onClose: () => void; onSubmit: (e: React.FormEvent) => void; form: { schedule: string; command: string; comment: string; logsEnabled: boolean; }; onFormChange: (updates: Partial) => void; } export const EditTaskModal = ({ isOpen, onClose, onSubmit, form, onFormChange, }: EditTaskModalProps) => { const t = useTranslations(); return (
onFormChange({ schedule: value })} placeholder="* * * * *" showPatterns={true} />
onFormChange({ command: e.target.value })} placeholder="/usr/bin/command" className="font-mono bg-muted/30 border-border/50 focus:border-primary/50" required />
onFormChange({ comment: e.target.value })} placeholder={t("cronjobs.whatDoesThisTaskDo")} className="bg-muted/30 border-border/50 focus:border-primary/50" />
onFormChange({ logsEnabled: e.target.checked })} className="mt-1 h-4 w-4 rounded border-border text-primary focus:ring-primary/20 cursor-pointer" />

{t("cronjobs.loggingDescription")}

); };