watched cases and view all
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ RELAYPATH = "dev-pedw-hc"
|
|||||||
|
|
||||||
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
SHOWLOGIN = true
|
SHOWLOGIN = true
|
||||||
SHOWREPRESENTATIONS = false
|
SHOWREPRESENTATIONS = true
|
||||||
SHOWFILEUPLOAD = "false"
|
SHOWFILEUPLOAD = "false"
|
||||||
SHOWMAPS = "false"
|
SHOWMAPS = "false"
|
||||||
API_ROOT = "http://localhost:3000"
|
API_ROOT = "http://localhost:3000"
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ const Case = (props) => {
|
|||||||
searchString={props.searchString}
|
searchString={props.searchString}
|
||||||
incidentid={props.incidentid}
|
incidentid={props.incidentid}
|
||||||
showMap={props.showMap}
|
showMap={props.showMap}
|
||||||
showLoginCheck={props.showLoginCheck}
|
currentView={props.currentView}
|
||||||
/>
|
/>
|
||||||
<Documents
|
<Documents
|
||||||
incidentid={props.incidentid}
|
incidentid={props.incidentid}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ const RepDetails = (props) => {
|
|||||||
? props.myRepresentations.myRepresentations
|
? props.myRepresentations.myRepresentations
|
||||||
: props.searchResultsObj.searchDetailsObj
|
: props.searchResultsObj.searchDetailsObj
|
||||||
: props.currentType == "watchedCases"
|
: props.currentType == "watchedCases"
|
||||||
? props.props.props.watchedCases.watchedCasesDetails
|
? props.props.props.props.watchedCases.watchedCasesDetails
|
||||||
: props.props.searchResultsObj.searchDetailsObj;
|
: props.props.props.searchResultsObj.searchDetailsObj;
|
||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ let RepLPA = (props) => {
|
|||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}ww
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
// <a
|
// <a
|
||||||
// href="#"
|
// href="#"
|
||||||
@@ -368,7 +368,7 @@ let RepLPA = (props) => {
|
|||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}ww
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{showQuestionnaireSection > 1 && (
|
{showQuestionnaireSection > 1 && (
|
||||||
|
|||||||
-1
@@ -999,7 +999,6 @@ let S78_Questionnaire = (props) => {
|
|||||||
dateEnd="1-y"
|
dateEnd="1-y"
|
||||||
locale={locale}
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
ss
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -76,9 +76,10 @@ const CaseSummary = (props) => {
|
|||||||
setWatchedCases,
|
setWatchedCases,
|
||||||
setWatchedCasesDetails,
|
setWatchedCasesDetails,
|
||||||
showMap,
|
showMap,
|
||||||
|
currentView,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const showLoginCheck = props.currentView.caseReference.showLoginCheck;
|
const showLoginCheck = currentView.showLogin;
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
//console.log("session status:", status, session);
|
//console.log("session status:", status, session);
|
||||||
|
|
||||||
@@ -406,6 +407,9 @@ const CaseSummary = (props) => {
|
|||||||
currentType ==
|
currentType ==
|
||||||
"searchResultsObj"
|
"searchResultsObj"
|
||||||
? detailsObj.pinswg_name
|
? detailsObj.pinswg_name
|
||||||
|
: currentType ==
|
||||||
|
"watchedCases"
|
||||||
|
? casesObj.pinswg_title
|
||||||
: casesObj.reference,
|
: casesObj.reference,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -145,9 +145,9 @@ const MyPortal = (props) => {
|
|||||||
{props.watchedCases.watchedCases["@odata.count"] >
|
{props.watchedCases.watchedCases["@odata.count"] >
|
||||||
0 && (
|
0 && (
|
||||||
<WatchedCases
|
<WatchedCases
|
||||||
|
currentView={props.currentView}
|
||||||
watchedCases={props.watchedCases}
|
watchedCases={props.watchedCases}
|
||||||
isLPA={isLPA}
|
isLPA={isLPA}
|
||||||
showLoginCheck={props.showLoginCheck}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{props.myRepresentations.myRepresentations[
|
{props.myRepresentations.myRepresentations[
|
||||||
|
|||||||
@@ -46,10 +46,13 @@ const MyRepresentations = (props) => {
|
|||||||
"viewName": "My Representations",
|
"viewName": "My Representations",
|
||||||
"viewKey": "myRepresentations",
|
"viewKey": "myRepresentations",
|
||||||
});
|
});
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
{t("myportal:viewall-link")}
|
{t("myportal:viewall-link")}{" "}
|
||||||
|
{props.isLPA &&
|
||||||
|
props.myRepresentations.myRepresentations[
|
||||||
|
"@odata.count"
|
||||||
|
] + " representations"}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -46,10 +46,13 @@ const MyRepresentations = (props) => {
|
|||||||
"viewName": "My Representations",
|
"viewName": "My Representations",
|
||||||
"viewKey": "myRepresentations",
|
"viewKey": "myRepresentations",
|
||||||
});
|
});
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
{t("myportal:viewall-link")}
|
{t("myportal:viewall-link")}{" "}
|
||||||
|
{props.isLPA &&
|
||||||
|
props.myRepresentations.myRepresentations[
|
||||||
|
"@odata.count"
|
||||||
|
] + " representations"}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import { getFormCollectionByID } from "../../components/utils";
|
|||||||
const TopThree = (props) => {
|
const TopThree = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
const {
|
const {
|
||||||
|
currentView,
|
||||||
showTopThree,
|
showTopThree,
|
||||||
showDetails,
|
showDetails,
|
||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
@@ -194,7 +195,7 @@ const TopThree = (props) => {
|
|||||||
"appealType":
|
"appealType":
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_appealcasetype,
|
.pinswg_appealcasetype,
|
||||||
"showLoginCheck": props.showLoginCheck,
|
"showLoginCheck": currentView.showLogin,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -124,14 +124,12 @@ const ViewAllResults = (props) => {
|
|||||||
resultsArr[key].pinswg_appealcasetype,
|
resultsArr[key].pinswg_appealcasetype,
|
||||||
"repDetails":
|
"repDetails":
|
||||||
currentView.viewKey ==
|
currentView.viewKey ==
|
||||||
"myRepresentations" &&
|
"myRepresentations" && resultsArr[key],
|
||||||
resultsArr[key],
|
|
||||||
});
|
});
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
{t("search:searchresults-case-reference-label")}
|
{t("search:searchresults-case-reference-label")}:
|
||||||
:
|
|
||||||
</span>
|
</span>
|
||||||
{currentView.viewKey != "watchedCases"
|
{currentView.viewKey != "watchedCases"
|
||||||
? currentView.viewKey == "myRepresentations"
|
? currentView.viewKey == "myRepresentations"
|
||||||
@@ -140,7 +138,6 @@ const ViewAllResults = (props) => {
|
|||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]}
|
]}
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -528,7 +525,7 @@ const ViewAllResults = (props) => {
|
|||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<a
|
<a
|
||||||
onClick={() => router.back()}
|
onClick={() => router.replace("/myportal")}
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
>
|
>
|
||||||
Back
|
Back
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ const WatchedCases = (props) => {
|
|||||||
{t("myportal:watchedcases-card-title")}
|
{t("myportal:watchedcases-card-title")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="cardModuleContainer">
|
<div className="cardModuleContainer">
|
||||||
<div>werwrew {props.showLoginCheck}</div>
|
|
||||||
<TopThree
|
<TopThree
|
||||||
showTopThree={props.watchedCases.watchedCases}
|
showTopThree={props.watchedCases.watchedCases}
|
||||||
showDetails={props.watchedCases.watchedCasesDetails}
|
showDetails={props.watchedCases.watchedCasesDetails}
|
||||||
topThreeType={"watchedCases"}
|
topThreeType={"watchedCases"}
|
||||||
showLoginCheck={props.showLoginCheck}
|
showLoginCheck={props.showLoginCheck}
|
||||||
|
currentView={props.currentView}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -47,7 +47,9 @@ const WatchedCases = (props) => {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("myportal:viewall-link")}
|
{t("myportal:viewall-link")}{" "}
|
||||||
|
{props.watchedCases.watchedCases["@odata.count"] +
|
||||||
|
" cases"}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -80,10 +80,8 @@ const Home = (props) => {
|
|||||||
representationsObj={
|
representationsObj={
|
||||||
props.searchResultsObj.representationsObj
|
props.searchResultsObj.representationsObj
|
||||||
}
|
}
|
||||||
showRepresentations={showRepresentations}
|
showRepresentations={props.currentView.showReps}
|
||||||
showLoginCheck={
|
currentView={props.currentView}
|
||||||
props.currentView.caseReference.showLogin
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Footer footerLinks={footerLinks} />
|
<Footer footerLinks={footerLinks} />
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import {
|
|||||||
setMyRepresentations,
|
setMyRepresentations,
|
||||||
setMyRepresentationsDetails,
|
setMyRepresentationsDetails,
|
||||||
} from "../../store/myRepresentations/action";
|
} from "../../store/myRepresentations/action";
|
||||||
|
import { setShowReps } from "../../store/currentView/action";
|
||||||
import { wrapper } from "../../store/store";
|
import { wrapper } from "../../store/store";
|
||||||
import {
|
import {
|
||||||
setWatchedCases,
|
setWatchedCases,
|
||||||
@@ -57,6 +58,7 @@ const Home = (props) => {
|
|||||||
accountDetails,
|
accountDetails,
|
||||||
showFileUpload,
|
showFileUpload,
|
||||||
showLoginCheck,
|
showLoginCheck,
|
||||||
|
currentView,
|
||||||
} = props;
|
} = props;
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
@@ -148,6 +150,7 @@ const Home = (props) => {
|
|||||||
showFileUpload={showFileUpload}
|
showFileUpload={showFileUpload}
|
||||||
containerID={accountDetails.containerID}
|
containerID={accountDetails.containerID}
|
||||||
showLoginCheck={showLoginCheck}
|
showLoginCheck={showLoginCheck}
|
||||||
|
currentView={currentView}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Footer footerLinks={footerLinks} />
|
<Footer footerLinks={footerLinks} />
|
||||||
@@ -237,6 +240,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
? "cy"
|
? "cy"
|
||||||
: "en";
|
: "en";
|
||||||
|
|
||||||
|
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||||
|
const showMapCheck = process.env.SHOWMAPS || false;
|
||||||
|
const showReps = process.env.SHOWREPRESENTATIONS || false;
|
||||||
|
store.dispatch(setShowReps(showReps, showLoginCheck));
|
||||||
|
|
||||||
// if (preferredLocale != ctx.locale) {
|
// if (preferredLocale != ctx.locale) {
|
||||||
// return {
|
// return {
|
||||||
// redirect: {
|
// redirect: {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import {
|
|||||||
} from "../../store/accountDetails/action";
|
} from "../../store/accountDetails/action";
|
||||||
|
|
||||||
const Home = (props) => {
|
const Home = (props) => {
|
||||||
const { footerLinks, pages, watchedCases } = props;
|
const { footerLinks, pages, watchedCases, showLoginCheck } = props;
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -84,6 +84,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
let thisSession = await getSession(ctx);
|
let thisSession = await getSession(ctx);
|
||||||
|
|
||||||
|
const showReps = process.env.SHOWREPRESENTATIONS || false;
|
||||||
|
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||||
|
store.dispatch(setShowReps(showReps, showLoginCheck));
|
||||||
|
|
||||||
if (!thisSession) {
|
if (!thisSession) {
|
||||||
console.log("not has sesssion.......");
|
console.log("not has sesssion.......");
|
||||||
return {
|
return {
|
||||||
@@ -98,13 +102,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
await getPortalLogin(thisSession.user.email),
|
await getPortalLogin(thisSession.user.email),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const showReps = process.env.SHOWREPRESENTATIONS || false;
|
|
||||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
|
||||||
store.dispatch(setShowReps(showReps, showLoginCheck));
|
|
||||||
|
|
||||||
console.log("env var ", process.env.SHOWREPRESENTATIONS);
|
|
||||||
store.dispatch(setShowReps(showReps, showLoginCheck));
|
|
||||||
|
|
||||||
searchResultsObj =
|
searchResultsObj =
|
||||||
searchResultsObj.status == 502
|
searchResultsObj.status == 502
|
||||||
? {
|
? {
|
||||||
@@ -139,6 +136,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
thisSession != false &&
|
thisSession != false &&
|
||||||
store.dispatch(setContainerID(thisSession.user.id));
|
store.dispatch(setContainerID(thisSession.user.id));
|
||||||
}
|
}
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
showLoginCheck: showLoginCheck,
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user