Files
next-tjwater-frontend/src/features/workbench/utils/scheduled-condition-alerts.ts
T

7 lines
292 B
TypeScript

const SCHEDULED_CONDITION_ALERT_ID_PREFIX = "scheduled-condition-alert-";
export function getScheduledConditionIdFromAlertId(alertId: string) {
if (!alertId.startsWith(SCHEDULED_CONDITION_ALERT_ID_PREFIX)) return null;
return alertId.slice(SCHEDULED_CONDITION_ALERT_ID_PREFIX.length);
}