reps defects

This commit is contained in:
2024-06-03 11:57:11 +01:00
parent c63ea33c64
commit c947995e7b
19 changed files with 392 additions and 167 deletions
+34 -9
View File
@@ -29,7 +29,13 @@ import {
} from "../../store/accountDetails/action";
const CaseHome = (props) => {
const { footerLinks, pages } = props;
const {
footerLinks,
pages,
setSearchResults,
setSearchDetails,
searchResultsObj,
} = props;
let { t, lang } = useTranslation();
const router = useRouter();
@@ -54,9 +60,9 @@ const CaseHome = (props) => {
props={props}
myCases={props.myCases.myCases}
myCasesDetails={props.myCases.myCasesDetails}
directSearchResultsObj={
props.searchResultsObj.searchResultsObj
}
// directSearchResultsObj={
// props.searchResultsObj.searchResultsObj
// }
searchDetailsObj={
props.searchResultsObj.searchDetailsObj
}
@@ -172,6 +178,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
},
};
} else {
store.dispatch(setSearchResults(searchResultsObj));
store.dispatch(setSearchDetails(searchDetailsObj));
store.dispatch(
setCurrentReference({
"ticketnumber": searchResultsObj.value[0].ticketnumber,
@@ -180,6 +188,17 @@ export const getServerSideProps = wrapper.getServerSideProps(
"incidentid": searchResultsObj.value[0].incidentid,
"appealType":
searchResultsObj.value[0].pinswg_appealcasetype,
"showLoginCheck": true,
"specialistProcess":
searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess != null ||
searchDetailsObj[0].value[0]
.pinswg_specialistcaseprocess != null
? searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess ||
searchDetailsObj[0].value[0]
.pinswg_specialistcaseprocess
: "",
})
);
}
@@ -187,10 +206,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
// console.log(searchResultsObj);
return {
props: {
searchResultsObj: {
searchResultsObj: searchResultsObj,
searchDetailsObj: searchDetailsObj,
},
// searchResultsObj: {
// searchResultsObj: searchResultsObj,
// searchDetailsObj: searchDetailsObj,
// },
currentType: "directResultsObj",
},
};
@@ -202,7 +221,7 @@ const mapStateToProps = (state) => {
accountDetails: state.accountDetails,
currentView: state.currentView,
search: state.search,
//searchResultsObj: state.searchResultsObj,
searchResultsObj: state.searchResultsObj,
documentDetailsObj: state.searchResultsObj.documentDetailsObj,
formData: state.formData,
appealType: state.appealType,
@@ -219,6 +238,12 @@ const mapDispatchToProps = (dispatch) => {
setCurrentReference: (currentReference) => {
dispatch(setCurrentReference(refno));
},
setSearchResults: (searchResults) => {
dispatch(setSearchResults(searchResults));
},
setSearchDetails: (searchDetails) => {
dispatch(setSearchDetails(searchDetails));
},
};
};