Checkpoint: Ajout des modes de fréquence quotidien, hebdomadaire (avec sélecteur de jour Lun-Dim), mensuel (avec choix du jour 1-28) et intervalle (1h à 24h). Le cron est rechargé immédiatement après sauvegarde pour tous les paramètres de planification.

This commit is contained in:
Manus
2026-06-29 17:07:28 -04:00
parent 1f1a479029
commit cffb3d4201
5 changed files with 120 additions and 41 deletions

View File

@@ -372,8 +372,10 @@ export const appRouter = router({
sharepoint_token: z.string().optional(),
auth_mode: z.enum(["local", "free"]).optional(),
import_time: z.string().optional(),
fetch_mode: z.enum(["scheduled", "interval"]).optional(),
fetch_mode: z.enum(["daily", "weekly", "monthly", "interval", "scheduled"]).optional(),
fetch_interval_minutes: z.string().optional(),
fetch_week_day: z.string().optional(),
fetch_month_day: z.string().optional(),
})
)
.mutation(async ({ input }) => {
@@ -383,7 +385,7 @@ export const appRouter = router({
}
await setSettings(toSave);
// Recharger le cron si la planification a changé
if (toSave.import_time || toSave.fetch_mode || toSave.fetch_interval_minutes) {
if (toSave.import_time || toSave.fetch_mode || toSave.fetch_interval_minutes || toSave.fetch_week_day || toSave.fetch_month_day) {
await scheduleDailyImport();
}
return { success: true };