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
+25 -25
View File
@@ -194,8 +194,8 @@ const TopThree = (props) => {
showTopThreeArr[key]
.pinswg_appealcasetype,
});
}}>
}}
>
{topThreeType != "watchedCases"
? topThreeType != "myRepresentations"
? showTopThreeArr[key].ticketnumber
@@ -205,7 +205,6 @@ const TopThree = (props) => {
: showTopThreeArr[key][
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]}{" "}
</Link>
</div>
{/* {(topThreeType == "awaitingSubmission" ||
@@ -301,46 +300,47 @@ const TopThree = (props) => {
</div>
{topThreeType == "watchedCases" && (
<div className="">
<a
<span
href="#"
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
onClick={() => {
event.preventDefault();
deleteItem(
showTopThreeArr[key].pinswg_watchlistid,
"watchedCases"
);
alert(
"You have stopped watching case " +
confirm(
t("case:you-have-stopped-watching-label") +
showTopThreeArr[key][
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]
);
) &&
deleteItem(
showTopThreeArr[key].pinswg_watchlistid,
"watchedCases"
);
}}
>
&mdash;
</a>
</span>
</div>
)}
{topThreeType == "awaitingSubmission" && (
<div className="">
<a
href="#"
<span
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
onClick={() => {
event.preventDefault();
deleteItem(
showTopThreeArr[key].incidentid,
"awaitingSubmission"
);
alert(
"You have deleted case " +
showTopThreeArr[key].ticketnumber
);
confirm(
t("case:do-you-want-to-delete-case-label") +
showTopThreeArr[key].ticketnumber +
"?\n" +
t(
"case:do-you-want-to-delete-case-disclaimer-label"
)
) &&
deleteItem(
showTopThreeArr[key].incidentid,
"awaitingSubmission"
);
}}
>
&mdash;
</a>
</span>
</div>
)}
</div>