* WIP * Locked fields manager * Leftovers * Bad merge fix * Type import fix * Moving away from classes * Progress refactoring locked logic * Covering apps, webhooks and workflows * Supporting webhooks and workflows (TBT) * Restoring yarn.lock * Progress * Refactoring code, adding default values * Fixing CRUD for children * Connect app link and case-sensitive lib renaming * Translation missing * Locked indicators, empty screens, locations * Member card and hidden status + missing i18n * Missing existent children shown * Showing preview for already created children * Email notification almost in place * Making progress over notif email * Fixing nodemailer by mixed FE/BE mixup * Delete dialog * Adding tests * New test * Reverting unneeded change * Removed console.log * Tweaking email * Reverting not applicable webhook changes * Reverting dev email api * Fixing last changes due to tests * Changing user-evType relationship * Availability and slug replacement tweaks * Fixing event type delete * Sometimes slug is not there... * Removing old webhooks references Changed slug hint * Fixing types * Fixing hiding event types actions * Changing delete dialog text * Removing unneeded code * Applying feedback * Update yarn.lock * Making sure locked fields values are static * Applying feedback * Feedback + relying on children list, not users * Removing console.log * PR Feedback * Telemetry for slug replacement action * More unit tests * Relying on schedule and editor tweaks * Fixing conteiner classname * PR Feedback * PR Feedback * Updating unit tests * Moving stuff to ee, added feature flag * type fix * Including e2e * Reverting unneeded changes in EmptyScreen * Fixing some UI issues after merging tokens * Fixing missing disabled locked fields * Theme fixes + e2e potential fix * Fixing e2e * Fixing login relying on network * Tweaking e2e * Removing unneeded code --------- Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: zomars <[email protected]>
71 lines
2.2 KiB
TypeScript
71 lines
2.2 KiB
TypeScript
import type { CSSProperties } from "react";
|
|
|
|
import { BASE_URL, IS_PRODUCTION } from "@calcom/lib/constants";
|
|
|
|
import EmailCommonDivider from "./EmailCommonDivider";
|
|
import Row from "./Row";
|
|
|
|
export type BodyHeadType = "checkCircle" | "xCircle" | "calendarCircle" | "teamCircle";
|
|
|
|
export const getHeadImage = (headerType: BodyHeadType): string => {
|
|
switch (headerType) {
|
|
case "checkCircle":
|
|
return IS_PRODUCTION
|
|
? BASE_URL + "/emails/[email protected]"
|
|
: "https://app.cal.com/emails/[email protected]";
|
|
case "xCircle":
|
|
return IS_PRODUCTION
|
|
? BASE_URL + "/emails/[email protected]"
|
|
: "https://app.cal.com/emails/[email protected]";
|
|
case "calendarCircle":
|
|
return IS_PRODUCTION
|
|
? BASE_URL + "/emails/[email protected]"
|
|
: "https://app.cal.com/emails/[email protected]";
|
|
case "teamCircle":
|
|
return IS_PRODUCTION
|
|
? BASE_URL + "/emails/[email protected]"
|
|
: "https://app.cal.com/emails/[email protected]";
|
|
}
|
|
};
|
|
|
|
const EmailSchedulingBodyHeader = (props: { headerType: BodyHeadType; headStyles?: CSSProperties }) => {
|
|
const image = getHeadImage(props.headerType);
|
|
|
|
return (
|
|
<>
|
|
<EmailCommonDivider
|
|
headStyles={{ padding: "30px 30px 0 30px", borderTop: "1px solid #E1E1E1", ...props.headStyles }}>
|
|
<td
|
|
align="center"
|
|
style={{
|
|
fontSize: "0px",
|
|
padding: "10px 25px",
|
|
wordBreak: "break-word",
|
|
}}>
|
|
<Row border="0" role="presentation" style={{ borderCollapse: "collapse", borderSpacing: "0px" }}>
|
|
<td style={{ width: 64 }}>
|
|
<img
|
|
height="64"
|
|
src={image}
|
|
style={{
|
|
border: "0",
|
|
display: "block",
|
|
outline: "none",
|
|
textDecoration: "none",
|
|
height: "64px",
|
|
width: "100%",
|
|
fontSize: "13px",
|
|
}}
|
|
width="64"
|
|
alt=""
|
|
/>
|
|
</td>
|
|
</Row>
|
|
</td>
|
|
</EmailCommonDivider>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default EmailSchedulingBodyHeader;
|