updated filelist obj to check else default to empty array
This commit is contained in:
+22
-22
@@ -13,27 +13,27 @@ HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136
|
|||||||
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
|
|
||||||
# //New Dev oauth ESNR
|
# //New Dev oauth ESNR
|
||||||
CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
# CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||||
CLIENT_SECRET = .Jf8Q~tKMObCJjhh_hy3J5AIctFrBalU4FS~tdxk
|
# CLIENT_SECRET = .Jf8Q~tKMObCJjhh_hy3J5AIctFrBalU4FS~tdxk
|
||||||
RELAY_ROOT = https://ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net/ar-hc-lz-pedw-dev-uks-01/
|
# RELAY_ROOT = https://ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net/ar-hc-lz-pedw-dev-uks-01/
|
||||||
RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net"
|
# RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net"
|
||||||
RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
# RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
||||||
CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
|
|
||||||
# //New Test
|
# //New Test
|
||||||
# CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
||||||
# CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM
|
CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM
|
||||||
# RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/
|
RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/
|
||||||
# RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net"
|
RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net"
|
||||||
# RELAYPATH = "ar-hc-lz-pedw-test-uks-01"
|
RELAYPATH = "ar-hc-lz-pedw-test-uks-01"
|
||||||
# CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS"
|
CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS"
|
||||||
|
|
||||||
# //New PreProd
|
# //New PreProd
|
||||||
# CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
# CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||||
# CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E
|
# CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E
|
||||||
# RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/
|
# RELAY_ROOT = https://ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-uks-01/
|
||||||
# RELAYURI = "ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net"
|
# RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net"
|
||||||
# RELAYPATH = "ar-hc-lz-pedw-ppe-ukw-01"
|
# RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01"
|
||||||
# CRMURL = "ppcrm2016.llcdt.gov.wales/UATPINS"
|
# CRMURL = "ppcrm2016.llcdt.gov.wales/UATPINS"
|
||||||
|
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ GOOGLE_TAG_MANAGER = G-GTWW3JT03Z
|
|||||||
SHOWLOGIN = true
|
SHOWLOGIN = true
|
||||||
SHOWREPRESENTATIONS = true
|
SHOWREPRESENTATIONS = true
|
||||||
SHOWFILEUPLOAD = "false"
|
SHOWFILEUPLOAD = "false"
|
||||||
SHOWMAPS = true
|
SHOWMAPS = false
|
||||||
API_ROOT = "http://localhost:3000"
|
API_ROOT = "http://localhost:3000"
|
||||||
CY_API_ROOT = "http://cymru.local:3000"
|
CY_API_ROOT = "http://cymru.local:3000"
|
||||||
I18N_DOMAIN = "cymru.local"
|
I18N_DOMAIN = "cymru.local"
|
||||||
@@ -93,14 +93,14 @@ AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
|||||||
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwcnruks.blob.core.windows.net
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwcnruks.blob.core.windows.net
|
||||||
|
|
||||||
// new dev key
|
// new dev key
|
||||||
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwdevuks"
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwdevuks"
|
||||||
AZURE_STORAGE_ACCOUNT_KEY = MmrsrCjBfop9pI2oImsP/+lJUWU2DrXsAB8nq5bOVROTmPovSGxjCjKw9+TAFr00k8WDUK9r6mVx+AStcMLyAA==
|
# AZURE_STORAGE_ACCOUNT_KEY = MmrsrCjBfop9pI2oImsP/+lJUWU2DrXsAB8nq5bOVROTmPovSGxjCjKw9+TAFr00k8WDUK9r6mVx+AStcMLyAA==
|
||||||
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net
|
||||||
|
|
||||||
// New test key
|
// New test key
|
||||||
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks"
|
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks"
|
||||||
# AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg==
|
AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg==
|
||||||
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net
|
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net
|
||||||
|
|
||||||
// New preprod key
|
// New preprod key
|
||||||
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks"
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks"
|
||||||
|
|||||||
+70
-34
@@ -3,7 +3,7 @@ import _ from "lodash";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useEffect } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import Documents from "./documents";
|
import Documents from "./documents";
|
||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
getLinkedCases,
|
getLinkedCases,
|
||||||
getPortalModuleDetailsProxy,
|
getPortalModuleDetailsProxy,
|
||||||
getWatchedCasesProxy,
|
getWatchedCasesProxy,
|
||||||
|
setCaseInvolvment,
|
||||||
} from "../../actions";
|
} from "../../actions";
|
||||||
import {
|
import {
|
||||||
setCurrentLinkedCases,
|
setCurrentLinkedCases,
|
||||||
@@ -56,6 +57,8 @@ import Pinswg_rowid from "./summaryTypes/pinswg_rowid";
|
|||||||
import Pinswg_transportandworkactid from "./summaryTypes/pinswg_transportandworkactid";
|
import Pinswg_transportandworkactid from "./summaryTypes/pinswg_transportandworkactid";
|
||||||
import Pinswg_wayleaveid from "./summaryTypes/pinswg_wayleaveid";
|
import Pinswg_wayleaveid from "./summaryTypes/pinswg_wayleaveid";
|
||||||
import CaseNoticeBanner from "./caseNoticeBanner";
|
import CaseNoticeBanner from "./caseNoticeBanner";
|
||||||
|
import WatchModal from "./watchmodal";
|
||||||
|
|
||||||
const CaseSummary = (props) => {
|
const CaseSummary = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
@@ -88,6 +91,16 @@ const CaseSummary = (props) => {
|
|||||||
currentType == "directResultsObj" ? "true" : currentView.showLogin;
|
currentType == "directResultsObj" ? "true" : currentView.showLogin;
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
|
|
||||||
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
|
||||||
|
const handleOpenModal = () => {
|
||||||
|
setIsModalOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCloseModal = () => {
|
||||||
|
setIsModalOpen(false);
|
||||||
|
};
|
||||||
|
|
||||||
const cookies = parseCookies();
|
const cookies = parseCookies();
|
||||||
|
|
||||||
const isLPA =
|
const isLPA =
|
||||||
@@ -114,6 +127,8 @@ const CaseSummary = (props) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setCaseInvolvment(incidentid, loggedInUser);
|
||||||
};
|
};
|
||||||
|
|
||||||
const isWatchedCase = (whichIncident) => {
|
const isWatchedCase = (whichIncident) => {
|
||||||
@@ -586,39 +601,48 @@ const CaseSummary = (props) => {
|
|||||||
)}{" "}
|
)}{" "}
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<>
|
||||||
className="govuk-link watchCase"
|
<button
|
||||||
onClick={() => {
|
className="govuk-link watchCase"
|
||||||
confirm(
|
onClick={() => {
|
||||||
t(
|
confirm(
|
||||||
"case:you-are-watching-label"
|
t(
|
||||||
) +
|
"case:you-are-watching-label"
|
||||||
" " +
|
) +
|
||||||
props
|
" " +
|
||||||
.currentView
|
props
|
||||||
.caseReference
|
.currentView
|
||||||
.currentReference +
|
.caseReference
|
||||||
"?"
|
.currentReference +
|
||||||
) &&
|
"?"
|
||||||
selectWatchedCase(
|
) &&
|
||||||
props
|
selectWatchedCase(
|
||||||
.accountDetails
|
props
|
||||||
.loggedinUserId,
|
.accountDetails
|
||||||
props
|
.loggedinUserId,
|
||||||
.currentView
|
props
|
||||||
.caseReference
|
.currentView
|
||||||
.incidentid,
|
.caseReference
|
||||||
props
|
.incidentid,
|
||||||
.currentView
|
props
|
||||||
.caseReference
|
.currentView
|
||||||
.appealType
|
.caseReference
|
||||||
);
|
.appealType
|
||||||
}}
|
);
|
||||||
>
|
}}
|
||||||
{t(
|
>
|
||||||
"case:watch-this-case-link"
|
{t(
|
||||||
)}
|
"case:watch-this-case-link"
|
||||||
</button>
|
)}
|
||||||
|
</button>
|
||||||
|
{/* <button
|
||||||
|
onClick={
|
||||||
|
handleOpenModal
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Open Modal
|
||||||
|
</button> */}
|
||||||
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{!session && (
|
{!session && (
|
||||||
@@ -669,6 +693,11 @@ const CaseSummary = (props) => {
|
|||||||
"case:watch-this-case-link"
|
"case:watch-this-case-link"
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
{/* <button
|
||||||
|
onClick={handleOpenModal}
|
||||||
|
>
|
||||||
|
Open Modal
|
||||||
|
</button> */}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -714,6 +743,13 @@ const CaseSummary = (props) => {
|
|||||||
docsOffline={docsOffline}
|
docsOffline={docsOffline}
|
||||||
showFilteredDocs={props.showFilteredDocs}
|
showFilteredDocs={props.showFilteredDocs}
|
||||||
/>
|
/>
|
||||||
|
{/* <WatchModal
|
||||||
|
isOpen={isModalOpen}
|
||||||
|
onClose={handleCloseModal}
|
||||||
|
casesObj={casesObj}
|
||||||
|
currentType={currentType}
|
||||||
|
props={props}
|
||||||
|
/> */}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
import { signOut } from "next-auth/react";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import { destroyCookie, parseCookies, setCookie } from "nookies";
|
||||||
|
import { signIn, useSession } from "next-auth/react";
|
||||||
|
|
||||||
|
const WatchModal = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const { isOpen, onClose } = props;
|
||||||
|
|
||||||
|
const currentType = props.currentType;
|
||||||
|
const casesObj = props.casesObj;
|
||||||
|
const { data: session, status } = useSession();
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
|
let now = new Date();
|
||||||
|
let expDate = new Date(now);
|
||||||
|
|
||||||
|
expDate.setDate(now.getDate() + 365);
|
||||||
|
|
||||||
|
if (!isOpen) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className={open ? "modal fade show" : "modal fade"}
|
||||||
|
style={{
|
||||||
|
display: open ? "flex" : "none",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="modal-dialog">
|
||||||
|
<div className="modal-content">
|
||||||
|
<h3>Watch case</h3>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{!session
|
||||||
|
? " You will now be signed in to watch this case"
|
||||||
|
: " you are logged in already"}
|
||||||
|
</p>
|
||||||
|
<div className="govuk-checkboxes__item">
|
||||||
|
<input
|
||||||
|
className="govuk-checkboxes__input"
|
||||||
|
type="checkbox"
|
||||||
|
name="addInvolvement"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label-s govuk-checkboxes__label"
|
||||||
|
htmlFor="addInvolvement"
|
||||||
|
>
|
||||||
|
{} Yes, I want you want to be emailed updates
|
||||||
|
for case
|
||||||
|
<div> {casesObj.title}</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
className="govuk-button"
|
||||||
|
onClick={() => {
|
||||||
|
setCookie(
|
||||||
|
null,
|
||||||
|
"pedwWatchCase",
|
||||||
|
currentType == "searchResultsObj"
|
||||||
|
? detailsObj.pinswg_name
|
||||||
|
: currentType == "directResultsObj"
|
||||||
|
? casesObj.title
|
||||||
|
: casesObj.reference,
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
expires: expDate,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
signIn();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Yes
|
||||||
|
</button>{" "}
|
||||||
|
<button
|
||||||
|
className="govuk-button govuk-button--secondary"
|
||||||
|
onClick={onClose}
|
||||||
|
>
|
||||||
|
No
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="modal-backdrop fade show"></div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default WatchModal;
|
||||||
@@ -73,7 +73,9 @@ let BuildCheckSection = (props) => {
|
|||||||
//console.log("attached docs: - ", buildAppealFilesArray);
|
//console.log("attached docs: - ", buildAppealFilesArray);
|
||||||
buildAppealFilesArray = props.props.form.appealForm.values.filesList || [];
|
buildAppealFilesArray = props.props.form.appealForm.values.filesList || [];
|
||||||
|
|
||||||
let filesUploadObj = props.appealType.fileList.value[0];
|
let filesUploadObj = props.appealType.fileList.hasOwnProperty("value")
|
||||||
|
? props.appealType.fileList.value[0]
|
||||||
|
: [];
|
||||||
|
|
||||||
for (let key in filesUploadObj) {
|
for (let key in filesUploadObj) {
|
||||||
typeof filesUploadObj[key].name != "undefined" &&
|
typeof filesUploadObj[key].name != "undefined" &&
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ module.exports = {
|
|||||||
"/myportal/dns/*": ["dnsCommon", "case", "common"],
|
"/myportal/dns/*": ["dnsCommon", "case", "common"],
|
||||||
"/myportal/dns/[developmentName]": ["dnsCommon", "case", "common"],
|
"/myportal/dns/[developmentName]": ["dnsCommon", "case", "common"],
|
||||||
"/advancedsearch": ["search", "myportal"],
|
"/advancedsearch": ["search", "myportal"],
|
||||||
"/advancedsearchresults": ["search"],
|
"/advancedsearchresults": ["search", "case"],
|
||||||
"/searchresults": ["search", "case"],
|
"/searchresults": ["search", "case"],
|
||||||
"/addresssearch": ["search", "case", "myportal"],
|
"/addresssearch": ["search", "case", "myportal"],
|
||||||
"/addresssearchresults": ["search", "case", "myportal"],
|
"/addresssearchresults": ["search", "case", "myportal"],
|
||||||
|
|||||||
Reference in New Issue
Block a user