@@ -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) => {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {
|
|||||||
getPortalModuleDetails,
|
getPortalModuleDetails,
|
||||||
getWatchedCases,
|
getWatchedCases,
|
||||||
getSIPSEvents,
|
getSIPSEvents,
|
||||||
|
getSIPSMedia,
|
||||||
} from "../../../actions";
|
} from "../../../actions";
|
||||||
import { getFormCollectionByID } from "../../../components/utils";
|
import { getFormCollectionByID } from "../../../components/utils";
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ import {
|
|||||||
setSearchDetails,
|
setSearchDetails,
|
||||||
setSearchResults,
|
setSearchResults,
|
||||||
setEventDetails,
|
setEventDetails,
|
||||||
|
setMediaDetails,
|
||||||
} from "../../../store/searchOutput/action";
|
} from "../../../store/searchOutput/action";
|
||||||
import { wrapper } from "../../../store/store";
|
import { wrapper } from "../../../store/store";
|
||||||
import {
|
import {
|
||||||
@@ -129,6 +131,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
|
||||||
@@ -200,13 +203,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,
|
||||||
@@ -251,7 +262,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName": "Awaiting Submission",
|
"viewName": "Awaiting Submission",
|
||||||
"viewKey": "awaitingSubmissionDetails",
|
"viewKey": "awaitingSubmissionDetails",
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "watchedCases":
|
case "watchedCases":
|
||||||
@@ -295,7 +306,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName": "Watched Cases",
|
"viewName": "Watched Cases",
|
||||||
"viewKey": "watchedCases",
|
"viewKey": "watchedCases",
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "myCases":
|
case "myCases":
|
||||||
@@ -307,7 +318,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
const myCasesDetails = await getDetails(
|
const myCasesDetails = await getDetails(
|
||||||
myCases,
|
myCases,
|
||||||
"myCases"
|
"myCases",
|
||||||
);
|
);
|
||||||
store.dispatch(setMyCases(myCases));
|
store.dispatch(setMyCases(myCases));
|
||||||
store.dispatch(setMyCasesDetails(myCasesDetails));
|
store.dispatch(setMyCasesDetails(myCasesDetails));
|
||||||
@@ -315,32 +326,32 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName": "My Cases",
|
"viewName": "My Cases",
|
||||||
"viewKey": "myCases",
|
"viewKey": "myCases",
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "myRepresentations":
|
case "myRepresentations":
|
||||||
const myRepresentations = await getRepsFromBlob(
|
const myRepresentations = await getRepsFromBlob(
|
||||||
thisSession.user.id
|
thisSession.user.id,
|
||||||
);
|
);
|
||||||
|
|
||||||
const myRepresentationsDetails = await getDetails(
|
const myRepresentationsDetails = await getDetails(
|
||||||
myRepresentations,
|
myRepresentations,
|
||||||
"myRepresentations"
|
"myRepresentations",
|
||||||
);
|
);
|
||||||
|
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
setMyRepresentations(myRepresentations)
|
setMyRepresentations(myRepresentations),
|
||||||
);
|
);
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
setMyRepresentationsDetails(
|
setMyRepresentationsDetails(
|
||||||
myRepresentationsDetails
|
myRepresentationsDetails,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName": "My Representations",
|
"viewName": "My Representations",
|
||||||
"viewKey": "myRepresentations",
|
"viewKey": "myRepresentations",
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
// code block
|
// code block
|
||||||
@@ -364,7 +375,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
const watchedCasesDetails = await getDetails(
|
const watchedCasesDetails = await getDetails(
|
||||||
filteredWatchedCases,
|
filteredWatchedCases,
|
||||||
"myWatchedCases"
|
"myWatchedCases",
|
||||||
);
|
);
|
||||||
|
|
||||||
store.dispatch(setWatchedCases(filteredWatchedCases));
|
store.dispatch(setWatchedCases(filteredWatchedCases));
|
||||||
@@ -390,7 +401,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
searchDetailsObj[0].value[0]
|
searchDetailsObj[0].value[0]
|
||||||
.pinswg_specialistcaseprocess
|
.pinswg_specialistcaseprocess
|
||||||
: "",
|
: "",
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -403,17 +414,18 @@ 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,
|
||||||
messagesObj: await getCaseMessage(
|
messagesObj: await getCaseMessage(
|
||||||
searchResultsObj.value[0].incidentid
|
searchResultsObj.value[0].incidentid,
|
||||||
),
|
),
|
||||||
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
|
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
|
||||||
showMaps: process.env.SHOWMAPS,
|
showMaps: process.env.SHOWMAPS,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const getDetails = (resultsObj, detailsType) => {
|
const getDetails = (resultsObj, detailsType) => {
|
||||||
@@ -449,9 +461,9 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
return getPortalModuleDetails(
|
return getPortalModuleDetails(
|
||||||
getFormCollectionByID(data.pinswg_appealcasetype)
|
getFormCollectionByID(data.pinswg_appealcasetype)
|
||||||
.LogicalCollectionName,
|
.LogicalCollectionName,
|
||||||
caseID
|
caseID,
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -487,13 +499,13 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
getPortalModuleDetails(
|
getPortalModuleDetails(
|
||||||
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
||||||
.LogicalCollectionName,
|
.LogicalCollectionName,
|
||||||
caseID
|
caseID,
|
||||||
// detailsType != "myWatchedCases"
|
// detailsType != "myWatchedCases"
|
||||||
// ? searchDetail.ticketnumber
|
// ? searchDetail.ticketnumber
|
||||||
// : searchDetail[
|
// : searchDetail[
|
||||||
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
// ]
|
// ]
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user