misc helper updates
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { createModuleResolutionCache } from "typescript";
|
||||
|
||||
let BASE_URL;
|
||||
const port = parseInt(process.env.PORT, 10) || 3000;
|
||||
|
||||
@@ -1419,7 +1419,6 @@ export const FieldsTranslations = (label) => {
|
||||
? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj)
|
||||
: label;
|
||||
|
||||
console.log(label, labelTrans);
|
||||
return labelTrans;
|
||||
};
|
||||
|
||||
|
||||
@@ -29,6 +29,14 @@ export const getFormCollectionByID = (appealTypeID) => {
|
||||
return collectionName[0];
|
||||
};
|
||||
|
||||
export const getFormIDByLogicalName = (appealTypeLogicalName) => {
|
||||
const collectionName = jsonpath(
|
||||
"$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]",
|
||||
data
|
||||
);
|
||||
return collectionName[0];
|
||||
};
|
||||
|
||||
export const getPickListLabel = (data, picklistType, picklistID) => {
|
||||
const pickListData = jsonpath(
|
||||
"$..[?(@.LogicalName=='" + picklistType + "')]",
|
||||
@@ -63,6 +71,7 @@ export const getSearchDetails = (searchResultsObj) => {
|
||||
//console.log(searchResultsObj);
|
||||
|
||||
let detailsArr = [];
|
||||
|
||||
searchResultsObj = searchResultsObj.value;
|
||||
const detailsObj = searchResultsObj.map((searchDetail, index) => {
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
|
||||
@@ -103,6 +103,7 @@ const Home = (props) => {
|
||||
searchString={props.search.searchString}
|
||||
searchResultsObj={props.searchResultsObj}
|
||||
advancedSearch={true}
|
||||
showLoginCheck={props.showLoginCheck}
|
||||
/>
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} ticketnumber={props} />
|
||||
@@ -126,6 +127,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch(Object.entries(query)));
|
||||
return {
|
||||
props: {
|
||||
showLoginCheck: showLoginCheck,
|
||||
},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
const { cookies } = req;
|
||||
|
||||
let loggedInUser = cookies.pinsUser;
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
|
||||
let thisSession = await getSession(ctx);
|
||||
|
||||
@@ -109,6 +110,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
thisSession != false &&
|
||||
store.dispatch(setContainerID(thisSession.user.id));
|
||||
}
|
||||
return {
|
||||
props: {
|
||||
showLoginCheck: showLoginCheck,
|
||||
},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user