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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user