Removes EMAIL_ADDRESS action (#6102)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/6025/head^2
Carina Wollendorfer 2022-12-19 14:50:14 +01:00 committed by GitHub
parent 3e42da7fc7
commit 9a72c648c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 9 deletions

View File

@ -4,17 +4,18 @@ import { TFunction } from "next-i18next";
import { TIME_UNIT, WORKFLOW_ACTIONS, WORKFLOW_TEMPLATES, WORKFLOW_TRIGGER_EVENTS } from "./constants";
export function getWorkflowActionOptions(t: TFunction, isTeamsPlan?: boolean) {
return WORKFLOW_ACTIONS.map((action) => {
const actionString = t(`${action.toLowerCase()}_action`);
return WORKFLOW_ACTIONS.filter((action) => action !== WorkflowActions.EMAIL_ADDRESS) //removing EMAIL_ADDRESS for now due to abuse episode
.map((action) => {
const actionString = t(`${action.toLowerCase()}_action`);
const isSMSAction = action === WorkflowActions.SMS_ATTENDEE || action === WorkflowActions.SMS_NUMBER;
const isSMSAction = action === WorkflowActions.SMS_ATTENDEE || action === WorkflowActions.SMS_NUMBER;
return {
label: actionString.charAt(0).toUpperCase() + actionString.slice(1),
value: action,
disabled: isSMSAction && !isTeamsPlan,
};
});
return {
label: actionString.charAt(0).toUpperCase() + actionString.slice(1),
value: action,
disabled: isSMSAction && !isTeamsPlan,
};
});
}
export function getWorkflowTriggerOptions(t: TFunction) {