added switch for login check on watch case and reps
This commit is contained in:
+12
-11
@@ -5,11 +5,11 @@ GRANT_TYPE = "client_credentials"
|
||||
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||
|
||||
//Dev oauth ESNR
|
||||
CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||
CLIENT_SECRET = AU88Q~NBOVOXqwb4mBx9y.NMIZ9s1o7boqZoKcSE
|
||||
RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||
RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "dev-pedw-hc"
|
||||
//CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||
//CLIENT_SECRET = AU88Q~NBOVOXqwb4mBx9y.NMIZ9s1o7boqZoKcSE
|
||||
//RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||
//RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "dev-pedw-hc"
|
||||
|
||||
|
||||
//Test Oauth ESNR
|
||||
@@ -30,16 +30,17 @@ RELAYPATH = "dev-pedw-hc"
|
||||
|
||||
|
||||
//Prod Oauth WGO
|
||||
//CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
||||
CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
||||
//CLIENT_SECRET = mJN7Q~lFu.xFGa5KCc.zwIm_fJAWxajyQaFo~
|
||||
//RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
||||
//RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "prod-pedw-hc"
|
||||
CLIENT_SECRET = tFk8Q~E.R-HFjROTu1sRKqwb_ONzy05uPYoF6awR
|
||||
RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
||||
RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "prod-pedw-hc"
|
||||
|
||||
|
||||
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||
SHOWLOGIN = true
|
||||
SHOWREPRESENTATIONS = true
|
||||
SHOWLOGIN = false
|
||||
SHOWREPRESENTATIONS = false
|
||||
SHOWFILEUPLOAD = "false"
|
||||
SHOWMAPS = "false"
|
||||
API_ROOT = "http://localhost:3000"
|
||||
|
||||
@@ -411,6 +411,9 @@ const CaseSummary = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
*/}
|
||||
|
||||
{showLoginCheck == true && (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
@@ -465,10 +468,12 @@ const CaseSummary = (props) => {
|
||||
onClick={() => {
|
||||
deleteItem(
|
||||
isWatchedCase(
|
||||
props.currentView
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.incidentid
|
||||
)[0].pinswg_watchlistid,
|
||||
)[0]
|
||||
.pinswg_watchlistid,
|
||||
|
||||
"watchedCases"
|
||||
);
|
||||
@@ -476,7 +481,8 @@ const CaseSummary = (props) => {
|
||||
t(
|
||||
"case:you-have-stopped-watching-label"
|
||||
) +
|
||||
props.currentView
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.currentReference
|
||||
);
|
||||
@@ -485,7 +491,9 @@ const CaseSummary = (props) => {
|
||||
"case:stop-watching-case-link"
|
||||
)}
|
||||
>
|
||||
{t("case:stop-watching-case-link")}{" "}
|
||||
{t(
|
||||
"case:stop-watching-case-link"
|
||||
)}{" "}
|
||||
</span>
|
||||
) : (
|
||||
<span
|
||||
@@ -506,13 +514,16 @@ const CaseSummary = (props) => {
|
||||
"case:you-are-watching-label"
|
||||
) +
|
||||
" " +
|
||||
props.currentView
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.currentReference
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("case:watch-this-case-link")}
|
||||
{t(
|
||||
"case:watch-this-case-link"
|
||||
)}
|
||||
</span>
|
||||
))}
|
||||
|
||||
@@ -532,7 +543,9 @@ const CaseSummary = (props) => {
|
||||
// item.title
|
||||
// );
|
||||
}}
|
||||
title={t("case:watch-this-case-link")}
|
||||
title={t(
|
||||
"case:watch-this-case-link"
|
||||
)}
|
||||
>
|
||||
{t("case:watch-this-case-link")}
|
||||
</span>
|
||||
@@ -561,6 +574,8 @@ const CaseSummary = (props) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{/* 1{" "}
|
||||
{_.has(detailsObj, "pinswg_startdatetimeiftheevent") &&
|
||||
detailsObj.pinswg_startdatetimeiftheevent}
|
||||
|
||||
@@ -91,6 +91,15 @@ const SignIn = (props) => {
|
||||
};
|
||||
|
||||
export async function getServerSideProps(context) {
|
||||
if (process.env.SHOWLOGIN == false) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/404",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const csrfToken = await getCsrfToken(context);
|
||||
console.log(
|
||||
"\n//////////////////////\n",
|
||||
|
||||
Reference in New Issue
Block a user