updated query for my cases and long appealtypes

This commit is contained in:
robert.bond@test.gov.wales
2021-09-20 10:07:32 +01:00
parent c96a72f124
commit a9a8670691
8 changed files with 35 additions and 24 deletions
+1
View File
@@ -39,6 +39,7 @@ const Home = (props) => {
<Case
props={props}
myCases={props.myCases.myCases}
myCasesDetails={props.myCases.myCasesDetails}
searchResultsObj={
props.searchResultsObj.searchResultsObj
}
+4 -4
View File
@@ -102,7 +102,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
cookies.set("pinsUser", "f8b454ed-eded-eb11-aac7-00224800be9c", {
httpOnly: true, // true by default
});
//console.log("my cases ", myCases);
const [
myCasesDetails,
// myRepresentationsDetails,
@@ -143,8 +143,7 @@ const getFormCollection = (formtype) => {
};
const getDetails = (resultsObj) => {
// console.log(resultsObj);
//console.log(resultsObj);
let detailsArr = [];
resultsObj = resultsObj.value;
const detailsObj = resultsObj.map((searchDetail, index) => {
@@ -158,8 +157,9 @@ const getDetails = (resultsObj) => {
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/[\s\-\+\(\)\,\&\.]/g, "")
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
.slice(0, 39)
),
searchDetail.ticketnumber
)
+1 -1
View File
@@ -99,7 +99,7 @@ const getSearchDetails = (searchResultsObj) => {
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/[\s\-\+\(\)\,\&\.]/g, "")
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
),
searchDetail.ticketnumber