apostrophe fix and dns details ordering

This commit is contained in:
2022-04-26 16:08:23 +01:00
parent 1fae028486
commit 19be69389e
15 changed files with 381 additions and 339 deletions
+2 -1
View File
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
var token = await getToken();
var queryUrl =
"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Developments of National Significance' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
//"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Developments of National Significance' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
console.log(queryUrl);
return axios
+7 -1
View File
@@ -18,7 +18,7 @@ import {
import { wrapper } from "../store/store";
const Home = (props) => {
const { footerLinks, pages } = props;
const { footerLinks, pages, showMap } = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -99,6 +99,7 @@ const Home = (props) => {
<div className="govuk-width-container">
<Breadcrumbs slug={appealtypes} />
<DNSSearchResults
showMap={showMap}
searchString="DNS"
searchResultsObj={props.searchResultsObj}
/>
@@ -129,12 +130,17 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
: searchResultsObj;
const showMapCheck = process.env.SHOWMAPS || false;
const searchDetailsObj = await getSearchDetails(searchResultsObj);
const dnsCoords = await getDNSCoords();
store.dispatch(setSearchResults(searchResultsObj));
store.dispatch(setSearchDetails(searchDetailsObj));
store.dispatch(setSearch("DNS"));
store.dispatch(setDNSCoords(dnsCoords));
return {
props: { showMap: showMapCheck },
};
}
);
+2 -1
View File
@@ -9,7 +9,7 @@ import Footer from "../components/footer";
import Header from "../components/header";
const Home = (props) => {
const { footerLinks, pages } = props;
const { footerLinks, pages, showMap } = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -63,6 +63,7 @@ const Home = (props) => {
appealTypeID={
props.currentView.caseReference.appealType
}
showMap={props.currentView.caseReference.showMap}
/>
</div>
<Footer footerLinks={footerLinks} />
+4
View File
@@ -25,6 +25,7 @@ const Home = (props) => {
footerLinks,
pages,
showLogin,
showMap,
loggedInUserId,
hasGGCode,
loginEmailStr,
@@ -140,6 +141,7 @@ const Home = (props) => {
ggLocale={ggLocale}
pages={pages}
showLogin={showLogin}
showMap={showMap}
loggedInUserId={loggedInUserId}
GG_REDIRECT_URI={props.GG_REDIRECT_URI}
GG_CLIENT_ID={props.GG_CLIENT_ID}
@@ -164,6 +166,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
console.log("gg local", query.ui_locales);
const showLoginCheck = process.env.SHOWLOGIN || false;
const showMapCheck = process.env.SHOWMAPS || false;
const hasLoginCode = typeof query.code != "undefined";
let providerConfig = await getProviderConfig();
@@ -224,6 +227,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
props: {
ggLocale: ggLocale,
showLogin: showLoginCheck,
showMap: showMapCheck,
hasGGCode: hasLoginCode,
loggedInUserId: portalUserObj,
loggedInUserEmail: loginEmailStr,