passing mediaobj to dns case and myportal dns case

This commit is contained in:
2026-02-19 14:12:55 +00:00
parent 9d355f6f77
commit 5cd3744e52
2 changed files with 39 additions and 14 deletions
+19 -6
View File
@@ -10,6 +10,7 @@ import {
getPersonalAccount, getPersonalAccount,
getPortalLogin, getPortalLogin,
getSIPSEvents, getSIPSEvents,
getSIPSMedia,
} from "../../actions"; } from "../../actions";
import Breadcrumbs from "../../components/breadcrumbs"; import Breadcrumbs from "../../components/breadcrumbs";
import Case from "../../components/case"; import Case from "../../components/case";
@@ -24,6 +25,7 @@ import {
setEventDetails, setEventDetails,
setSearchDetails, setSearchDetails,
setSearchResults, setSearchResults,
setMediaDetails,
} from "../../store/searchOutput/action"; } from "../../store/searchOutput/action";
import { wrapper } from "../../store/store"; import { wrapper } from "../../store/store";
import ServiceBanner from "../../components/servicebanner"; import ServiceBanner from "../../components/servicebanner";
@@ -110,6 +112,7 @@ const CaseHome = (props) => {
showFilteredDocs={props.showFilteredDocs} showFilteredDocs={props.showFilteredDocs}
showMaps={props.showMaps} showMaps={props.showMaps}
eventsObj={props.searchResultsObj.eventsObj} eventsObj={props.searchResultsObj.eventsObj}
mediaObj={props.searchResultsObj.mediaObj}
/> />
</div> </div>
<Footer <Footer
@@ -161,13 +164,22 @@ export const getServerSideProps = wrapper.getServerSideProps(
const searchDetailsObj = await getSearchDetails(searchResultsObj); const searchDetailsObj = await getSearchDetails(searchResultsObj);
var eventsObj = {}; var eventsObj = {};
var mediaObj = {};
if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) {
eventsObj = await getSIPSEvents( eventsObj = await getSIPSEvents(
searchDetailsObj[0].value[0].pinswg_sipsid searchDetailsObj[0].value[0].pinswg_sipsid,
); );
store.dispatch(setEventDetails(eventsObj)); store.dispatch(setEventDetails(eventsObj));
}
if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) {
mediaObj = await getSIPSMedia(
searchDetailsObj[0].value[0].pinswg_sipsid,
);
store.dispatch(setMediaDetails(mediaObj));
}
// console.log("eventsObj:", eventsObj); // console.log("eventsObj:", eventsObj);
// console.log( // console.log(
// "\n======================================\n", // "\n======================================\n",
@@ -190,7 +202,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
// }); // });
console.log( console.log(
searchResultsObj["@odata.count"] > 1 || searchResultsObj["@odata.count"] > 1 ||
searchResultsObj["@odata.count"] < 1 searchResultsObj["@odata.count"] < 1,
); );
if (searchResultsObj["@odata.count"] < 1) { if (searchResultsObj["@odata.count"] < 1) {
@@ -231,12 +243,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
searchDetailsObj[0].value[0] searchDetailsObj[0].value[0]
.pinswg_specialistcaseprocess .pinswg_specialistcaseprocess
: "", : "",
}) }),
); );
} }
} }
let messagesObj = await getCaseMessage( let messagesObj = await getCaseMessage(
searchResultsObj.value[0].incidentid searchResultsObj.value[0].incidentid,
); );
console.log(messagesObj); console.log(messagesObj);
@@ -247,6 +259,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
searchResultsObj: searchResultsObj, searchResultsObj: searchResultsObj,
searchDetailsObj: searchDetailsObj, searchDetailsObj: searchDetailsObj,
eventsObj: eventsObj, eventsObj: eventsObj,
mediaObj: mediaObj,
}, },
currentType: "directResultsObj", currentType: "directResultsObj",
docsOffline: process.env.DOCAPI_OFFLINE || false, docsOffline: process.env.DOCAPI_OFFLINE || false,
@@ -255,7 +268,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
showMaps: process.env.SHOWMAPS, showMaps: process.env.SHOWMAPS,
}, },
}; };
} },
); );
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
+19 -7
View File
@@ -10,6 +10,7 @@ import {
getPersonalAccount, getPersonalAccount,
getPortalLogin, getPortalLogin,
getSIPSEvents, getSIPSEvents,
getSIPSMedia,
} from "../../../actions"; } from "../../../actions";
import Breadcrumbs from "../../../components/breadcrumbs"; import Breadcrumbs from "../../../components/breadcrumbs";
import Case from "../../../components/case"; import Case from "../../../components/case";
@@ -24,6 +25,7 @@ import {
setEventDetails, setEventDetails,
setSearchDetails, setSearchDetails,
setSearchResults, setSearchResults,
setMediaDetails,
} from "../../../store/searchOutput/action"; } from "../../../store/searchOutput/action";
import { wrapper } from "../../../store/store"; import { wrapper } from "../../../store/store";
import ServiceBanner from "../../../components/servicebanner"; import ServiceBanner from "../../../components/servicebanner";
@@ -107,6 +109,7 @@ const CaseHome = (props) => {
showFilteredDocs={props.showFilteredDocs} showFilteredDocs={props.showFilteredDocs}
showMaps={props.showMaps} showMaps={props.showMaps}
eventsObj={props.searchResultsObj.eventsObj} eventsObj={props.searchResultsObj.eventsObj}
mediaObj={props.searchResultsObj.mediaObj}
/> />
</div> </div>
<Footer <Footer
@@ -158,13 +161,21 @@ export const getServerSideProps = wrapper.getServerSideProps(
const searchDetailsObj = await getSearchDetails(searchResultsObj); const searchDetailsObj = await getSearchDetails(searchResultsObj);
var eventsObj = {}; var eventsObj = {};
var mediaObj = {};
if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) {
eventsObj = await getSIPSEvents( eventsObj = await getSIPSEvents(
searchDetailsObj[0].value[0].pinswg_sipsid searchDetailsObj[0].value[0].pinswg_sipsid,
); );
store.dispatch(setEventDetails(eventsObj)); store.dispatch(setEventDetails(eventsObj));
}
if (searchResultsObj.value[0].pinswg_appealcasetype == 846040002) {
mediaObj = await getSIPSMedia(
searchDetailsObj[0].value[0].pinswg_sipsid,
);
store.dispatch(setMediaDetails(mediaObj));
}
// console.log( // console.log(
// "\n======================================\n", // "\n======================================\n",
// searchResultsObj, // searchResultsObj,
@@ -186,7 +197,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
// }); // });
console.log( console.log(
searchResultsObj["@odata.count"] > 1 || searchResultsObj["@odata.count"] > 1 ||
searchResultsObj["@odata.count"] < 1 searchResultsObj["@odata.count"] < 1,
); );
if (searchResultsObj["@odata.count"] < 1) { if (searchResultsObj["@odata.count"] < 1) {
@@ -227,12 +238,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
searchDetailsObj[0].value[0] searchDetailsObj[0].value[0]
.pinswg_specialistcaseprocess .pinswg_specialistcaseprocess
: "", : "",
}) }),
); );
} }
} }
let messagesObj = await getCaseMessage( let messagesObj = await getCaseMessage(
searchResultsObj.value[0].incidentid searchResultsObj.value[0].incidentid,
); );
console.log(messagesObj); console.log(messagesObj);
@@ -243,6 +254,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
searchResultsObj: searchResultsObj, searchResultsObj: searchResultsObj,
searchDetailsObj: searchDetailsObj, searchDetailsObj: searchDetailsObj,
eventsObj: eventsObj, eventsObj: eventsObj,
mediaObj: mediaObj,
}, },
currentType: "directResultsObj", currentType: "directResultsObj",
docsOffline: process.env.DOCAPI_OFFLINE || false, docsOffline: process.env.DOCAPI_OFFLINE || false,
@@ -251,7 +263,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
showMaps: process.env.SHOWMAPS, showMaps: process.env.SHOWMAPS,
}, },
}; };
} },
); );
const mapStateToProps = (state) => { const mapStateToProps = (state) => {