diff --git a/apps/scandic-web/.env.local.example b/apps/scandic-web/.env.local.example index 717a25f53..6a4288baa 100644 --- a/apps/scandic-web/.env.local.example +++ b/apps/scandic-web/.env.local.example @@ -57,6 +57,7 @@ NEXT_PUBLIC_HIDE_FOR_NEXT_RELEASE="false" ENABLE_BOOKING_WIDGET="false" ENABLE_BOOKING_WIDGET_HOTELRESERVATION_PATH="false" ENABLE_SURPRISES="true" +ENABLE_DTMC="true" SHOW_SITE_WIDE_ALERT="false" SHOW_SIGNUP_FLOW="true" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Overview/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Overview/index.tsx index 481ad7694..dc67a265f 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Overview/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Overview/index.tsx @@ -1,5 +1,6 @@ import { getProfile } from "@/lib/trpc/memoizedRequests" +import DigitalTeamMemberCard from "@/components/MyPages/DigitalTeamMemberCard" import SectionContainer from "@/components/Section/Container" import SectionHeader from "@/components/Section/Header" import SectionLink from "@/components/Section/Link" @@ -30,9 +31,10 @@ export default async function Overview({ link={link} preamble={subtitle} title={title} - headingAs={"h3"} - headingLevel={"h1"} + headingAs="h3" + headingLevel="h1" /> + diff --git a/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/digitalTeamMemberCard.module.css b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/digitalTeamMemberCard.module.css new file mode 100644 index 000000000..ce4f6aa0a --- /dev/null +++ b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/digitalTeamMemberCard.module.css @@ -0,0 +1,30 @@ +.card { + padding: var(--Space-x2) var(--Space-x15); + border-radius: var(--Corner-radius-md); + border: 0; + cursor: pointer; + background: var(--Surface-Brand-Primary-1-OnSurface-Default); + color: var(--Text-Brand-OnPrimary-3-Accent); + + &:focus, + &:hover { + background: + linear-gradient( + 0deg, + rgb(255 255 255 / 10%) 0%, + rgb(255 255 255 / 10%) 100% + ), + var(--Surface-Brand-Primary-1-OnSurface-Default); + } + &:disabled { + background: var(--Surface-UI-Fill-Disabled); + color: var(--Text-Interactive-Disabled); + } +} + +.text { + display: flex; + justify-content: center; + align-items: center; + gap: var(--Space-x1); +} diff --git a/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/index.tsx b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/index.tsx new file mode 100644 index 000000000..78281966e --- /dev/null +++ b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/index.tsx @@ -0,0 +1,37 @@ +import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" +import { Typography } from "@scandic-hotels/design-system/Typography" + +import { env } from "@/env/server" + +import { getIntl } from "@/i18n" + +import styles from "./digitalTeamMemberCard.module.css" + +import type { User } from "@/types/user" + +interface DigitalTeamMemberCardProps { + user: User +} + +export default async function DigitalTeamMemberCard( + // TODO: Make a check whether user is eligible for benefits or not + _props: DigitalTeamMemberCardProps +) { + if (!env.ENABLE_DTMC) { + return null + } + + const intl = await getIntl() + + return ( + + ) +} diff --git a/apps/scandic-web/env/server.ts b/apps/scandic-web/env/server.ts index 39bc28218..63f24c264 100644 --- a/apps/scandic-web/env/server.ts +++ b/apps/scandic-web/env/server.ts @@ -126,6 +126,13 @@ const _env = createEnv({ // transform to boolean .transform((s) => s === "true") .default("false"), + ENABLE_DTMC: z + .string() + // only allow "true" or "false" + .refine((s) => s === "true" || s === "false") + // transform to boolean + .transform((s) => s === "true") + .default("false"), SHOW_SITE_WIDE_ALERT: z .string() // only allow "true" or "false" @@ -267,6 +274,7 @@ const _env = createEnv({ USE_NEW_REWARD_MODEL: process.env.USE_NEW_REWARD_MODEL, ENABLE_BOOKING_WIDGET: process.env.ENABLE_BOOKING_WIDGET, ENABLE_SURPRISES: process.env.ENABLE_SURPRISES, + ENABLE_DTMC: process.env.ENABLE_DTMC, SHOW_SITE_WIDE_ALERT: process.env.SHOW_SITE_WIDE_ALERT, SENTRY_ENVIRONMENT: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT, SENTRY_SERVER_SAMPLERATE: process.env.SENTRY_SERVER_SAMPLERATE, diff --git a/apps/scandic-web/public/_static/fonts/material-symbols/rounded-481ed751.woff2 b/apps/scandic-web/public/_static/fonts/material-symbols/rounded-481ed751.woff2 new file mode 100644 index 000000000..494e8df02 Binary files /dev/null and b/apps/scandic-web/public/_static/fonts/material-symbols/rounded-481ed751.woff2 differ diff --git a/apps/scandic-web/public/_static/fonts/material-symbols/rounded-a03ed056.woff2 b/apps/scandic-web/public/_static/fonts/material-symbols/rounded-a03ed056.woff2 deleted file mode 100644 index 84209fed1..000000000 Binary files a/apps/scandic-web/public/_static/fonts/material-symbols/rounded-a03ed056.woff2 and /dev/null differ diff --git a/packages/design-system/lib/fonts.css b/packages/design-system/lib/fonts.css index 036360d2d..f5ddf6be2 100644 --- a/packages/design-system/lib/fonts.css +++ b/packages/design-system/lib/fonts.css @@ -269,7 +269,7 @@ font-style: normal; font-weight: 400; font-display: block; - src: url(/_static/fonts/material-symbols/rounded-a03ed056.woff2) + src: url(/_static/fonts/material-symbols/rounded-481ed751.woff2) format('woff2'); } diff --git a/packages/design-system/public/_static/fonts/material-symbols/rounded-481ed751.woff2 b/packages/design-system/public/_static/fonts/material-symbols/rounded-481ed751.woff2 new file mode 100644 index 000000000..494e8df02 Binary files /dev/null and b/packages/design-system/public/_static/fonts/material-symbols/rounded-481ed751.woff2 differ diff --git a/packages/design-system/public/_static/fonts/material-symbols/rounded-a03ed056.woff2 b/packages/design-system/public/_static/fonts/material-symbols/rounded-a03ed056.woff2 deleted file mode 100644 index 84209fed1..000000000 Binary files a/packages/design-system/public/_static/fonts/material-symbols/rounded-a03ed056.woff2 and /dev/null differ diff --git a/scripts/material-symbols-update.mjs b/scripts/material-symbols-update.mjs index 22839bf0e..468d0d948 100644 --- a/scripts/material-symbols-update.mjs +++ b/scripts/material-symbols-update.mjs @@ -120,6 +120,7 @@ const icons = [ 'hot_tub', 'houseboat', 'hvac', + 'id_card', 'imagesmode', 'info', 'iron',