updated watched cases with language and confirm

This commit is contained in:
2024-01-29 15:11:23 +00:00
parent 888ddf60bd
commit 3e83332d28
13 changed files with 216 additions and 167 deletions
+50 -30
View File
@@ -411,8 +411,7 @@ const CaseSummary = (props) => {
</div>
</div>
*/}
{showLoginCheck == true && (
{showLoginCheck == "true" && (
<>
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
@@ -466,26 +465,27 @@ const CaseSummary = (props) => {
<span
className="govuk-link"
onClick={() => {
deleteItem(
isWatchedCase(
props
.currentView
.caseReference
.incidentid
)[0]
.pinswg_watchlistid,
"watchedCases"
);
alert(
confirm(
t(
"case:you-have-stopped-watching-label"
) +
props
.currentView
.caseReference
.currentReference
);
.currentReference +
"?"
) &&
deleteItem(
isWatchedCase(
props
.currentView
.caseReference
.incidentid
)[0]
.pinswg_watchlistid,
"watchedCases"
);
}}
title={t(
"case:stop-watching-case-link"
@@ -499,17 +499,7 @@ const CaseSummary = (props) => {
<span
className=" govuk-link"
onClick={() => {
selectWatchedCase(
props.accountDetails
.loggedinUserId,
props.currentView
.caseReference
.incidentid,
props.currentView
.caseReference
.appealType
);
alert(
confirm(
t(
"case:you-are-watching-label"
) +
@@ -517,8 +507,22 @@ const CaseSummary = (props) => {
props
.currentView
.caseReference
.currentReference
);
.currentReference +
"?"
) &&
selectWatchedCase(
props
.accountDetails
.loggedinUserId,
props
.currentView
.caseReference
.incidentid,
props
.currentView
.caseReference
.appealType
);
}}
>
{t(
@@ -532,7 +536,7 @@ const CaseSummary = (props) => {
className="govuk-link"
onClick={() => {
// signIn("email");
signIn();
// signIn();
// selectWatchedCase(
// cookies.pinsUser,
// item.incidentid,
@@ -542,6 +546,21 @@ const CaseSummary = (props) => {
// "Trying to watch case " +
// item.title
// );
confirm(
"Trying to watch case " +
props.currentView
.caseReference
.currentReference +
"\n\nYou will now be prompted to sign in"
) &&
signIn("email", {
callbackUrl:
"/myportal/searchresults?q=" +
props
.currentView
.caseReference
.currentReference,
});
}}
title={t(
"case:watch-this-case-link"
@@ -576,6 +595,7 @@ const CaseSummary = (props) => {
</div>
</>
)}
{/* 1{" "}
{_.has(detailsObj, "pinswg_startdatetimeiftheevent") &&
detailsObj.pinswg_startdatetimeiftheevent}