@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
12 lines (11 loc) • 518 B
JavaScript
import { getScheduledAlertNotificationForm, isScheduledAlertDefinition, } from './Scheduling/ScheduledAlertHelper';
export function resolveAlertFormForDefinition(alert, defaultForm) {
if (isScheduledAlertDefinition(alert)) {
if (!alert.AlertProperties?.DisplayNotification) {
return defaultForm;
}
return getScheduledAlertNotificationForm(alert.AlertProperties?.IncludeSuspendButton ?? false);
}
const ruleAlert = alert;
return ruleAlert.AlertForm ?? defaultForm;
}