17025 unsub issues
This commit is contained in:
@@ -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 +
|
||||
"?"
|
||||
) &&
|
||||
|
||||
Reference in New Issue
Block a user