added in initial user flow screens
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
import Link from "next/link";
|
||||
import _ from "lodash";
|
||||
import Head from "next/head";
|
||||
import Header from "../../components/header";
|
||||
import Banner from "../../components/banner";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import Footer from "../../components/footer";
|
||||
|
||||
import { useSelector, shallowEqual, connect } from "react-redux";
|
||||
import { wrapper } from "../../store/store";
|
||||
import Cookies from "cookies";
|
||||
import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import jsonpath from "jsonpath";
|
||||
import { reduxForm, formValueSelector } from "redux-form";
|
||||
|
||||
import ChangePassword from "../../components/account/changepassword";
|
||||
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;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
const { appealType, LPAData } = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>
|
||||
{t("search:page-title")} - {t("common:service-name")}
|
||||
</title>
|
||||
</Head>
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName={t("common:service-name")} />
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<main
|
||||
className="govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h1>Change password</h1>
|
||||
<ChangePassword props={props} />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
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 {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(Home);
|
||||
@@ -0,0 +1,94 @@
|
||||
import Link from "next/link";
|
||||
import _ from "lodash";
|
||||
import Head from "next/head";
|
||||
import Header from "../../components/header";
|
||||
import Banner from "../../components/banner";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import Footer from "../../components/footer";
|
||||
|
||||
import { useSelector, shallowEqual, connect } from "react-redux";
|
||||
import { wrapper } from "../../store/store";
|
||||
import Cookies from "cookies";
|
||||
import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
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;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
const { appealType, LPAData } = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>
|
||||
{t("search:page-title")} - {t("common:service-name")}
|
||||
</title>
|
||||
</Head>
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName={t("common:service-name")} />
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<main
|
||||
className="govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h1>Your account</h1>
|
||||
<PersonalDetails props={props} />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
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 {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(Home);
|
||||
@@ -0,0 +1,152 @@
|
||||
import Link from "next/link";
|
||||
import _ from "lodash";
|
||||
import Head from "next/head";
|
||||
import Header from "../../components/header";
|
||||
import Banner from "../../components/banner";
|
||||
import CookieBanner from "../../components/cookieBanner";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
import Footer from "../../components/footer";
|
||||
|
||||
import { useSelector, shallowEqual, connect } from "react-redux";
|
||||
import { wrapper } from "../../store/store";
|
||||
import Cookies from "cookies";
|
||||
import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
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;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
const { appealType, LPAData } = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>
|
||||
{t("search:page-title")} - {t("common:service-name")}
|
||||
</title>
|
||||
</Head>
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName={t("common:service-name")} />
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<main
|
||||
className="govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h1>Create a new account</h1>
|
||||
<RegisterForm props={props} />
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
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 {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(Home);
|
||||
@@ -0,0 +1,17 @@
|
||||
const ApiResponse = (req, res) => {
|
||||
res.statusCode = 200;
|
||||
res.json({
|
||||
data: {
|
||||
firstname: "Steve",
|
||||
lastname: "Johnson",
|
||||
email: "steve@test.co.uk",
|
||||
telephone: "0000000000",
|
||||
companygroup: "Test Company",
|
||||
addressline1: "1 Test Street",
|
||||
towncity: "TestTown",
|
||||
county: "Test County",
|
||||
postcode: "TN12 12N",
|
||||
},
|
||||
});
|
||||
};
|
||||
export default ApiResponse;
|
||||
@@ -111,15 +111,15 @@ let Home = (props) => {
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName={t("common:service-name")} />
|
||||
<main
|
||||
className="govuk-main-wrapper govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} formTitle={formTitle} />
|
||||
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} formTitle={formTitle} />
|
||||
<main
|
||||
className="govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
{props.appealType.currentSection == 9999 ? (
|
||||
<CompleteAppeal />
|
||||
) : props.appealType.currentSection ==
|
||||
@@ -141,8 +141,9 @@ let Home = (props) => {
|
||||
props={props}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+13
-12
@@ -49,26 +49,27 @@ const Home = (props) => {
|
||||
<div id="page_wrapper">
|
||||
<CookieBanner />
|
||||
<Header courseName={t("common:service-name")} />
|
||||
<main
|
||||
className="govuk-main-wrapper govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<main
|
||||
className="govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<h1>New Appeal</h1>
|
||||
<CreateCase
|
||||
LPAData={props.LPAData}
|
||||
appealType={props.setAppealType}
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user