tweak to auth
This commit is contained in:
@@ -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,
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
"multiparty": "^4.2.3",
|
||||
"mysql": "^2.18.1",
|
||||
"nanoid": "^3.2.0",
|
||||
"next": "13.4",
|
||||
"next": "^14.0.1",
|
||||
"next-auth": "^4.22.1",
|
||||
"next-connect": "^0.12.2",
|
||||
"next-redux-wrapper": "^7.0.5",
|
||||
|
||||
+18
-14
@@ -64,23 +64,27 @@ class MyDocument extends Document {
|
||||
)}
|
||||
{!process.browser && (
|
||||
<>
|
||||
<script nonce={generatedNonce}>
|
||||
window.switchDomain = {process.env.I18N_DOMAIN}
|
||||
</script>
|
||||
<script nonce={generatedNonce}>
|
||||
window.apiRoot = {process.env.API_ROOT}
|
||||
</script>
|
||||
<script
|
||||
nonce={generatedNonce}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html:
|
||||
"window.switchDomain = '" +
|
||||
process.env.I18N_DOMAIN +
|
||||
"'",
|
||||
}}
|
||||
/>
|
||||
<script
|
||||
nonce={generatedNonce}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html:
|
||||
"window.apiRoot = '" +
|
||||
process.env.API_ROOT +
|
||||
"'",
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
{typeof window !== "undefined" && (
|
||||
<>
|
||||
<div>hello</div>
|
||||
<script nonce={generatedNonce}>
|
||||
{`window.apiRoot = '${process.env.API_ROOT}'`}
|
||||
</script>
|
||||
</>
|
||||
)}
|
||||
<SkipLink />
|
||||
<Main />
|
||||
<NextScript />
|
||||
|
||||
@@ -108,6 +108,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
accountDetails: state.accountDetails,
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
|
||||
Reference in New Issue
Block a user