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