From 8ca0aee25eca7e428678ce7b2af4136cdf0764b3 Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Wed, 7 May 2025 10:32:32 +0200 Subject: [PATCH] fix(LOY-196): replace employee number with dummy value add support for className to modal --- apps/scandic-web/components/Modal/index.tsx | 11 ++++++++--- apps/scandic-web/components/Modal/modal.ts | 1 + .../MyPages/DigitalTeamMemberCard/Client.tsx | 4 +++- .../digitalTeamMemberCard.module.css | 6 ++++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/apps/scandic-web/components/Modal/index.tsx b/apps/scandic-web/components/Modal/index.tsx index 19eb3e8e8..cd4a9be32 100644 --- a/apps/scandic-web/components/Modal/index.tsx +++ b/apps/scandic-web/components/Modal/index.tsx @@ -1,5 +1,6 @@ "use client" +import { cx } from "class-variance-authority" import { motion } from "framer-motion" import { type PropsWithChildren, useEffect, useState } from "react" import { @@ -40,6 +41,7 @@ function InnerModal({ subtitle, withActions, hideHeader, + className, }: PropsWithChildren) { const intl = useIntl() @@ -67,7 +69,7 @@ function InnerModal({ ) { const [animation, setAnimation] = useState( AnimationStateEnum.visible @@ -163,6 +166,7 @@ export default function Modal({ subtitle={subtitle} withActions={withActions} hideHeader={hideHeader} + className={className} > {children} @@ -185,6 +189,7 @@ export default function Modal({ title={title} subtitle={subtitle} withActions={withActions} + className={className} > {children} diff --git a/apps/scandic-web/components/Modal/modal.ts b/apps/scandic-web/components/Modal/modal.ts index a86764a88..48e7d2dde 100644 --- a/apps/scandic-web/components/Modal/modal.ts +++ b/apps/scandic-web/components/Modal/modal.ts @@ -14,6 +14,7 @@ export type ModalProps = { subtitle?: string withActions?: boolean hideHeader?: boolean + className?: string } & ( | { trigger: JSX.Element; isOpen?: never; onToggle?: never } | { diff --git a/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Client.tsx b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Client.tsx index 5d28f2ee3..c18f8be54 100644 --- a/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Client.tsx +++ b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Client.tsx @@ -36,6 +36,7 @@ export default function DigitalTeamMemberCardClient({ } + className={styles.modal} >

@@ -60,7 +61,8 @@ export default function DigitalTeamMemberCardClient({
{/* TODO: Should display employee number */} -
{user.membershipNumber}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} +
123 456