Skip to content

Commit

Permalink
Merge pull request #11 from UNICEFECAR/feature/issue_62
Browse files Browse the repository at this point in the history
Issue #62 - Indistinguishable interfaces (Client and Provider web interfaces)
  • Loading branch information
sebastian-7DIGIT authored Oct 26, 2023
2 parents fbed7e8 + 6b45873 commit 87185c6
Show file tree
Hide file tree
Showing 15 changed files with 72 additions and 15 deletions.
19 changes: 19 additions & 0 deletions src/blocks/ForgotPassword/ForgotPassword.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { validate } from "@USupport-components-library/utils";
import { adminSvc } from "@USupport-components-library/services";
import { useError } from "#hooks";
import Joi from "joi";
import { logoVerticalSvg } from "@USupport-components-library/assets";

import "./forgot-password.scss";

Expand Down Expand Up @@ -56,6 +57,19 @@ export const ForgotPassword = () => {
return (
<Block classes="forgot-password">
<Grid md={8} lg={12} classes="forgot-password__grid">
<GridItem md={8} lg={12} classes="login__grid__inputs-item">
<div className="login__grid__logo-item">
<h2 className="welcome__grid__logo-item__heading">
{t("heading")}
</h2>
<img
src={logoVerticalSvg}
alt="Logo"
className="welcome__grid__logo-item__logo"
/>
<h2 className="welcome__grid__logo-item__heading">{t("admin")}</h2>
</div>
</GridItem>
<GridItem md={8} lg={12} classes="forgot-password__grid__content-item">
<div className="forgot-password__grid__content-item__main-container">
<Input
Expand All @@ -77,6 +91,11 @@ export const ForgotPassword = () => {
/>
</div>
</GridItem>
<GridItem
md={8}
lg={12}
classes="forgot-password__grid__content-item"
></GridItem>
</Grid>
<Modal
isOpen={isModalOpen}
Expand Down
7 changes: 5 additions & 2 deletions src/blocks/ForgotPassword/forgot-password.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
}

&__grid {
height: 100%;
justify-items: center;
place-items: center;
margin-top: $spacing_5_0;

&__logo-item {
margin-bottom: $spacing_2_0;
}
&__content-item {
display: flex;
flex: 1;
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/ForgotPassword/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"reset_password_button_label": "Reset password",
"register_redirect_button_label": "I don’t have an account",
"modal_heading": "Check your email",
"modal_text": "If you are registered in the platform you will receive a link to reset your password."
"modal_text": "If you are registered in the platform you will receive a link to reset your password.",
"heading": "Welcome to",
"admin": "Country admin"
}
4 changes: 3 additions & 1 deletion src/blocks/ForgotPassword/locales/kk.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"reset_password_button_label": "Құпия сөзді ауыстыру",
"register_redirect_button_label": "Менде аккаунт жоқ",
"modal_heading": "Электронды поштаңызды тексеріңіз",
"modal_text": "Егер Сіз платформада тіркелген болсаңыз, құпия сөзді қалпына келтіруге сілтеме аласыз."
"modal_text": "Егер Сіз платформада тіркелген болсаңыз, құпия сөзді қалпына келтіруге сілтеме аласыз.",
"heading": "Қош келдіңіз, бұл - ",
"admin": "Ел әкімшілері"
}
4 changes: 3 additions & 1 deletion src/blocks/ForgotPassword/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"reset_password_button_label": "Сброс пароля",
"register_redirect_button_label": "У меня нет аккаунта",
"modal_heading": "Проверьте свою электронную почту",
"modal_text": "Если Вы зарегистрированы на платформе, Вы получите ссылку для сброса пароля."
"modal_text": "Если Вы зарегистрированы на платформе, Вы получите ссылку для сброса пароля.",
"heading": "Добро пожаловать в",
"admin": "Администраторы страны"
}
18 changes: 16 additions & 2 deletions src/blocks/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
InputPassword,
Button,
} from "@USupport-components-library/src";
import { logoVerticalSvg } from "@USupport-components-library/assets";

import "./login.scss";

