diff --git a/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx b/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx index c5a95da6..365435d8 100644 --- a/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx +++ b/login-workflow/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx @@ -161,9 +161,11 @@ export const ChangePasswordDialog: React.FC = (props) slots={slots} slotProps={{ SuccessScreen: { - icon: , - messageTitle: t('bluiAuth:PASSWORD_RESET.SUCCESS_MESSAGE'), - message: t('bluiAuth:CHANGE_PASSWORD.SUCCESS_MESSAGE'), + EmptyStateProps: { + icon: , + title: t('bluiAuth:PASSWORD_RESET.SUCCESS_MESSAGE'), + description: t('bluiAuth:CHANGE_PASSWORD.SUCCESS_MESSAGE'), + }, onDismiss: (): void => { onFinish?.(); }, diff --git a/login-workflow/src/screens/ExistingAccountSuccessScreen/ExistingAccountSuccessScreen.tsx b/login-workflow/src/screens/ExistingAccountSuccessScreen/ExistingAccountSuccessScreen.tsx index af89ba2b..45776143 100644 --- a/login-workflow/src/screens/ExistingAccountSuccessScreen/ExistingAccountSuccessScreen.tsx +++ b/login-workflow/src/screens/ExistingAccountSuccessScreen/ExistingAccountSuccessScreen.tsx @@ -22,13 +22,11 @@ export const ExistingAccountSuccessScreen: React.FC = (props const { navigate, routeConfig } = useRegistrationContext(); const { - icon = , - messageTitle = t('bluiCommon:MESSAGES.WELCOME'), - message = t('bluiRegistration:REGISTRATION.SUCCESS_EXISTING'), canDismiss = true, onDismiss = (): void => navigate(routeConfig.LOGIN as string), WorkflowCardHeaderProps, WorkflowCardActionsProps, + EmptyStateProps, ...otherExistingAccountSuccessScreenProps } = props; @@ -49,13 +47,18 @@ export const ExistingAccountSuccessScreen: React.FC = (props }, }; + const emptyStateProps = { + icon: , + title: t('bluiCommon:MESSAGES.WELCOME'), + description: t('bluiRegistration:REGISTRATION.SUCCESS_EXISTING'), + ...EmptyStateProps, + }; + return ( ); diff --git a/login-workflow/src/screens/ForgotPasswordScreen/ForgotPasswordScreen.tsx b/login-workflow/src/screens/ForgotPasswordScreen/ForgotPasswordScreen.tsx index add83a7f..410963a6 100644 --- a/login-workflow/src/screens/ForgotPasswordScreen/ForgotPasswordScreen.tsx +++ b/login-workflow/src/screens/ForgotPasswordScreen/ForgotPasswordScreen.tsx @@ -148,22 +148,27 @@ export const ForgotPasswordScreen: React.FC = (props) slots={slots} slotProps={{ SuccessScreen: { - icon: , - messageTitle: t('bluiCommon:MESSAGES.EMAIL_SENT'), - message: ( - - - Link has been sent to {emailInput}. - - - ), + EmptyStateProps: { + icon: , + title: t('bluiCommon:MESSAGES.EMAIL_SENT'), + description: ( + + + Link has been sent to {emailInput}. + + + ), + }, WorkflowCardHeaderProps: { title: t('bluiAuth:HEADER.FORGOT_PASSWORD'), }, diff --git a/login-workflow/src/screens/RegistrationSuccessScreen/RegistrationSuccessScreen.tsx b/login-workflow/src/screens/RegistrationSuccessScreen/RegistrationSuccessScreen.tsx index edcff8c6..66fc0869 100644 --- a/login-workflow/src/screens/RegistrationSuccessScreen/RegistrationSuccessScreen.tsx +++ b/login-workflow/src/screens/RegistrationSuccessScreen/RegistrationSuccessScreen.tsx @@ -33,27 +33,11 @@ export const RegistrationSuccessScreen: React.FC = (props) = } = useRegistrationWorkflowContext(); const { - icon = , - messageTitle = `${t('bluiCommon:MESSAGES.WELCOME')}, ${firstName} ${lastName}!`, - message = ( - - - Your account has successfully been created with the email {email} belonging to the - {` ${String(organization)}`} org. - - - ), onDismiss = (): void => navigate(routeConfig.LOGIN as string), canDismiss = true, WorkflowCardHeaderProps, WorkflowCardActionsProps, + EmptyStateProps, ...otherRegistrationSuccessScreenProps } = props; @@ -74,13 +58,32 @@ export const RegistrationSuccessScreen: React.FC = (props) = }, }; + const emptyStateProps = { + icon: , + title: `${t('bluiCommon:MESSAGES.WELCOME')}, ${firstName} ${lastName}!`, + description: ( + + + Your account has successfully been created with the email {email} belonging to the + {` ${String(organization)}`} org. + + + ), + ...EmptyStateProps, + }; + return ( ); diff --git a/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx b/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx index 8c090682..8298accf 100644 --- a/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx +++ b/login-workflow/src/screens/ResetPasswordScreen/ResetPasswordScreen.tsx @@ -181,9 +181,11 @@ export const ResetPasswordScreen: React.FC = (props) = slots={slots} slotProps={{ SuccessScreen: { - icon: , - messageTitle: t('bluiAuth:PASSWORD_RESET.SUCCESS_MESSAGE'), - message: t('bluiAuth:CHANGE_PASSWORD.SUCCESS_MESSAGE'), + EmptyStateProps: { + icon: , + title: t('bluiAuth:PASSWORD_RESET.SUCCESS_MESSAGE'), + description: t('bluiAuth:CHANGE_PASSWORD.SUCCESS_MESSAGE'), + }, WorkflowCardActionsProps: { showPrevious: false, fullWidthButton: true, diff --git a/login-workflow/src/screens/SuccessScreen/SuccessScreenBase.tsx b/login-workflow/src/screens/SuccessScreen/SuccessScreenBase.tsx index 4b8a1934..a2a7108b 100644 --- a/login-workflow/src/screens/SuccessScreen/SuccessScreenBase.tsx +++ b/login-workflow/src/screens/SuccessScreen/SuccessScreenBase.tsx @@ -28,15 +28,7 @@ import Box from '@mui/material/Box'; */ export const SuccessScreenBase: React.FC = (props) => { - const { - icon, - messageTitle = '', - message = '', - dismissButtonLabel = '', - canDismiss, - onDismiss, - ...emptyStateProps - } = props; + const { EmptyStateProps, dismissButtonLabel = '', canDismiss, onDismiss } = props; const cardBaseProps = props.WorkflowCardBaseProps || {}; const headerProps = props.WorkflowCardHeaderProps || {}; @@ -60,16 +52,15 @@ export const SuccessScreenBase: React.FC = (props) => { }, ]} > - + {EmptyStateProps && ( + + )}