Merged PR 1472: SIPS Sprint 2 070325

Related work items: #14656, #14697
This commit is contained in:
Robert Bond
2025-03-10 09:25:27 +00:00
4 changed files with 91 additions and 66 deletions
+26 -6
View File
@@ -15,10 +15,18 @@ export default function CaseNoticeBanner(props) {
const bannerOpenCookie = typeof cookie.get("pedwNotice") == "undefined"; const bannerOpenCookie = typeof cookie.get("pedwNotice") == "undefined";
let messagesObjArr = messagesObj.value; let messagesObjArr = messagesObj.value;
let todaysDate = new Date();
return ( return (
<> <>
{messagesObjArr.map((message, index) => ( {messagesObjArr.map((message, index) => (
<div className="govuk-warning-text noticebanner" key={index}> <>
{todaysDate.toISOString() >= message.scheduledstart &&
todaysDate.toISOString() <= message.scheduledend && (
<div
className="govuk-warning-text noticebanner"
key={index}
>
<strong className="govuk-warning-text__text"> <strong className="govuk-warning-text__text">
<span className="govuk-visually-hidden"> <span className="govuk-visually-hidden">
{t("case:notice-label")} {t("case:notice-label")}
@@ -51,7 +59,9 @@ export default function CaseNoticeBanner(props) {
: message.subject : message.subject
.split("Banner ")[1] .split("Banner ")[1]
.split(";")[0] .split(";")[0]
: message.subject.split("Banner ")[1]} : message.subject.split(
"Banner "
)[1]}
</h2> </h2>
</div> </div>
<div className="govuk-body-s"> <div className="govuk-body-s">
@@ -61,16 +71,24 @@ export default function CaseNoticeBanner(props) {
) || [] ) || []
).length > 0 ).length > 0
? router.locale == "cy" ? router.locale == "cy"
? message.description.split(">>>")[1] ? message.description.split(
: message.description.split(">>>")[0] ">>>"
)[1]
: message.description.split(
">>>"
)[0]
: ( : (
message.description.match( message.description.match(
new RegExp(";", "g") new RegExp(";", "g")
) || [] ) || []
).length > 0 ).length > 0
? router.locale == "cy" ? router.locale == "cy"
? message.description.split(";")[1] ? message.description.split(
: message.description.split(";")[0] ";"
)[1]
: message.description.split(
";"
)[0]
: message.description} : message.description}
</div> </div>
<div className="govuk-body-xs govuk-!-margin-bottom-0 "> <div className="govuk-body-xs govuk-!-margin-bottom-0 ">
@@ -79,6 +97,8 @@ export default function CaseNoticeBanner(props) {
</div> </div>
</div> </div>
</div> </div>
)}
</>
))} ))}
</> </>
); );
+2 -2
View File
@@ -888,7 +888,7 @@ const DocumentDetails = (props) => {
selectedOption, selectedOption,
selectedDocumentType selectedDocumentType
) )
.then((data) => data) // .then((data) => data)
.then((data) => { .then((data) => {
setDocumentDetails(data); setDocumentDetails(data);
setShowSpinnerState(false); setShowSpinnerState(false);
@@ -1012,7 +1012,7 @@ const DocumentDetails = (props) => {
return docObj; return docObj;
}; };
const searchDocumentResultsObj = docDetailsObj(); //const searchDocumentResultsObj = docDetailsObj();
}, [ }, [
incidentid, incidentid,
setDocumentDetails, setDocumentDetails,
+1 -1
View File
@@ -23,7 +23,7 @@ const EventsDetails = (props) => {
return obj.hasOwnProperty(property) && obj[property] !== null; return obj.hasOwnProperty(property) && obj[property] !== null;
} }
console.log(eventsArr.length > 0); //console.log(eventsArr.length > 0);
return ( return (
eventsArr.length > 0 && ( eventsArr.length > 0 && (
@@ -121,7 +121,12 @@ export default async function ApiProxy(req, res) {
} }
} }
console.log(docTypeQueryString); // console.log(
// "documentType:",
// documentType,
// "docTypeQueryString:",
// docTypeQueryString
// );
//console.log("has this passed docuemntType:", documentType); //console.log("has this passed docuemntType:", documentType);
//(documentType !="all" && " pinswg_pinswg_isharedocumentlocations eq " + ) //(documentType !="all" && " pinswg_pinswg_isharedocumentlocations eq " + )
@@ -140,7 +145,7 @@ export default async function ApiProxy(req, res) {
? "&$skiptoken=" + ('<cookie pagenumber="' + pageNumber + '" />') ? "&$skiptoken=" + ('<cookie pagenumber="' + pageNumber + '" />')
: ""); : "");
console.log("docu paged: ", queryUrl); //console.log("docu paged 1: ", queryUrl);
return axios return axios
.get( .get(