feat: SMS/Whatsapp to attendee for teams (#14648)
* remove event type requires confirmation * allow sms sending also for team (frontend) * allow text to attendee for team (backend) * add rate limiting for SMS (WIP) * add functionality to lock and unlock SMS sending (+admin UI view) * rename to smsLockState * add ability to lock users and teams * don't send sms if locked * add missing imports * fix rate limit namespace * add translation * fix type error * remove prop from UsersTable * add smsLockState to buildUser * code clean up * create seperate sms rate limit function * fix type error * add missing userId and teamId to sendSMS * code improvements * add User Team type * fix marking as reviewed * check monthly sms limit only for user * don't lock orgs * fix type error * fix avatars * fix type error * fix type error * fix type error --------- Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
34 files changed
+725
-164
No files matched your search
@@ -4,7 +4,7 @@ import { components as reactSelectComponents } from "react-select";
|
||||
import { classNames } from "@calcom/lib";
|
||||
|
||||
import { Icon } from "../../..";
|
||||
import { UpgradeTeamsBadge, UpgradeOrgsBadge } from "../../badge";
|
||||
import { UpgradeTeamsBadge } from "../../badge";
|
||||
import type { SelectProps } from "./Select";
|
||||
|
||||
export const InputComponent = <
|
||||
@@ -31,7 +31,6 @@ type ExtendedOption = {
|
||||
value: string | number;
|
||||
label: string;
|
||||
needsTeamsUpgrade?: boolean;
|
||||
needsOrgsUpgrade?: boolean;
|
||||
};
|
||||
|
||||
export const OptionComponent = <
|
||||
@@ -48,13 +47,7 @@ export const OptionComponent = <
|
||||
<span className="mr-auto" data-testid={`select-option-${(props as unknown as ExtendedOption).value}`}>
|
||||
{props.label || <> </>}
|
||||
</span>
|
||||
{(props.data as unknown as ExtendedOption).needsTeamsUpgrade ? (
|
||||
<UpgradeTeamsBadge />
|
||||
) : (props.data as unknown as ExtendedOption).needsOrgsUpgrade ? (
|
||||
<UpgradeOrgsBadge />
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
{(props.data as unknown as ExtendedOption).needsTeamsUpgrade ? <UpgradeTeamsBadge /> : <></>}
|
||||
{props.isSelected && <Icon name="check" className="ml-2 h-4 w-4" />}
|
||||
</div>
|
||||
</reactSelectComponents.Option>
|
||||
|
||||
Reference in new issue
Block a user