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