refactor phase 3a pages-newappeal-and-case targeted actions imports
This commit is contained in:
+22
-22
@@ -3,12 +3,12 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { getIP } from "../../../actions/core/logger";
|
||||
import {
|
||||
getIP,
|
||||
getIncidentbyID,
|
||||
getPersonalAccount,
|
||||
getPortalLogin,
|
||||
} from "../../../actions";
|
||||
getPortalLogin
|
||||
} from "../../../actions/services/accountService";
|
||||
import { getIncidentbyID } from "../../../actions/services/caseService";
|
||||
import Breadcrumbs from "../../../components/breadcrumbs";
|
||||
import Case from "../../../components/case";
|
||||
import CookieBanner from "../../../components/cookieBanner";
|
||||
@@ -16,7 +16,7 @@ import Footer from "../../../components/footer";
|
||||
import Header from "../../../components/header";
|
||||
import {
|
||||
getFormCollectionByID,
|
||||
getSearchDetails,
|
||||
getSearchDetails
|
||||
} from "../../../components/utils";
|
||||
import { setAccountDetails } from "../../../store/accountDetails/action";
|
||||
import { setCurrentReference } from "../../../store/currentView/action";
|
||||
@@ -113,7 +113,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;
|
||||
@@ -147,20 +147,20 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
whichAppeal == "pinswg_harbourrevisionorders"
|
||||
? "pinswg_postcode"
|
||||
: whichAppeal == "pinswg_transportandworkacts" ||
|
||||
whichAppeal == "pinswg_electricityacts" ||
|
||||
whichAppeal == "pinswg_dnses"
|
||||
? "pinswg_postcode"
|
||||
: "pinswg_siteaddresspostcode";
|
||||
whichAppeal == "pinswg_electricityacts" ||
|
||||
whichAppeal == "pinswg_dnses"
|
||||
? "pinswg_postcode"
|
||||
: "pinswg_siteaddresspostcode";
|
||||
|
||||
var defaultFirstLineAddress =
|
||||
whichAppeal == "pinswg_ldps" ||
|
||||
whichAppeal == "pinswg_harbourrevisionorders"
|
||||
? "pinswg_postcode"
|
||||
: whichAppeal == "pinswg_transportandworkacts" ||
|
||||
whichAppeal == "pinswg_electricityacts" ||
|
||||
whichAppeal == "pinswg_dnses"
|
||||
? "pinswg_addressline1"
|
||||
: "pinswg_siteaddressline1";
|
||||
whichAppeal == "pinswg_electricityacts" ||
|
||||
whichAppeal == "pinswg_dnses"
|
||||
? "pinswg_addressline1"
|
||||
: "pinswg_siteaddressline1";
|
||||
|
||||
store.dispatch(
|
||||
req.headers.hasOwnProperty("referer")
|
||||
@@ -190,8 +190,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/404",
|
||||
permanent: false,
|
||||
},
|
||||
permanent: false
|
||||
}
|
||||
};
|
||||
} else {
|
||||
store.dispatch(
|
||||
@@ -201,7 +201,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
"currentType": "searchResultsObj",
|
||||
"incidentid": searchResultsObj.value[0].incidentid,
|
||||
"appealType":
|
||||
searchResultsObj.value[0].pinswg_appealcasetype,
|
||||
searchResultsObj.value[0].pinswg_appealcasetype
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -209,11 +209,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
props: {
|
||||
searchResultsObj: {
|
||||
searchResultsObj: searchResultsObj,
|
||||
searchDetailsObj: searchDetailsObj,
|
||||
searchDetailsObj: searchDetailsObj
|
||||
},
|
||||
currentType: "directResultsObj",
|
||||
docsOffline: process.env.DOCAPI_OFFLINE || false,
|
||||
},
|
||||
docsOffline: process.env.DOCAPI_OFFLINE || false
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -231,7 +231,7 @@ const mapStateToProps = (state) => {
|
||||
myCases: state.myCases,
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
awaitingSubmission: state.awaitingSubmission
|
||||
};
|
||||
};
|
||||
|
||||
@@ -239,7 +239,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentReference: (currentReference) => {
|
||||
dispatch(setCurrentReference(refno));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user