From 3e48f8cd28a7b24bf89508af1f0f42485afb7b04 Mon Sep 17 00:00:00 2001 From: robbond Date: Tue, 10 Mar 2026 10:31:16 +0000 Subject: [PATCH] correctly go back to the previous page search results --- components/breadcrumbs.js | 90 +++-- components/case/summary.js | 461 +++++++++++----------- components/search/addresssearchresults.js | 126 +++--- components/search/searchresults.js | 138 ++++--- 4 files changed, 407 insertions(+), 408 deletions(-) diff --git a/components/breadcrumbs.js b/components/breadcrumbs.js index 8bbb5444..12055eea 100644 --- a/components/breadcrumbs.js +++ b/components/breadcrumbs.js @@ -12,7 +12,7 @@ import { Field, change, reduxForm } from "redux-form"; import { setCurrentSection } from "../store/appealType/action"; import { setRepresentationCapacity, - setRepresentationSubmit, + setRepresentationSubmit } from "../store/currentView/action"; const Breadcrumbs = (props) => { const { @@ -20,7 +20,7 @@ const Breadcrumbs = (props) => { setCurrentView, setCurrentSection, setRepresentationCapacity, - setRepresentationSubmit, + setRepresentationSubmit } = props; const router = useRouter(); let { t } = useTranslation(); @@ -38,10 +38,10 @@ const Breadcrumbs = (props) => { currentView.caseReference.appealType == 846040008 ? 7 : currentView.caseReference.appealType == 846040005 || - currentView.caseReference.appealType == 846040006 || - currentView.caseReference.appealType == 846040007 - ? 9 - : ""; + currentView.caseReference.appealType == 846040006 || + currentView.caseReference.appealType == 846040007 + ? 9 + : ""; var viewAllKey = currentView?.viewKey || router.query.viewKey; return ( @@ -551,17 +551,25 @@ const Breadcrumbs = (props) => { <>
  • - {t("common:breadcrumb-search-results")} + {router.query.ads == "true" + ? t( + "common:breadcrumb-addresssearch-results" + ) + : t( + "common:breadcrumb-search-results" + )}
  • @@ -602,10 +610,6 @@ const Breadcrumbs = (props) => { props.props.search .searchString } - onClick={() => { - // spinnerState(); - router.back(); - }} className="govuk-breadcrumbs__link" > {t( @@ -704,23 +708,29 @@ const Breadcrumbs = (props) => {
  • - {t("common:breadcrumb-search-results")} + {router.query.adv == "true" + ? t( + "common:breadcrumb-advanced-search-results" + ) + : router.query.ads == "true" + ? t( + "common:breadcrumb-address-search-results" + ) + : t( + "common:breadcrumb-search-results" + )}
  • @@ -827,11 +837,13 @@ const Breadcrumbs = (props) => { router.locale != "en" ? router.locale + "/searchresults?q=" + - props.props.search - .searchString + router.query.q + + "&page=" + + router.query.page : "/searchresults?q=" + - props.props.search - .searchString + router.query.q + + "&page=" + + router.query.page } onClick={() => { // spinnerState(); @@ -1193,7 +1205,7 @@ const Breadcrumbs = (props) => { const mapStateToProps = (state) => { return { - ...state, + ...state }; }; @@ -1214,7 +1226,7 @@ const mapDispatchToProps = (dispatch) => { }, setCurrentSection: (currentSection) => { dispatch(setCurrentSection(currentSection)); - }, + } }; }; diff --git a/components/case/summary.js b/components/case/summary.js index 94ebe0d6..edfd587a 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -786,235 +786,241 @@ const CaseSummary = (props) => { <>
    -
    - {getFormCollectionByID( - appealTypeID - ).PrimaryIdAttribute == - "pinswg_sipscase" && - showReps( - detailsObj.pinswg_consultationopen, - detailsObj.pinswg_consultationclose - ) && ( - <> - {showRepButton( - props - .currentView - .caseReference - .appealType - ) ? ( - <> - +
    + {getFormCollectionByID( + appealTypeID + ).PrimaryIdAttribute == + "pinswg_sipscase" && + showReps( + detailsObj.pinswg_consultationopen, + detailsObj.pinswg_consultationclose + ) && ( + <> + {showRepButton( + props + .currentView + .caseReference + .appealType + ) ? ( + <> + - {props - .currentView - .caseReference - .appealType == - 846040002 - ? t( - "case:summary-make-consultation-label" - ) - : t( - "case:summary-make-representation-label" - )} - - - { - //spinnerState(); - router.back(); - }} - className="govuk-button govuk-button--secondary" - > - {t( - "case:summary-back-button-label" - )} - - - ) : !isLPA && - props.currentView - .caseReference - .appealType == - 846040004 ? ( - "" - ) : ( - <> -
    -
    -

    - {t( - "case:representation-date-passed-label", - { - startDate: - formatDates( - detailsObj.pinswg_consultationopen - ), - endDate: - formatDates( - detailsObj.pinswg_consultationclose + : currentType == + "watchedCases" + ? casesObj.pinswg_title + : currentType == + "directResultsObj" + ? detailsObj.pinswg_name + : casesObj.reference + } + }} + className="govuk-button" + > + {props + .currentView + .caseReference + .appealType == + 846040002 + ? t( + "case:summary-make-consultation-label" + ) + : t( + "case:summary-make-representation-label" + )} + + + ) : !isLPA && + props + .currentView + .caseReference + .appealType == + 846040004 ? ( + "" + ) : ( + <> +

    +
    +

    + {t( + "case:representation-date-passed-label", + { + startDate: + formatDates( + detailsObj.pinswg_consultationopen + ), + endDate: + formatDates( + detailsObj.pinswg_consultationclose + ) + } + )} +
    {" "} + {t( + "case:representation-date-passed-additional-label" + )}{" "} + {" "} - {t( - "case:representation-date-passed-additional-label" - )}{" "} - + {t( "home:login-contact-email" - ) - } - > - {t( - "home:login-contact-email" - )} - -

    + )} + +

    +
    -
    - - )} - - )} - {(_.has( - detailsObj, - "pinswg_startdate" - ) || - _.has( + + )} + + )} + {(_.has( detailsObj, - "pinswg_applicationacceptedasvalid" + "pinswg_startdate" ) || - _.has( - detailsObj, - "pinswg_startdates" - )) && - showReps( - detailsObj.pinswg_startdate || - detailsObj.pinswg_startdates || - detailsObj.pinswg_applicationacceptedasvalid, - detailsObj.pinswg_finalcommentsduedate || - detailsObj.pinswg_endofrepresentationperiod - ) && ( - <> - {showRepButton( - props - .currentView - .caseReference - .appealType - ) ? ( - <> - + {showRepButton( + props + .currentView + .caseReference + .appealType + ) ? ( + <> + - {t( - "case:summary-make-representation-label" - )} - - - { - //spinnerState(); - router.back(); - }} - className="govuk-button govuk-button--secondary" - > - {t( - "case:summary-back-button-label" - )} - - - ) : !isLPA && - props.currentView - .caseReference - .appealType == - 846040004 ? ( - "" - ) : ( - <> -
    -
    -

    - {t( - "case:representation-date-passed-label", - { - startDate: - formatDates( - detailsObj.pinswg_startdate - ), - endDate: - props - .currentView - .caseReference - .appealType == - 846040019 - ? formatDates( - detailsObj.pinswg_statementduedate - ) - : formatDates( - detailsObj.pinswg_finalcommentsduedate - ) - } - )} -
    {" "} - {t( - "case:representation-date-passed-additional-label" - )}{" "} - + : currentType == + "watchedCases" + ? casesObj.pinswg_title + : currentType == + "directResultsObj" + ? detailsObj.ticketnumber + : casesObj.reference + } + }} + className="govuk-button" + > + {t( + "case:summary-make-representation-label" + )} + + + ) : !isLPA && + props + .currentView + .caseReference + .appealType == + 846040004 ? ( + "" + ) : ( + <> +

    +
    +

    {t( - "home:login-contact-email" + "case:representation-date-passed-label", + { + startDate: + formatDates( + detailsObj.pinswg_startdate + ), + endDate: + props + .currentView + .caseReference + .appealType == + 846040019 + ? formatDates( + detailsObj.pinswg_statementduedate + ) + : formatDates( + detailsObj.pinswg_finalcommentsduedate + ) + } )} - -

    +
    {" "} + {t( + "case:representation-date-passed-additional-label" + )}{" "} + + {t( + "home:login-contact-email" + )} + +

    +
    -
    - - )} - - )} -
    + + )} + + )} + + + {" "} + {t( + "case:summary-back-button-label" + )} + +
    +
    {session && (isWatchedCase( props.currentView @@ -1245,13 +1251,6 @@ const CaseSummary = (props) => { "case:send-email-notifications" )} - {/* */} ))} {!session && ( @@ -1939,16 +1938,6 @@ const CaseSummary = (props) => { )} )} - - { - // spinnerState(); - router.back(); - }} - className="govuk-button govuk-button--secondary" - > - {t("case:summary-back-button-label")} -
    diff --git a/components/search/addresssearchresults.js b/components/search/addresssearchresults.js index ce63b4d9..5e7c1327 100644 --- a/components/search/addresssearchresults.js +++ b/components/search/addresssearchresults.js @@ -13,11 +13,11 @@ import { useEffect } from "react"; import { setLoggedInUserId } from "../../store/accountDetails/action"; import { setSearchDetails, - setSearchResults, + setSearchResults } from "../../store/searchOutput/action"; import { setWatchedCases, - setWatchedCasesDetails, + setWatchedCasesDetails } from "../../store/watchedCases/action"; import { getDetailsProxy } from "../utils"; @@ -27,7 +27,7 @@ import { signIn, useSession } from "next-auth/react"; import { createWatchedCases, deleteWatchedCases, - getWatchedCasesProxy, + getWatchedCasesProxy } from "../../actions"; import RepsOnResults from "./repsonresults"; @@ -71,7 +71,7 @@ const SearchResults = (props) => { setWatchedCases, setWatchedCasesDetails, isLinkedCase, - showLoginCheck, + showLoginCheck } = props; let { t } = useTranslation(); @@ -109,7 +109,7 @@ const SearchResults = (props) => { let updateBody = { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", "pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")", - "pinswg_appealcasetype": +appealType, + "pinswg_appealcasetype": +appealType }; createWatchedCases(updateBody) @@ -117,12 +117,12 @@ const SearchResults = (props) => { .then(() => { getWatchedCasesProxy(props.accountDetails.loggedinUserId).then( (data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); } ); }); @@ -138,7 +138,7 @@ const SearchResults = (props) => { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", "pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")", "pinswg_appealcasetype": +appealType, - "pinswg_emailnotifications": true, + "pinswg_emailnotifications": true }; console.log("Email signed up"); @@ -147,12 +147,12 @@ const SearchResults = (props) => { .then(() => { getWatchedCasesProxy(props.accountDetails.loggedinUserId).then( (data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); } ); }); @@ -165,7 +165,7 @@ const SearchResults = (props) => { whichIncident + "')]", json: watchedCases, - eval: true, + eval: true }); return isWatched; @@ -179,7 +179,7 @@ const SearchResults = (props) => { "' && @.pinswg_emailnotifications==true)]", json: watchedCases, - eval: true, + eval: true }); return isEmail; }; @@ -203,7 +203,7 @@ const SearchResults = (props) => { let newObj = {}; return Object.assign(newObj, { "@odata.count": required.length, - "value": required, + "value": required }); }; @@ -214,12 +214,12 @@ const SearchResults = (props) => { var dateB = new Date(b.createdon); return dateB - dateA; }); - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); }); }); }; @@ -354,7 +354,7 @@ const SearchResults = (props) => { '")]', json: searchDetailsObj, - eval: true, + eval: true }); detailsObj = detailsObj[0]; return ( @@ -364,34 +364,24 @@ const SearchResults = (props) => { >
    { - // setCurrentReference({ - // "ticketnumber": - // item.ticketnumber, - // "currentReference": - // item.title, - // "currentType": - // "searchResultsObj", - // "incidentid": - // item.incidentid, - // "appealType": - // item.pinswg_appealcasetype, - // "showLoginCheck": - // props.showLoginCheck, - // }); - // }} > {t( @@ -424,13 +414,13 @@ const SearchResults = (props) => { ) < 0 ? detailsObj.pinswg_projectlocation : router.locale == - "cy" - ? detailsObj.pinswg_projectlocation.split( - ";" - )[1] - : detailsObj.pinswg_projectlocation.split( - ";" - )[0] + "cy" + ? detailsObj.pinswg_projectlocation.split( + ";" + )[1] + : detailsObj.pinswg_projectlocation.split( + ";" + )[0] : "", highlightQuery ) @@ -578,7 +568,7 @@ const SearchResults = (props) => { : {_.has(detailsObj, [ - "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue", + "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" ]) ? detailsObj[ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" @@ -593,7 +583,7 @@ const SearchResults = (props) => { : {_.has(item, [ - "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue", + "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ]) ? router.locale == "cy" ? jsonpath({ @@ -604,14 +594,14 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item[ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] || "N/A" : ""} {_.has(item, [ - "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue", + "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ]) ? router.locale == "cy" ? jsonpath({ @@ -622,7 +612,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -658,7 +648,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item["pinswg_appealType"] || "N/A"} @@ -680,7 +670,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -834,7 +824,7 @@ const SearchResults = (props) => { "&toWatch=" + item.incidentid + "_" + - item.pinswg_appealcasetype, + item.pinswg_appealcasetype }); }} title={t( @@ -865,7 +855,7 @@ const SearchResults = (props) => { "&toWatch=" + item.incidentid + "_" + - item.pinswg_appealcasetype, + item.pinswg_appealcasetype }); }} > @@ -903,7 +893,7 @@ const SearchResults = (props) => { resultsArr = _.sortBy(resultsArr, [ function (o) { return o[orderBy]; - }, + } ]); fieldSort == "desc" && resultsArr.reverse(); @@ -946,7 +936,7 @@ const SearchResults = (props) => { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", "pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")", - "pinswg_appealcasetype": +appealType, + "pinswg_appealcasetype": +appealType }; createWatchedCases(updateBody) @@ -955,12 +945,12 @@ const SearchResults = (props) => { getWatchedCasesProxy( props.accountDetails.loggedinUserId ).then((data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); }); }); }; @@ -983,7 +973,7 @@ const SearchResults = (props) => { setLoggedInUserId(props.accountDetails.loggedinUserId); setCookie(null, "pinsUser", props.accountDetails.loggedinUserId, { path: "/", - expires: expDate, + expires: expDate }); selectWatchedCase( props.accountDetails.loggedinUserId, @@ -1006,7 +996,7 @@ const SearchResults = (props) => { getSearchPageResults, setWatchedCasesDetails, props.accountDetails.loggedinUserId, - router.query, + router.query ]); return ( @@ -1024,7 +1014,7 @@ const SearchResults = (props) => { {resultsArr.length > 200 ? t("search:searchresults-max-count-label") : t("search:searchresults-count-label", { - count: searchResultsObj["@odata.count"], + count: searchResultsObj["@odata.count"] })} . {advancedSearch != true ? ( @@ -1108,7 +1098,7 @@ const mapDispatchToProps = (dispatch) => { }, setWatchedCasesDetails: (watchedCasesDetails) => { dispatch(setWatchedCasesDetails(watchedCasesDetails)); - }, + } // setCurrentPage: (currentPage) => { // dispatch(setCurrentPage(currentPage)); // }, @@ -1118,7 +1108,7 @@ const mapDispatchToProps = (dispatch) => { const mapStateToProps = (state) => { return { // currentView: state.currentView, - accountDetails: state.accountDetails, + accountDetails: state.accountDetails // search: state.search, // searchResultsObj: state.searchResultsObj, }; diff --git a/components/search/searchresults.js b/components/search/searchresults.js index 6b13985e..b2e72d4c 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -9,7 +9,7 @@ import { getAdvancedSearchPaged, getBasicSearchPaged } from "../../actions"; import transLookup from "../../data/lookuptranslations.json"; import { setCurrentPage, - setCurrentReference, + setCurrentReference } from "../../store/currentView/action"; import { parseCookies, setCookie } from "nookies"; @@ -17,11 +17,11 @@ import { useEffect } from "react"; import { setLoggedInUserId } from "../../store/accountDetails/action"; import { setSearchDetails, - setSearchResults, + setSearchResults } from "../../store/searchOutput/action"; import { setWatchedCases, - setWatchedCasesDetails, + setWatchedCasesDetails } from "../../store/watchedCases/action"; import { getDetailsProxy, getSearchDetailsPaged } from "../utils"; @@ -31,11 +31,12 @@ import { signIn, useSession } from "next-auth/react"; import { createWatchedCases, deleteWatchedCases, - getWatchedCasesProxy, + getWatchedCasesProxy } from "../../actions"; import { sendGAEvent } from "@next/third-parties/google"; import RepsOnResults from "./repsonresults"; +import { query } from "jsonpath"; const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); @@ -78,7 +79,7 @@ const SearchResults = (props) => { setWatchedCasesDetails, isLinkedCase, setCurrentPage, - showLoginCheck, + showLoginCheck } = props; let { t } = useTranslation(); @@ -116,7 +117,7 @@ const SearchResults = (props) => { let updateBody = { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", "pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")", - "pinswg_appealcasetype": +appealType, + "pinswg_appealcasetype": +appealType }; createWatchedCases(updateBody) @@ -124,12 +125,12 @@ const SearchResults = (props) => { .then(() => { getWatchedCasesProxy(props.accountDetails.loggedinUserId).then( (data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); } ); }); @@ -145,7 +146,7 @@ const SearchResults = (props) => { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", "pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")", "pinswg_appealcasetype": +appealType, - "pinswg_emailnotifications": true, + "pinswg_emailnotifications": true }; console.log("Email signed up"); @@ -154,12 +155,12 @@ const SearchResults = (props) => { .then(() => { getWatchedCasesProxy(props.accountDetails.loggedinUserId).then( (data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); } ); }); @@ -173,7 +174,7 @@ const SearchResults = (props) => { "')]", json: watchedCases, - eval: true, + eval: true }); return isWatched; @@ -187,7 +188,7 @@ const SearchResults = (props) => { "' && @.pinswg_emailnotifications==true)]", json: watchedCases, - eval: true, + eval: true }); return isEmail; }; @@ -200,7 +201,7 @@ const SearchResults = (props) => { "')]", json: watchedCases, - eval: true, + eval: true }); return isWatched; @@ -225,7 +226,7 @@ const SearchResults = (props) => { let newObj = {}; return Object.assign(newObj, { "@odata.count": required.length, - "value": required, + "value": required }); }; @@ -236,12 +237,12 @@ const SearchResults = (props) => { var dateB = new Date(b.createdon); return dateB - dateA; }); - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); }); }); }; @@ -259,7 +260,7 @@ const SearchResults = (props) => { ? searchString.map(([key, val]) => val).filter(Boolean) : searchString; - const ResultsView = (resultsArr) => { + const ResultsView = (resultsArr, currPage) => { return ( <>
    @@ -374,7 +375,7 @@ const SearchResults = (props) => { item.ticketnumber + '")]', json: searchDetailsObj, - eval: true, + eval: true }); Object.assign(item, item.pinswg_sipscase); @@ -388,25 +389,32 @@ const SearchResults = (props) => {
    { - sendGAEvent( + (sendGAEvent( "event", "CaseViewed", { caseReference: - item.ticketnumber, + item.ticketnumber } ), setCurrentReference({ @@ -428,11 +436,11 @@ const SearchResults = (props) => { ) ? detailsObj.pinswg_speacialistcaseprocess : detailsObj.hasOwnProperty( - "pinswg_specialistcaseprocess" - ) - ? detailsObj.pinswg_specialistcaseprocess - : "", - }); + "pinswg_specialistcaseprocess" + ) + ? detailsObj.pinswg_specialistcaseprocess + : "" + })); }} > @@ -486,12 +494,12 @@ const SearchResults = (props) => { ) < 0 ? detailsObj.pinswg_projectlocation : router.locale == "cy" - ? detailsObj.pinswg_projectlocation.split( - ";" - )[1] - : detailsObj.pinswg_projectlocation.split( - ";" - )[0] + ? detailsObj.pinswg_projectlocation.split( + ";" + )[1] + : detailsObj.pinswg_projectlocation.split( + ";" + )[0] : "" : // : hasValidKey( // item, @@ -585,12 +593,12 @@ const SearchResults = (props) => { " " + item.pinswg_appellantlastname : _.has(detailsObj, [ - "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue", - ]) - ? detailsObj[ - "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" - ] - : ""} + "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" + ]) + ? detailsObj[ + "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" + ] + : ""}
    @@ -600,7 +608,7 @@ const SearchResults = (props) => { : {_.has(item, [ - "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue", + "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ]) ? router.locale == "cy" ? jsonpath({ @@ -611,7 +619,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -647,7 +655,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -670,7 +678,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -821,7 +829,7 @@ const SearchResults = (props) => { "&toWatch=" + item.incidentid + "_" + - item.pinswg_appealcasetype, + item.pinswg_appealcasetype }); }} title={t( @@ -949,7 +957,7 @@ const SearchResults = (props) => { searchString, selectedOption, setSearchDetails, - setSearchResults, + setSearchResults ] ); @@ -973,7 +981,7 @@ const SearchResults = (props) => { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", "pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")", - "pinswg_appealcasetype": +appealType, + "pinswg_appealcasetype": +appealType }; createWatchedCases(updateBody) @@ -982,12 +990,12 @@ const SearchResults = (props) => { getWatchedCasesProxy( props.accountDetails.loggedinUserId ).then((data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); } - ); + )); }); }); }; @@ -1010,7 +1018,7 @@ const SearchResults = (props) => { setLoggedInUserId(props.accountDetails.loggedinUserId); setCookie(null, "pinsUser", props.accountDetails.loggedinUserId, { path: "/", - expires: expDate, + expires: expDate }); selectWatchedCase( props.accountDetails.loggedinUserId, @@ -1033,7 +1041,7 @@ const SearchResults = (props) => { getSearchPageResults, setWatchedCasesDetails, props.accountDetails.loggedinUserId, - router.query, + router.query ]); //console.log( // "page is here ", @@ -1059,7 +1067,7 @@ const SearchResults = (props) => { : t("search:searchresults-count-label", { count: searchResultsObj[ "@odata.count" - ], + ] })} . {advancedSearch != true ? ( @@ -1122,7 +1130,7 @@ const SearchResults = (props) => {
    )} {resultsArr.length > 0 ? ( - ResultsView(resultsArr) + ResultsView(resultsArr, props.currentView.currentPage) ) : (
    @@ -1157,14 +1165,14 @@ const mapDispatchToProps = (dispatch) => { }, setCurrentPage: (currentPage) => { dispatch(setCurrentPage(currentPage)); - }, + } }; }; const mapStateToProps = (state) => { return { - // currentView: state.currentView, - accountDetails: state.accountDetails, + currentView: state.currentView, + accountDetails: state.accountDetails // search: state.search, // searchResultsObj: state.searchResultsObj, };