Refactor recurring notification handling in ScheduledMaintenance and ScheduledMaintenanceTemplate models

This commit is contained in:
Simon Larsen 2024-09-11 10:09:28 -07:00
parent 51ff018a61
commit 8f7cac7108
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
4 changed files with 5 additions and 3 deletions

View File

@ -53,6 +53,7 @@ RunCron(
labels: true,
isRecurringEvent: true,
recurringInterval: true,
sendSubscriberNotificationsOnBeforeTheEvent: true,
},
});
@ -132,6 +133,7 @@ RunCron(
scheduledMaintenanceEvent.title = recurringTemplate.title!;
scheduledMaintenanceEvent.description = recurringTemplate.description!;
scheduledMaintenanceEvent.labels = recurringTemplate.labels!;
scheduledMaintenanceEvent.sendSubscriberNotificationsOnBeforeTheEvent = recurringTemplate.sendSubscriberNotificationsOnBeforeTheEvent!;
const eventscheduledTime: Date = recurringTemplate.scheduleNextEventAt!;

View File

@ -458,7 +458,7 @@ const ScheduledMaintenancesTable: FunctionComponent<ComponentProps> = (
/>
);
},
required: true,
required: false,
},
{
field: {

View File

@ -200,7 +200,7 @@ const ScheduledMaintenanceView: FunctionComponent<
/>
);
},
required: true,
required: false,
},
{
field: {

View File

@ -253,7 +253,7 @@ export const getTemplateFormFields: GetTemplateFormFieldsFunction = (data: {
/>
);
},
required: true,
required: false,
},
{
field: {