Expand All @@ -32,13 +33,26 @@ export const Login = ({ data, setData, handleLogin, errors, isLoading }) => {
setData(newData);
};

const handleForgotPassowrd = () => {
const handleForgotPassword = () => {
navigate("/forgot-password");
};

return (
<Block classes="login">
<Grid md={8} lg={12} classes="login__grid">
<GridItem md={8} lg={12} classes="login__grid__inputs-item">
<div className="login__grid__logo">
<h2 className="welcome__grid__logo-item__heading">
{t("heading")}
</h2>
<img
src={logoVerticalSvg}
alt="Logo"
className="welcome__grid__logo-item__logo"
/>
<h2 className="welcome__grid__logo-item__heading">{t("admin")}</h2>
</div>
</GridItem>
<GridItem md={8} lg={12} classes="login__grid__inputs-item">
<form onSubmit={handleLogin}>
<Input
Expand All @@ -63,7 +77,7 @@ export const Login = ({ data, setData, handleLogin, errors, isLoading }) => {
color="purple"
classes="login__grid__forgot-password"
label={t("forgot_password_label")}
onClick={() => handleForgotPassowrd()}
onClick={() => handleForgotPassword()}
/>
{errors.submit ? <Error message={errors.submit} /> : null}
<Button
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/Login/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"forgot_password_label": "I forgot my password",
"login_label": "Login",
"try_again": "Try again in",
"seconds": "seconds"
"seconds": "seconds",
"heading": "Welcome to",
"admin": "Country admin"
}
4 changes: 3 additions & 1 deletion src/blocks/Login/locales/kk.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"forgot_password_label": "Мен құпия сөзімді ұмытып қалдым",
"login_label": "Кіру",
"try_again": "Әрекетті қайталаңыз",
"seconds": "секундта"
"seconds": "секундта",
"heading": "Қош келдіңіз, бұл - ",
"admin": "Ел әкімшілері"
}
4 changes: 3 additions & 1 deletion src/blocks/Login/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"forgot_password_label": "Я забыл(-а) свой пароль",
"login_label": "Авторизация",
"try_again": "Повторите попытку через",
"seconds": "секунд"
"seconds": "секунд",
"heading": "Добро пожаловать в",
"admin": "Администраторы страны"
}
7 changes: 6 additions & 1 deletion src/blocks/Login/login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
}

&__grid {
min-height: 90vh;
place-items: center;
text-align: left;
margin-top: $spacing_5_0;

&__logo {
text-align: center;
margin-bottom: $spacing_2_0;
}

&__inputs-item {
&__input--password {
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Page/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const Page = ({
/>
)}
{image && <img className="page__header__image" src={image} />}
{heading && <h2 className="page__header-heading">{heading}</h2>}
{heading && <h3 className="page__header-heading">{heading}</h3>}
{headingButton && (width >= 768 || showHeadingButtonInline) && (
<div className="page__header-button-container">
{headingButton}
Expand Down
1 change: 1 addition & 0 deletions src/blocks/Welcome/Welcome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export const Welcome = () => {
alt="Logo"
className="welcome__grid__logo-item__logo"
/>
<h2 className="welcome__grid__logo-item__heading">{t("admin")}</h2>
</GridItem>
<GridItem md={8} lg={12} classes="welcome__grid__content-item">
{!(countriesQuery.isLoading || languagesQuery.isLoading) ? (
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/Welcome/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"country": "Country",
"language": "Language",
"placeholder": "Select",
"button": "Continue"
"button": "Continue",
"admin": "Country admin"
}
3 changes: 2 additions & 1 deletion src/blocks/Welcome/locales/kk.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"country": "Ел",
"language": "Тіл",
"placeholder": "Таңдау",
"button": "Жалғастыру"
"button": "Жалғастыру",
"admin": "Ел әкімшілері"
}
3 changes: 2 additions & 1 deletion src/blocks/Welcome/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"country": "Страна",
"language": "Язык",
"placeholder": "Выбрать",
"button": "Продолжить"
"button": "Продолжить",
"admin": "Администраторы страны"
}

0 comments on commit 87185c6

Please sign in to comment.