init payment

master
alex 2024-02-17 22:08:30 +01:00
parent 7ca71a8b1e
commit d327825b76
3 changed files with 19 additions and 0 deletions

View File

@ -156,6 +156,10 @@
"stateInitLogin": { "stateInitLogin": {
"info": "Ihr Konto wurde neu erstellt und hat noch kein Passwort. Bitte legen Sie ein Passwort fest, um sich anzumelden." "info": "Ihr Konto wurde neu erstellt und hat noch kein Passwort. Bitte legen Sie ein Passwort fest, um sich anzumelden."
}, },
"stateInitPayment": {
"title": "Zahlung ausstehend",
"description": "Bitte schließen Sie die Zahlung ab, um sich anzumelden."
},
"request": { "request": {
"400": { "400": {
"title": "Anmeldung fehlgeschlagen", "title": "Anmeldung fehlgeschlagen",

View File

@ -30,6 +30,7 @@ const LoginStep = {
BANNED: 5, BANNED: 5,
_BACK_TO_PASSWORD: 6, // needed for going back from pending deletion to password step as the useEffect for the account name is triggered and would set the step to account name _BACK_TO_PASSWORD: 6, // needed for going back from pending deletion to password step as the useEffect for the account name is triggered and would set the step to account name
PENDING_EMAIL_VERIFICATION: 7, PENDING_EMAIL_VERIFICATION: 7,
INIT_PAYMENT: 8,
}; };
// First step: account name -> get state of account by backend // First step: account name -> get state of account by backend
@ -129,6 +130,16 @@ export function Login({ notificationApi }) {
return <PendingEmailVerification />; return <PendingEmailVerification />;
} }
if (step === LoginStep.INIT_PAYMENT) {
return (
<Result
status="warning"
title={t("authentication.login.stateInitPayment.title")}
subTitle={t("authentication.login.stateInitPayment.description")}
/>
);
}
return ( return (
<Form <Form
form={form} form={form}
@ -252,6 +263,9 @@ export function Login({ notificationApi }) {
case Constants.ACCOUNT_STATE.PENDING_EMAIL_VERIFICATION: case Constants.ACCOUNT_STATE.PENDING_EMAIL_VERIFICATION:
setStep(LoginStep.PENDING_EMAIL_VERIFICATION); setStep(LoginStep.PENDING_EMAIL_VERIFICATION);
break; break;
case Constants.ACCOUNT_STATE.INIT_PAYMENT:
setStep(LoginStep.INIT_PAYMENT);
break;
default: default:
showUnkownErrorNotification(notificationApi, t); showUnkownErrorNotification(notificationApi, t);
break; break;

View File

@ -103,6 +103,7 @@ export const Constants = {
INIT_LOGGING: 2, INIT_LOGGING: 2,
BANNED: 3, BANNED: 3,
PENDING_EMAIL_VERIFICATION: 4, PENDING_EMAIL_VERIFICATION: 4,
INIT_PAYMENT: 5,
}, },
SUPPORT_EMAIL: process.env.REACT_APP_SUPPORT_EMAIL, SUPPORT_EMAIL: process.env.REACT_APP_SUPPORT_EMAIL,
PAYMENT_PLAN: [ PAYMENT_PLAN: [