added logout status 404 page and registraiton pages
This commit is contained in:
@@ -37,6 +37,7 @@ const Home = (props) => {
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
const { appealType, LPAData } = props;
|
||||
const [passwordUpdated, setPasswordUpdated] = useState(false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -61,8 +62,20 @@ const Home = (props) => {
|
||||
>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h1>Change password</h1>
|
||||
<ChangePassword props={props} />
|
||||
{passwordUpdated == true ? (
|
||||
<h1>
|
||||
Your password has been changed
|
||||
</h1>
|
||||
) : (
|
||||
<h1>Change password</h1>
|
||||
)}
|
||||
<ChangePassword
|
||||
props={props}
|
||||
setPasswordUpdated={
|
||||
setPasswordUpdated
|
||||
}
|
||||
passwordUpdated={passwordUpdated}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -17,10 +17,8 @@ import jsonpath from "jsonpath";
|
||||
import { reduxForm, formValueSelector } from "redux-form";
|
||||
|
||||
import PersonalDetails from "../../components/account/personaldetails";
|
||||
import xpath from "xpath";
|
||||
import { setAccountDetails } from "../../store/accountDetails/action";
|
||||
import { getPersonalAccount } from "../../actions";
|
||||
import { setLPA } from "../../store/lpa/action";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, formData } = props;
|
||||
@@ -30,7 +28,9 @@ const Home = (props) => {
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
const { appealType, LPAData } = props;
|
||||
const [personalDetailsComplete, setPersonalDetailsComplete] =
|
||||
useState(false);
|
||||
const [accountUpdatedComplete, setAccountUpdatedComplete] = useState(false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -56,7 +56,21 @@ const Home = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h1>Your account</h1>
|
||||
<PersonalDetails props={props} />
|
||||
<PersonalDetails
|
||||
props={props}
|
||||
accountUpdatedComplete={
|
||||
accountUpdatedComplete
|
||||
}
|
||||
personalDetailsComplete={
|
||||
personalDetailsComplete
|
||||
}
|
||||
setPersonalDetailsComplete={
|
||||
setPersonalDetailsComplete
|
||||
}
|
||||
setAccountUpdatedComplete={
|
||||
setAccountUpdatedComplete
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@@ -70,14 +84,14 @@ const Home = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
const accountDetails = await getPersonalAccount();
|
||||
console.log("perosnal: ", accountDetails);
|
||||
store.dispatch(setAccountDetails(accountDetails));
|
||||
}
|
||||
);
|
||||
// export const getServerSideProps = wrapper.getServerSideProps(
|
||||
// (store) =>
|
||||
// async ({ query, req, res }) => {
|
||||
// const accountDetails = await getPersonalAccount();
|
||||
// console.log("perosnal: ", accountDetails);
|
||||
// store.dispatch(setAccountDetails(accountDetails));
|
||||
// }
|
||||
// );
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
|
||||
+89
-69
@@ -17,26 +17,17 @@ import jsonpath from "jsonpath";
|
||||
import { reduxForm, formValueSelector } from "redux-form";
|
||||
|
||||
import RegisterForm from "../../components/account/registerform";
|
||||
import xpath from "xpath";
|
||||
import {
|
||||
setAppealType,
|
||||
setAppealTypeTitle,
|
||||
setAppealTypeID,
|
||||
setAppealLPA,
|
||||
getAppealTypeObj,
|
||||
} from "../../store/appealType/action";
|
||||
import { getAppealsTypes, getLPA } from "../../actions";
|
||||
import { setLPA } from "../../store/lpa/action";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages, formData } = props;
|
||||
const { footerLinks, formData } = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
const { appealType, LPAData } = props;
|
||||
const [registerFormComplete, setRegisterFormComplete] = useState(false);
|
||||
const [accountCreatedComplete, setAccountCreatedComplete] = useState(false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -61,59 +52,87 @@ const Home = (props) => {
|
||||
>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h1>Create a new account</h1>
|
||||
<RegisterForm props={props} />
|
||||
{registerFormComplete != true ||
|
||||
accountCreatedComplete != true ? (
|
||||
<h1>Create a new account</h1>
|
||||
) : (
|
||||
<h1>
|
||||
Your account has been created
|
||||
</h1>
|
||||
)}
|
||||
<RegisterForm
|
||||
props={props}
|
||||
accountCreatedComplete={
|
||||
accountCreatedComplete
|
||||
}
|
||||
registerFormComplete={
|
||||
registerFormComplete
|
||||
}
|
||||
setRegisterFormComplete={
|
||||
setRegisterFormComplete
|
||||
}
|
||||
setAccountCreatedComplete={
|
||||
setAccountCreatedComplete
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{registerFormComplete != true ||
|
||||
accountCreatedComplete != true ? (
|
||||
<div className="govuk-grid-column-one-third">
|
||||
<h2 className="govuk-heading-m">
|
||||
Help
|
||||
</h2>
|
||||
|
||||
<div className="govuk-grid-column-one-third">
|
||||
<h2 className="govuk-heading-m">
|
||||
Help
|
||||
</h2>
|
||||
<h3>
|
||||
Companies or submissions by more
|
||||
than one individual (groups)
|
||||
</h3>
|
||||
|
||||
<h3>
|
||||
Companies or submissions by more
|
||||
than one individual (groups)
|
||||
</h3>
|
||||
<p className="govuk-body">
|
||||
If you are submitting an appeal
|
||||
or representation from a company
|
||||
e.g. "Acme Inc" or a
|
||||
group of people e.g.
|
||||
"Residents of 1-10 High
|
||||
street", you should enter
|
||||
the name of the company or group
|
||||
in the Company/Group field. You
|
||||
will be deemed as acting as
|
||||
their representative.
|
||||
</p>
|
||||
|
||||
<p className="govuk-body">
|
||||
If you are submitting an appeal or
|
||||
representation from a company e.g.
|
||||
"Acme Inc" or a group of
|
||||
people e.g. "Residents of 1-10
|
||||
High street", you should enter
|
||||
the name of the company or group in
|
||||
the Company/Group field. You will be
|
||||
deemed as acting as their
|
||||
representative.
|
||||
</p>
|
||||
<h3>
|
||||
Enforcement appeals by
|
||||
married/civil partnership
|
||||
couples
|
||||
</h3>
|
||||
|
||||
<h3>
|
||||
Enforcement appeals by married/civil
|
||||
partnership couples
|
||||
</h3>
|
||||
<p className="govuk-body">
|
||||
You should not enter a group
|
||||
name. You need only enter your
|
||||
partner's name on the
|
||||
appeal form itself as an
|
||||
additional appellant.
|
||||
</p>
|
||||
|
||||
<p className="govuk-body">
|
||||
You should not enter a group name.
|
||||
You need only enter your
|
||||
partner's name on the appeal
|
||||
form itself as an additional
|
||||
appellant.
|
||||
</p>
|
||||
<h3>
|
||||
Other appeals by married/civil
|
||||
partnership couples
|
||||
</h3>
|
||||
|
||||
<h3>
|
||||
Other appeals by married/civil
|
||||
partnership couples
|
||||
</h3>
|
||||
|
||||
<p className="govuk-body">
|
||||
For any other type of appeal, for
|
||||
example a planning appeal, you
|
||||
should enter a group name when
|
||||
creating your account e.g. "Mr
|
||||
and Mrs Smith", if that is the
|
||||
name on the application.
|
||||
</p>
|
||||
</div>
|
||||
<p className="govuk-body">
|
||||
For any other type of appeal,
|
||||
for example a planning appeal,
|
||||
you should enter a group name
|
||||
when creating your account e.g.
|
||||
"Mr and Mrs Smith", if
|
||||
that is the name on the
|
||||
application.
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@@ -126,17 +145,17 @@ const Home = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
const appealTypeData = await getAppealsTypes();
|
||||
const lpaData = await getLPA();
|
||||
console.log("appeal types", appealTypeData);
|
||||
console.log("lpa typeswwwww", lpaData);
|
||||
store.dispatch(setAppealType(appealTypeData));
|
||||
store.dispatch(setLPA(lpaData));
|
||||
}
|
||||
);
|
||||
// export const getServerSideProps = wrapper.getServerSideProps(
|
||||
// (store) =>
|
||||
// async ({ query, req, res }) => {
|
||||
// const appealTypeData = await getAppealsTypes();
|
||||
// const lpaData = await getLPA();
|
||||
// console.log("appeal types", appealTypeData);
|
||||
// console.log("lpa typeswwwww", lpaData);
|
||||
// store.dispatch(setAppealType(appealTypeData));
|
||||
// store.dispatch(setLPA(lpaData));
|
||||
// }
|
||||
// );
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
@@ -146,6 +165,7 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user