make SMS available for all users again (#5656)
Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
4 files changed
+10
-40
No files matched your search
@@ -29,7 +29,6 @@ interface IAddActionDialog {
|
||||
isOpenDialog: boolean;
|
||||
setIsOpenDialog: Dispatch<SetStateAction<boolean>>;
|
||||
addAction: (action: WorkflowActions, sendTo?: string, numberRequired?: boolean, sender?: string) => void;
|
||||
isFreeUser: boolean;
|
||||
}
|
||||
|
||||
interface ISelectActionOption {
|
||||
@@ -44,20 +43,13 @@ type AddActionFormValues = {
|
||||
sender?: string;
|
||||
};
|
||||
|
||||
const cleanUpActionsForFreeUser = (actions: ISelectActionOption[]) => {
|
||||
return actions.filter(
|
||||
(item) => item.value !== WorkflowActions.SMS_ATTENDEE && item.value !== WorkflowActions.SMS_NUMBER
|
||||
);
|
||||
};
|
||||
|
||||
export const AddActionDialog = (props: IAddActionDialog) => {
|
||||
const { t } = useLocale();
|
||||
const { isOpenDialog, setIsOpenDialog, addAction, isFreeUser } = props;
|
||||
const { isOpenDialog, setIsOpenDialog, addAction } = props;
|
||||
const [isPhoneNumberNeeded, setIsPhoneNumberNeeded] = useState(false);
|
||||
const [isSenderIdNeeded, setIsSenderIdNeeded] = useState(false);
|
||||
const [isEmailAddressNeeded, setIsEmailAddressNeeded] = useState(false);
|
||||
const workflowActions = getWorkflowActionOptions(t);
|
||||
const actionOptions = isFreeUser ? cleanUpActionsForFreeUser(workflowActions) : workflowActions;
|
||||
const actionOptions = getWorkflowActionOptions(t);
|
||||
|
||||
const formSchema = z.object({
|
||||
action: z.enum(WORKFLOW_ACTIONS),
|
||||
|
||||
Reference in new issue
Block a user