diff --git a/apps/api/v1/pages/api/teams/_post.ts b/apps/api/v1/pages/api/teams/_post.ts
index e2f9a1d43f..8fcc00fe22 100644
--- a/apps/api/v1/pages/api/teams/_post.ts
+++ b/apps/api/v1/pages/api/teams/_post.ts
@@ -2,6 +2,7 @@ import type { NextApiRequest } from "next";
import { getStripeCustomerIdFromUserId } from "@calcom/app-store/stripepayment/lib/customer";
import stripe from "@calcom/app-store/stripepayment/lib/server";
+import { IS_PRODUCTION } from "@calcom/lib/constants";
import { IS_TEAM_BILLING_ENABLED, WEBAPP_URL } from "@calcom/lib/constants";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server";
@@ -197,8 +198,9 @@ const generateTeamCheckoutSession = async ({
customer_update: {
address: "auto",
},
+ // Disabled when testing locally as usually developer doesn't setup Tax in Stripe Test mode
automatic_tax: {
- enabled: true,
+ enabled: IS_PRODUCTION,
},
metadata: {
pendingPaymentTeamId,
diff --git a/apps/web/app/future/settings/organizations/[id]/set-password/page.tsx b/apps/web/app/future/settings/organizations/[id]/set-password/page.tsx
deleted file mode 100644
index 3ffb2a3a50..0000000000
--- a/apps/web/app/future/settings/organizations/[id]/set-password/page.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import LegacyPage, { WrappedSetPasswordPage } from "@pages/settings/organizations/[id]/set-password";
-import { _generateMetadata } from "app/_utils";
-import { WithLayout } from "app/layoutHOC";
-
-export const generateMetadata = async () =>
- await _generateMetadata(
- (t) => t("set_a_password"),
- (t) => t("set_a_password_description")
- );
-
-export default WithLayout({ Page: LegacyPage, getLayout: WrappedSetPasswordPage });
diff --git a/apps/web/pages/settings/organizations/[id]/add-teams.tsx b/apps/web/pages/settings/organizations/[id]/add-teams.tsx
index 450614e07a..9f3e21221c 100644
--- a/apps/web/pages/settings/organizations/[id]/add-teams.tsx
+++ b/apps/web/pages/settings/organizations/[id]/add-teams.tsx
@@ -1,7 +1,5 @@
"use client";
-import { redirect, useRouter } from "next/navigation";
-
import { AddNewTeamsForm } from "@calcom/features/ee/organizations/components";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Meta, WizardLayout } from "@calcom/ui";
@@ -22,16 +20,8 @@ const AddNewTeamsPage = () => {
};
AddNewTeamsPage.getLayout = (page: React.ReactElement) => {
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const router = useRouter();
-
return (
-
+ <>{props.language(`You have created ${props.orgName} organization.`)}>
+
+ <>
+ {props.language(`You have been added as an owner of the organization.`, {
+ invitedBy: props.from.toString(),
+ appName: APP_NAME,
+ })}
+ >
+
+
+ <>
+ {props.language("email_no_user_signoff", {
+ appName: APP_NAME,
+ })}
+ >
+
+ <>
+ {props.language("have_any_questions")}{" "}
+
+ <>{props.language("contact")}>
+ {" "}
+ {props.language("our_support_team")}
+ >
+
- <>
- {props.language(
- `email_no_user_invite_heading_${props.isOrg ? "org" : props.parentTeamName ? "subteam" : "team"}`,
- {
- appName: APP_NAME,
- parentTeamName: props.parentTeamName,
- }
- )}
- >
+ <>{heading}>
Please note: All of your personal event types will be moved into the {teamName} organization, which may also include potential personal link.
For personal events we recommend creating a new account with a personal email address.",
+ "email|existing_user_added_link_changed":"Your link has been changed from {prevLinkWithoutProtocol} to {newLinkWithoutProtocol} but don't worry, all previous links still work and redirect appropriately.
Please note: All of your personal event types have been moved into the {teamName} organisation, which may also include potential personal link.
Please log in and make sure you have no private events on your new organisational account.
For personal events we recommend creating a new account with a personal email address.
Enjoy your new clean link: {newLinkWithoutProtocol}",
+ "email_organization_created|subject": "Your organization has been created",
+ "your_current_plan":"Your current plan",
+ "organization_price_per_user_month":"$37 per user per month (30 seats minimum)",
"privacy_organization_description": "Manage privacy settings for your organization",
"privacy": "Privacy",
"team_will_be_under_org": "New teams will be under your organization",
diff --git a/packages/emails/email-manager.ts b/packages/emails/email-manager.ts
index dd3b765e42..aca5ad30b5 100644
--- a/packages/emails/email-manager.ts
+++ b/packages/emails/email-manager.ts
@@ -38,6 +38,8 @@ import MonthlyDigestEmail from "./templates/monthly-digest-email";
import NoShowFeeChargedEmail from "./templates/no-show-fee-charged-email";
import type { OrgAutoInvite } from "./templates/org-auto-join-invite";
import OrgAutoJoinEmail from "./templates/org-auto-join-invite";
+import type { OrganizationCreation } from "./templates/organization-creation-email";
+import OrganizationCreationEmail from "./templates/organization-creation-email";
import type { OrganizationEmailVerify } from "./templates/organization-email-verification";
import OrganizationEmailVerification from "./templates/organization-email-verification";
import OrganizerAttendeeCancelledSeatEmail from "./templates/organizer-attendee-cancelled-seat-email";
@@ -327,6 +329,10 @@ export const sendTeamInviteEmail = async (teamInviteEvent: TeamInvite) => {
await sendEmail(() => new TeamInviteEmail(teamInviteEvent));
};
+export const sendOrganizationCreationEmail = async (organizationCreationEvent: OrganizationCreation) => {
+ await sendEmail(() => new OrganizationCreationEmail(organizationCreationEvent));
+};
+
export const sendOrganizationAutoJoinEmail = async (orgInviteEvent: OrgAutoInvite) => {
await sendEmail(() => new OrgAutoJoinEmail(orgInviteEvent));
};
diff --git a/packages/emails/src/templates/OrganizationCreationEmail.tsx b/packages/emails/src/templates/OrganizationCreationEmail.tsx
new file mode 100644
index 0000000000..a78f24f31b
--- /dev/null
+++ b/packages/emails/src/templates/OrganizationCreationEmail.tsx
@@ -0,0 +1,105 @@
+import { Trans } from "next-i18next";
+
+import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";
+
+import type { OrganizationCreation } from "../../templates/organization-creation-email";
+import { V2BaseEmailHtml } from "../components";
+
+export const OrganizationCreationEmail = (
+ props: OrganizationCreation & Partial
+
+
+ Please note: All of your personal event types have been moved into the
+ {teamName}
+ {" "}
+ organisation, which may also include potential personal link.
+
+
+ Please log in and make sure you have no private events on your new organisational account.
+
+
+ For personal events we recommend creating a new account with a personal email address.
+
+
+ Enjoy your new clean link: {newLinkWithoutProtocol}
+
- <>
- {props.language(
- `email_user_invite_subheading_${props.isOrg ? "org" : props.parentTeamName ? "subteam" : "team"}`,
- {
- invitedBy: props.from.toString(),
- appName: APP_NAME,
- teamName: props.teamName,
- parentTeamName: props.parentTeamName,
- }
- )}
- >
+ <>{content}>
);
+
+ function getHeading() {
+ const autoJoinType = props.isAutoJoin ? "added" : "invited";
+ const variables = {
+ appName: APP_NAME,
+ parentTeamName: props.parentTeamName,
+ };
+
+ if (typeOfInvite === "TO_ORG") {
+ return props.language(`email_team_invite|heading|${autoJoinType}_to_org`, variables);
+ }
+
+ if (typeOfInvite === "TO_SUBTEAM") {
+ return props.language(`email_team_invite|heading|${autoJoinType}_to_subteam`, variables);
+ }
+
+ return props.language(`email_team_invite|heading|invited_to_regular_team`, variables);
+ }
+
+ function getContent() {
+ const autoJoinType = props.isAutoJoin ? "added" : "invited";
+
+ const variables = {
+ invitedBy: props.from.toString(),
+ appName: APP_NAME,
+ teamName: props.teamName,
+ parentTeamName: props.parentTeamName,
+ prevLink: props.prevLink,
+ newLink: props.newLink,
+ orgName: props.parentTeamName ?? props.isOrg ? props.teamName : "",
+ prevLinkWithoutProtocol: props.prevLink?.replace(/https?:\/\//, ""),
+ newLinkWithoutProtocol: props.newLink?.replace(/https?:\/\//, ""),
+ };
+
+ const {
+ prevLink,
+ newLink,
+ teamName,
+ invitedBy,
+ appName,
+ parentTeamName,
+ prevLinkWithoutProtocol,
+ newLinkWithoutProtocol,
+ } = variables;
+ if (typeOfInvite === "TO_ORG") {
+ if (props.isExistingUserMovedToOrg) {
+ return (
+ <>
+ {autoJoinType == "added" ? (
+ <>
+
+
+ Please note: All of your personal event types have been moved into the{" "}
+ {teamName} organisation, which may also include potential personal link.
+
+
+ Please log in and make sure you have no private events on your new organisational account.
+
+
+ For personal events we recommend creating a new account with a personal email address.
+
+
+ Enjoy your new clean link: {newLinkWithoutProtocol}
+
+
+ Please note: All of your personal event types will be moved into the{" "}
+ {teamName} organisation, which may also include potential personal link.
+
+
+ For personal events we recommend creating a new account with a personal email address.
+