tweak to auth

This commit is contained in:
2023-11-09 12:31:53 +00:00
parent ef1f773022
commit 6a927155bc
4 changed files with 41 additions and 15 deletions
+21
View File
@@ -86,6 +86,27 @@ const SearchResults = (props) => {
const cookies = parseCookies();
const selectWatchedCase = (loggedInUser, incidentID, appealType) => {
let updateBody = {
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
"pinswg_appealcasetype": +appealType,
};
createWatchedCases(updateBody)
.then((data) => data)
.then(() => {
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
(data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases").then((data) => {
setWatchedCasesDetails(data);
});
}
);
});
};
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath.query(
watchedCases,