fixed breacrumb and label

This commit is contained in:
2026-03-10 18:02:37 +00:00
parent 93d02697a2
commit df311e131a
5 changed files with 604 additions and 775 deletions
@@ -54,7 +54,7 @@ export default async function ApiProxy(req, res) {
return axios
.get(
BASE_URL + queryUrl + hashAPIPath(queryUrl),
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
azureHeaders(token.access_token)
)
.then(({ data }) => {
+60 -43
View File
@@ -13,7 +13,7 @@ import {
getPortalModuleDetails,
getWatchedCases,
getSIPSEvents,
getSIPSMedia,
getSIPSMedia
} from "../../../actions";
import { getFormCollectionByID } from "../../../components/utils";
@@ -27,28 +27,30 @@ import { getSearchDetails } from "../../../components/utils";
import {
setAccountDetails,
setContainerID,
setLoggedInUserId,
setLoggedInUserId
} from "../../../store/accountDetails/action";
import {
setCurrentReference,
setCurrentView,
setCurrentView
} from "../../../store/currentView/action";
import { setMyCases, setMyCasesDetails } from "../../../store/myCases/action";
import {
setMyRepresentations,
setMyRepresentationsDetails,
setMySubmittedReps,
setMySubmittedRepsDetails
} from "../../../store/myRepresentations/action";
import { setSearch } from "../../../store/search/action";
import {
setSearchDetails,
setSearchResults,
setEventDetails,
setMediaDetails,
setMediaDetails
} from "../../../store/searchOutput/action";
import { wrapper } from "../../../store/store";
import {
setWatchedCases,
setWatchedCasesDetails,
setWatchedCasesDetails
} from "../../../store/watchedCases/action";
import ServiceBanner from "../../../components/myportal/servicebanner";
import TimeOut from "../../../components/timeout";
@@ -59,7 +61,7 @@ const CaseHome = (props) => {
pages,
setSearchResults,
setSearchDetails,
searchResultsObj,
searchResultsObj
} = props;
let { t, lang } = useTranslation();
@@ -159,7 +161,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
if (thisSession) {
console.log(" has sesssion.......");
[loggedInUser] = await Promise.all([
await getPortalLogin(thisSession.user.email),
await getPortalLogin(thisSession.user.email)
]);
loggedInUser = loggedInUser.value[0].contactid;
@@ -168,8 +170,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
return {
redirect: {
destination: "/auth/signin",
permanent: false,
},
permanent: false
}
};
}
@@ -203,14 +205,14 @@ export const getServerSideProps = wrapper.getServerSideProps(
if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) {
eventsObj = await getSIPSEvents(
searchDetailsObj[0].value[0].pinswg_sipsid,
searchDetailsObj[0].value[0].pinswg_sipsid
);
store.dispatch(setEventDetails(eventsObj));
}
if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) {
mediaObj = await getSIPSMedia(
searchDetailsObj[0].value[0].pinswg_sipsid,
searchDetailsObj[0].value[0].pinswg_sipsid
);
store.dispatch(setMediaDetails(mediaObj));
}
@@ -236,8 +238,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
return {
redirect: {
destination: "/404",
permanent: false,
},
permanent: false
}
};
} else {
if (searchResultsObj["@odata.count"] > 1) {
@@ -245,8 +247,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
redirect: {
//destination: "/dns-not-found",
destination: "/404",
permanent: false,
},
permanent: false
}
};
} else {
if (query.hasOwnProperty("key")) {
@@ -257,8 +259,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(
setCurrentView({
"viewName": "Awaiting Submission",
"viewKey": "awaitingSubmissionDetails",
}),
"viewKey": "awaitingSubmissionDetails"
})
);
break;
case "watchedCases":
@@ -301,8 +303,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(
setCurrentView({
"viewName": "Watched Cases",
"viewKey": "watchedCases",
}),
"viewKey": "watchedCases"
})
);
break;
case "myCases":
@@ -314,41 +316,42 @@ export const getServerSideProps = wrapper.getServerSideProps(
const myCasesDetails = await getDetails(
myCases,
"myCases",
"myCases"
);
store.dispatch(setMyCases(myCases));
store.dispatch(setMyCasesDetails(myCasesDetails));
store.dispatch(
setCurrentView({
"viewName": "My Cases",
"viewKey": "myCases",
}),
"viewKey": "myCases"
})
);
break;
case "myRepresentations":
const myRepresentations = await getRepsFromBlob(
thisSession.user.id,
thisSession.user.id
);
const myRepresentationsDetails = await getDetails(
myRepresentations,
"myRepresentations",
"myRepresentations"
);
store.dispatch(
setMyRepresentations(myRepresentations),
setMyRepresentations(myRepresentations)
);
store.dispatch(
setMyRepresentationsDetails(
myRepresentationsDetails,
),
myRepresentationsDetails
)
);
store.dispatch(
setCurrentView({
"viewName": "My Representations",
"viewKey": "myRepresentations",
}),
"viewKey": "myRepresentations"
})
);
default:
// code block
}
@@ -363,7 +366,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
let newObj = {};
return Object.assign(newObj, {
"@odata.count": required.length,
"value": required,
"value": required
});
};
@@ -371,7 +374,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
const watchedCasesDetails = await getDetails(
filteredWatchedCases,
"myWatchedCases",
"myWatchedCases"
);
store.dispatch(setWatchedCases(filteredWatchedCases));
@@ -396,8 +399,21 @@ export const getServerSideProps = wrapper.getServerSideProps(
.pinswg_speacialistcaseprocess ||
searchDetailsObj[0].value[0]
.pinswg_specialistcaseprocess
: "",
}),
: ""
})
);
const mySubmittedReps = watchedCases.value.filter(
(el) => el.pinswg_representationsubmitted != null
);
const [mySubmittedRepsDetails] = await Promise.all([
getDetails(mySubmittedReps, "mySubmittedReps")
]);
store.dispatch(setMySubmittedReps(mySubmittedReps));
store.dispatch(
setMySubmittedRepsDetails(mySubmittedRepsDetails)
);
}
}
@@ -410,18 +426,18 @@ export const getServerSideProps = wrapper.getServerSideProps(
searchResultsObj: searchResultsObj,
searchDetailsObj: searchDetailsObj,
eventsObj: eventsObj,
mediaObj: mediaObj,
mediaObj: mediaObj
},
currentType: "directResultsObj",
docsOffline: process.env.DOCAPI_OFFLINE || false,
messagesObj: await getCaseMessage(
searchResultsObj.value[0].incidentid,
searchResultsObj.value[0].incidentid
),
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
showMaps: process.env.SHOWMAPS,
},
showMaps: process.env.SHOWMAPS
}
};
},
}
);
const getDetails = (resultsObj, detailsType) => {
@@ -457,9 +473,9 @@ const getDetails = (resultsObj, detailsType) => {
return getPortalModuleDetails(
getFormCollectionByID(data.pinswg_appealcasetype)
.LogicalCollectionName,
caseID,
caseID
);
}),
})
);
});
}
@@ -495,13 +511,13 @@ const getDetails = (resultsObj, detailsType) => {
getPortalModuleDetails(
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
.LogicalCollectionName,
caseID,
caseID
// detailsType != "myWatchedCases"
// ? searchDetail.ticketnumber
// : searchDetail[
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
// ]
),
)
);
});
@@ -524,6 +540,7 @@ const mapStateToProps = (state) => {
watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission,
mySubmittedReps: state.myRepresentations.mySubmittedReps
};
};
@@ -540,7 +557,7 @@ const mapDispatchToProps = (dispatch) => {
// },
setLoggedInUserId: (loggedInUser) => {
dispatch(setLoggedInUserId(loggedInUser));
},
}
};
};