Merged PR 1652: 16986 fixed unsubscribe all
16986 fixed unsubscribe all Related work items: #16986
This commit is contained in:
@@ -103,7 +103,7 @@ const deleteWatchedCases = async (watchedCaseID) => {
|
|||||||
|
|
||||||
return axios(config)
|
return axios(config)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
//console.log("deleted watched case - " + watchedCaseID);
|
console.log("deleted watched case - " + watchedCaseID);
|
||||||
res.status(200).json(data);
|
res.status(200).json(data);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@@ -40,22 +40,29 @@ const UnsubscribeCase = (props) => {
|
|||||||
<h1>{t("common:unsubscribe-case-title")}</h1>
|
<h1>{t("common:unsubscribe-case-title")}</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{t("common:unsubscribe-case-all-label")}
|
{casesArr == null
|
||||||
{casesArr.length > 0 ? "s" : ""}
|
? t(
|
||||||
|
"common:unsubscribe-case-none-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"common:unsubscribe-case-all-label"
|
||||||
|
) + (casesArr.length > 0 ? "s" : "")}
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
{casesArr != null && (
|
||||||
{casesArr.map((key, index) => (
|
<ul>
|
||||||
<li key={index}>
|
{casesArr.map((key, index) => (
|
||||||
<strong>
|
<li key={index}>
|
||||||
{
|
<strong>
|
||||||
key[
|
{
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
key[
|
||||||
]
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}
|
]
|
||||||
</strong>
|
}
|
||||||
</li>
|
</strong>
|
||||||
))}
|
</li>
|
||||||
</ul>
|
))}
|
||||||
|
</ul>
|
||||||
|
)}
|
||||||
|
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
{t("common:logged-out-link")}
|
{t("common:logged-out-link")}
|
||||||
@@ -154,8 +161,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
//hasUnsubscribed && (await deleteWatchedCases(query.watchlistid));
|
//hasUnsubscribed && (await deleteWatchedCases(query.watchlistid));
|
||||||
|
|
||||||
searchResultsObj.value.forEach(function (watchListID) {
|
searchResultsObj.value.forEach(async function (watchListID) {
|
||||||
console.log(watchListID.pinswg_watchlistid);
|
console.log(watchListID.pinswg_watchlistid);
|
||||||
|
|
||||||
|
deleteWatchedCases(watchListID.pinswg_watchlistid);
|
||||||
});
|
});
|
||||||
|
|
||||||
//console.log(deleteCase);
|
//console.log(deleteCase);
|
||||||
|
|||||||
Reference in New Issue
Block a user