diff --git a/public/assets/images/logo_PY1.png b/public/assets/images/logo_PY1.png new file mode 100644 index 0000000..1a817c6 Binary files /dev/null and b/public/assets/images/logo_PY1.png differ diff --git a/src/App.js b/src/App.js index bb26a43..d435c4e 100644 --- a/src/App.js +++ b/src/App.js @@ -39,22 +39,18 @@ function App() {
- - - - - - + + + - ); diff --git a/src/_components/Header/HeaderCloud.js b/src/_components/Header/HeaderCloud.js index d2aadc7..a94b408 100644 --- a/src/_components/Header/HeaderCloud.js +++ b/src/_components/Header/HeaderCloud.js @@ -5,7 +5,7 @@ import { useSelector } from "react-redux"; function HeaderCloud() { const authentication = useSelector((state) => state.authentication); return ( -
+
{"Logo"} diff --git a/src/_components/Header/HeaderTS/HeaderTS.js b/src/_components/Header/HeaderLogoRegister/HeaderLogoRegister.js similarity index 52% rename from src/_components/Header/HeaderTS/HeaderTS.js rename to src/_components/Header/HeaderLogoRegister/HeaderLogoRegister.js index 688de66..a548cd3 100644 --- a/src/_components/Header/HeaderTS/HeaderTS.js +++ b/src/_components/Header/HeaderLogoRegister/HeaderLogoRegister.js @@ -3,19 +3,19 @@ import { Link } from "react-router-dom"; import { useSelector } from "react-redux"; import './headerTS.style.scss' -function HeaderTS() { - const authentication = useSelector((state) => state.authentication); +function HeaderLogoRegister({srcImg, name, color}) { return (
{"Logo"} - Cô Đặng Thu Hiền + {name.split('\n').map((str, index) => {str})} +
); } -export { HeaderTS }; +export { HeaderLogoRegister }; diff --git a/src/_components/Header/HeaderTS/headerTS.style.scss b/src/_components/Header/HeaderLogoRegister/headerTS.style.scss similarity index 93% rename from src/_components/Header/HeaderTS/headerTS.style.scss rename to src/_components/Header/HeaderLogoRegister/headerTS.style.scss index bfe9c35..625b611 100644 --- a/src/_components/Header/HeaderTS/headerTS.style.scss +++ b/src/_components/Header/HeaderLogoRegister/headerTS.style.scss @@ -25,12 +25,12 @@ } img { - width: 90px; + width: 120px; height: auto; margin-top: 0 !important; @media screen and (max-width: 768px) { - width: 50px; + width: 74px; } } @@ -38,7 +38,6 @@ font-size: 16px; font-weight: 700; margin-top: 4px; - color: #14375F; font-family: 'Barlow-Bold'; @media screen and (max-height: 800px) { diff --git a/src/_components/Header/index.js b/src/_components/Header/index.js index 493a046..3cc92f0 100644 --- a/src/_components/Header/index.js +++ b/src/_components/Header/index.js @@ -1,5 +1,5 @@ export * from "./HeaderCloud"; export * from "./HeaderCurve"; export * from "./HeaderSquare"; -export * from "./HeaderTS/HeaderTS"; +export * from "./HeaderLogoRegister/HeaderLogoRegister"; export { default as HeaderNews } from "./HeaderNews/HeaderNews"; diff --git a/src/_components/Modal/ModalConfirmOTP/ModalConfirmOTP.jsx b/src/_components/Modal/ModalConfirmOTP/ModalConfirmOTP.jsx index 3f21bb3..6166060 100644 --- a/src/_components/Modal/ModalConfirmOTP/ModalConfirmOTP.jsx +++ b/src/_components/Modal/ModalConfirmOTP/ModalConfirmOTP.jsx @@ -120,20 +120,20 @@ const ModalConfirmOTP = (props) => { XÁC NHẬN
- {/* window.location.replace('https://sundayenglish.com/login')} border={"1px solid #00cc83"} backgroundColor={"#fff"} maxWidth={"45%"} maxHeight={"7vw"} >
- QUAY LẠI ĐĂNG NHẬP + ĐĂNG NHẬP
-
*/} +
diff --git a/src/_constants/register.js b/src/_constants/register.js new file mode 100644 index 0000000..b02366a --- /dev/null +++ b/src/_constants/register.js @@ -0,0 +1,17 @@ +export const registerValue = { + namdinh: { + province_alias: 'nam_dinh_', + district_alias: '', + organization: '', + represent_code: 'ND1' + }, + phucyen: { + province_alias: 'vinh_phuc', + district_alias: 'thanh_pho_phuc_yen', + organization: '', + represent_code: 'PY1', + logo: '/assets/images/logo_PY1.png', + name: 'Phòng Giáo dục thành phố\nPhúc Yên - Vĩnh Phúc', + color: '#3493B8' + } +} \ No newline at end of file diff --git a/src/_containers/RegisterPage/RegisterPage.js b/src/_containers/RegisterPage/RegisterPage.js index a9defc7..aca3a4c 100644 --- a/src/_containers/RegisterPage/RegisterPage.js +++ b/src/_containers/RegisterPage/RegisterPage.js @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { HeaderCloud, HeaderTS } from "../../_components/Header"; +import { HeaderCloud, HeaderLogoRegister } from "../../_components/Header"; import { stepAuthConstants } from "../../_constants/auth"; import { apiCaller, history } from "../../_helpers"; import AccountType from "./components/AccountType"; @@ -15,7 +15,12 @@ import { isEmpty } from "lodash"; import AddClassName from "./components/AddClassName"; import './register.scss' import AddressStudying from "./components/AddressStudying"; +import { useParams } from "react-router-dom"; +import { registerValue } from "../../_constants/register"; function RegisterPage() { + const params = useParams(); + const orgLevel = params?.orgLevel; + const [registerInfo, setRegisterInfo] = useState(registerValue?.[orgLevel] || undefined); const [step, setStep] = useState(stepAuthConstants.STEP_ADDRESS_STUDYING); const [dataAddressStudying, setDataAddressStudying] = useState({ province: '', @@ -86,7 +91,7 @@ function RegisterPage() { }; data.birthday = moment(dataUpdateInfo.birthday).format("YYYY-MM-DD"); setPopupMessageRegisterTeacher(false); - history.push(`/namdinh/authentication`, { data: data }); + history.push(`/${orgLevel}/authentication`, { data: data }); }; const onRegister = async () => { @@ -183,7 +188,15 @@ function RegisterPage() { return (
- + {!!registerInfo && + (orgLevel === 'namdinh' ? + + : + )} {statusRegister.type !== "success" ? ( <>
{ // return ( @@ -57,10 +59,21 @@ const AccountAuthentication = () => { messageReSendCode, setPopupRegisterSuccess } = accountAuthenticationMethods(); + const params = useParams(); + const orgLevel = params?.orgLevel; + const [registerInfo, setRegisterInfo] = useState(registerValue?.[orgLevel] || undefined); return (
- + {!!registerInfo && + (orgLevel === 'namdinh' ? + + : + )} {popupRegisterSuccess && setPopupRegisterSuccess(false)} labelYes={"Đồng ý"}/>}
diff --git a/src/_containers/RegisterPage/components/AccountAuthentication/AccountAuthentication.logic.js b/src/_containers/RegisterPage/components/AccountAuthentication/AccountAuthentication.logic.js index 4584722..b999a0d 100644 --- a/src/_containers/RegisterPage/components/AccountAuthentication/AccountAuthentication.logic.js +++ b/src/_containers/RegisterPage/components/AccountAuthentication/AccountAuthentication.logic.js @@ -139,7 +139,7 @@ export const accountAuthenticationMethods = () => { }; const handleGoBack = () => { - history.replace("/namdinh"); + history.goBack(); }; return { diff --git a/src/_containers/RegisterPage/components/AddClassName/index.js b/src/_containers/RegisterPage/components/AddClassName/index.js index 6a7aea2..4432a71 100644 --- a/src/_containers/RegisterPage/components/AddClassName/index.js +++ b/src/_containers/RegisterPage/components/AddClassName/index.js @@ -156,7 +156,7 @@ export default function AddClassName(props) {

Dạy các lớp:

{listClass?.map((item, index) => ( -
+
{ - apiCaller(`/api_organization/get_represent_code?district_alias=${districtAlias}&represent_code=nd1`).then( + apiCaller(`/api_organization/get_represent_code?district_alias=${districtAlias}&represent_code=${props?.registerInfo?.represent_code}`).then( (res) => { if(res?.status) { setOrganizationList(res.data) @@ -129,9 +133,38 @@ export default function AddressStudying(props) { } useEffect(() => { - getDistrictList(province.value); + if(!props?.registerInfo) { + history.push('/namdinh') + return; + } + if(province.value) { + getDistrictList(province.value); + } + if (district.value) { + getOrganizationList(district.value); + } }, []); + useEffect(() => { + if(!!registerValue?.[orgLevel]?.represent_code) { + if(!!registerValue[orgLevel]?.province_alias) { + setProvince({ + title: '', + value: registerValue[orgLevel].province_alias + }) + getDistrictList(registerValue[orgLevel]?.province_alias); + } + if (!!registerValue[orgLevel]?.district_alias) { + setDistrict({ + title: '', + value: registerValue[orgLevel].district_alias + }) + getOrganizationList(registerValue[orgLevel]?.district_alias); + } + props.setRegisterInfo(registerValue[orgLevel]) + } + }, [orgLevel]) + return (
@@ -162,7 +195,7 @@ export default function AddressStudying(props) { errorAbsolute={true} bottomErr={true} /> */} - + />} { diff --git a/src/_containers/RegisterPage/components/UpdateInformation/index.js b/src/_containers/RegisterPage/components/UpdateInformation/index.js index 75b35d0..29a2b46 100644 --- a/src/_containers/RegisterPage/components/UpdateInformation/index.js +++ b/src/_containers/RegisterPage/components/UpdateInformation/index.js @@ -113,7 +113,7 @@ const UpdateInformation = (props) => {

ĐĂNG KÝ TÀI KHOẢN

- {`3. Cập nhật thông tin`} + {`4. Cập nhật thông tin`}

{props.popupMessageRegisterTeacher && ( diff --git a/src/_containers/RegisterPage/register.scss b/src/_containers/RegisterPage/register.scss index 69bd1cd..6688362 100644 --- a/src/_containers/RegisterPage/register.scss +++ b/src/_containers/RegisterPage/register.scss @@ -5,16 +5,27 @@ $bg-gg: #be1e2d; $bg-apple: #000000; $loading-color: #f8f8f8; -.bg-register .logo img { - width: 144px; - margin-top: 32px; +.bg-register .logo-nam-dinh { + a { + margin-left: 32px; - @media screen and (max-height: 800px) { - width: 120px; + @media screen and (max-width: 768px) { + margin-left: 16px; + } } - @media screen and (max-width: 768px) { - width: 96px; + img { + width: 173px; + margin-top: 32px; + + @media screen and (max-height: 800px) { + width: 163px; + margin-top: 16px; + } + + @media screen and (max-width: 768px) { + width: 128px; + } } }