17025 unsub issues

This commit is contained in:
2025-06-10 11:25:32 +01:00
parent 5dee64dfec
commit 193da6af2f
9 changed files with 412 additions and 25 deletions
+30 -3
View File
@@ -180,6 +180,27 @@ const SearchResults = (props) => {
getWatchedCasesProxy(
props.accountDetails.loggedinUserId
).then((data) => {
let showWatchedCases = (submittedArr) => {
const required = submittedArr.value.filter((el) => {
return (
el.pinswg_representationsubmitted == null
);
});
let newObj = {};
return Object.assign(newObj, {
"@odata.count": required.length,
"value": required,
});
};
data = showWatchedCases(data);
data.value.sort(function compare(a, b) {
var dateA = new Date(a.createdon);
var dateB = new Date(b.createdon);
return dateB - dateA;
});
setWatchedCases(data),
getDetailsProxy(data, "myWatchedCases").then(
(data) => {
@@ -690,7 +711,9 @@ const SearchResults = (props) => {
title="Email about changes"
onClick={() => {
confirm(
" Do you want to be sent email updates for " +
t(
"case:summary-subscribe-mail-label"
) +
item.title +
"?"
) &&
@@ -754,10 +777,14 @@ const SearchResults = (props) => {
</button>
<button
className="govuk-summary-list__actionLink mailLink"
title="Email about changes"
title={t(
"common:subscribe-title-label"
)}
onClick={() => {
confirm(
" Do you want to be sent email updates for " +
t(
"case:summary-subscribe-mail-label"
) +
item.title +
"?"
) &&