update dns subsection autosuggest list
This commit is contained in:
@@ -66,7 +66,15 @@ export const getSearchDetails = (searchResultsObj) => {
|
||||
searchResultsObj = searchResultsObj.value;
|
||||
const detailsObj = searchResultsObj.map((searchDetail, index) => {
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
console.log(searchDetail.title);
|
||||
//console.log(searchDetail.title);
|
||||
detailsArr.push(
|
||||
getBasicSearchDetails(
|
||||
"pinswg_dnses",
|
||||
searchDetail.title,
|
||||
"pinswg_dnsid",
|
||||
searchDetail.incidentid
|
||||
)
|
||||
);
|
||||
} else {
|
||||
let formMeta = getFormCollectionByID(
|
||||
searchDetail.pinswg_appealcasetype
|
||||
|
||||
@@ -119,9 +119,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const searchResultsObj = await getAdvancedSearch(query);
|
||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
const showReps = process.env.SHOWREPRESENTATIONS || false;
|
||||
store.dispatch(setShowReps(showReps));
|
||||
store.dispatch(setShowReps(showReps, showLoginCheck));
|
||||
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
|
||||
@@ -84,6 +84,13 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch("DNS"));
|
||||
}
|
||||
} else {
|
||||
const searchDetailsObj = await getSearchDetails(
|
||||
searchResultsObj
|
||||
);
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch("DNS"));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -122,14 +122,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
console.log("query-", query);
|
||||
|
||||
let isLinked =
|
||||
typeof query.lk != "undefined" && query.lk == "1"
|
||||
? true
|
||||
: false;
|
||||
typeof query.lk != "undefined" && query.lk == "1" ? true : false;
|
||||
|
||||
//console.log("is linked:", isLinked);
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
const showReps = process.env.SHOWREPRESENTATIONS || false;
|
||||
store.dispatch(setShowReps(showReps));
|
||||
store.dispatch(setShowReps(showReps, showLoginCheck));
|
||||
|
||||
let searchResultsObj = await getBasicSearch(query.q);
|
||||
|
||||
@@ -151,9 +149,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
},
|
||||
};
|
||||
} else {
|
||||
const searchDetailsObj = await getSearchDetails(
|
||||
searchResultsObj
|
||||
);
|
||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ const makeStore = ({ isServer }) => {
|
||||
key: "acp",
|
||||
whitelist: [
|
||||
"currentView",
|
||||
"searchResultsObj",
|
||||
//"searchResultsObj",
|
||||
"appealType",
|
||||
"LPAData",
|
||||
"accountDetails",
|
||||
|
||||
Reference in New Issue
Block a user