+7








225313e391
* plain custom desin * No display on card * dynamic plain chat component and hmac hash * re-route users to plain.com chat instead of intercom chat when going to /support * provider errors * yarn lock fix * plain chat removed unneeded hmac * fix ts error * error handling improved * remove intercome provider from app-dir * Create getting-started.mdx (#18342) * Delete help directory (#18343) * chore: moved docs/help to /help (#18345) * chore: Delete unused guides directory (#18346) * feat: booking filters (#18303) Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> * chore: Remove `HeadSeo` components where no longer needed + improve app router metadata logic (#18348) * remove HeadSeo for already migrated pages and refactor prepareMetadata * create _generateMetadataWithoutImage and refactor _generateMetadata * chore: app router - /bookings status page (#18183) * chore: app router - /bookings page * remove env vars * fix * Update middleware.ts * revert unneeded change * refactor for the better * fix * cache i18n instances (#18309) * feat: virtual queues tab in insights (#18260) Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: sean-brydon <sean@cal.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Omar López <zomars@me.com> * feat: update translations via @replexica (#18361) Co-authored-by: Replexica <support@replexica.com> * update OOO e2e tests to remove flakiness (#18367) * fix: metadata is overwritten for child managed eventType when updating parent (#18059) * fix: metadata is overwirten * Update * type error * Update * fix test * fix type error * chore: added routing support link (#18369) * Added routing form support link * small change * Type fix --------- Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com> * chore: refactor handling logic for embeds in app router (#18362) * refactor handling logic for embeds in app router * fix type checks * add test for withEmbedSsrAppDir * fix * review changes * yarn lock --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Calcom Bot <109866826+calcom-bot@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: Benny Joo <sldisek783@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: sean-brydon <sean@cal.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Omar López <zomars@me.com> Co-authored-by: Replexica <support@replexica.com> Co-authored-by: Vijay <vijayraghav22@gmail.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com> Co-authored-by: Alex van Andel <me@alexvanandel.com>
165 lines
3.5 KiB
TypeScript
165 lines
3.5 KiB
TypeScript
/* eslint-disable import/no-anonymous-default-export */
|
|
import type { Card } from "@pages/api/plain";
|
|
|
|
export default (
|
|
email: string,
|
|
id: string,
|
|
username: string,
|
|
timeZone: string,
|
|
emailVerified: Date | null,
|
|
twoFactorEnabled: boolean | null
|
|
): Card => {
|
|
return {
|
|
key: "customer-card",
|
|
timeToLiveSeconds: null,
|
|
components: [
|
|
{
|
|
componentSpacer: {
|
|
spacerSize: "M",
|
|
},
|
|
},
|
|
{
|
|
componentRow: {
|
|
rowMainContent: [
|
|
{
|
|
componentText: {
|
|
text: "Email",
|
|
textColor: "MUTED",
|
|
},
|
|
},
|
|
],
|
|
rowAsideContent: [
|
|
{
|
|
componentText: {
|
|
text: email || "Unknown",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
componentSpacer: {
|
|
spacerSize: "M",
|
|
},
|
|
},
|
|
{
|
|
componentRow: {
|
|
rowMainContent: [
|
|
{
|
|
componentText: {
|
|
text: "Email Verified?",
|
|
textColor: "MUTED",
|
|
},
|
|
},
|
|
],
|
|
rowAsideContent: [
|
|
{
|
|
componentBadge: {
|
|
badgeLabel: emailVerified === null ? "No" : emailVerified ? "Yes" : "No",
|
|
badgeColor: emailVerified === null ? "RED" : emailVerified ? "GREEN" : "RED",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
componentSpacer: {
|
|
spacerSize: "M",
|
|
},
|
|
},
|
|
{
|
|
componentRow: {
|
|
rowMainContent: [
|
|
{
|
|
componentText: {
|
|
text: "Username",
|
|
textColor: "MUTED",
|
|
},
|
|
},
|
|
],
|
|
rowAsideContent: [
|
|
{
|
|
componentText: {
|
|
text: username || "Unknown",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
componentSpacer: {
|
|
spacerSize: "M",
|
|
},
|
|
},
|
|
{
|
|
componentRow: {
|
|
rowMainContent: [
|
|
{
|
|
componentText: {
|
|
text: "User ID",
|
|
textColor: "MUTED",
|
|
},
|
|
},
|
|
],
|
|
rowAsideContent: [
|
|
{
|
|
componentText: {
|
|
text: id || "Unknown",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
componentSpacer: {
|
|
spacerSize: "M",
|
|
},
|
|
},
|
|
{
|
|
componentRow: {
|
|
rowMainContent: [
|
|
{
|
|
componentText: {
|
|
text: "Time Zone",
|
|
textColor: "MUTED",
|
|
},
|
|
},
|
|
],
|
|
rowAsideContent: [
|
|
{
|
|
componentText: {
|
|
text: timeZone || "Unknown",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
componentSpacer: {
|
|
spacerSize: "M",
|
|
},
|
|
},
|
|
{
|
|
componentRow: {
|
|
rowMainContent: [
|
|
{
|
|
componentText: {
|
|
text: "Two Factor Enabled?",
|
|
textColor: "MUTED",
|
|
},
|
|
},
|
|
],
|
|
rowAsideContent: [
|
|
{
|
|
componentBadge: {
|
|
badgeLabel: twoFactorEnabled === null ? "No" : twoFactorEnabled ? "Yes" : "No",
|
|
badgeColor: twoFactorEnabled === null ? "RED" : twoFactorEnabled ? "GREEN" : "RED",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
};
|
|
};
|