tweak for welsh link to fix build

This commit is contained in:
2025-07-02 17:30:58 +01:00
parent 9935f65e73
commit 0a25358860
5 changed files with 53 additions and 24 deletions
+24 -21
View File
@@ -115,17 +115,19 @@ export const getSearchDetails = async (searchResultsObj) => {
} }
); );
} else { } else {
detailsArr.push( formMeta?.LogicalCollectionName &&
getBasicSearchDetails( formMeta?.LogicalCollectionName != "pinswg_sipses" &&
formMeta.LogicalCollectionName, detailsArr.push(
searchDetail.title, getBasicSearchDetails(
formMeta.PrimaryIdAttribute, formMeta.LogicalCollectionName,
searchDetail.incidentid searchDetail.title,
) || { formMeta.PrimaryIdAttribute,
"@odata.count": 1, searchDetail.incidentid
"value": [{ "title": searchDetail.title }], ) || {
} "@odata.count": 1,
); "value": [{ "title": searchDetail.title }],
}
);
} }
}); });
// Promise.all(detailsArr).then((data) => { // Promise.all(detailsArr).then((data) => {
@@ -150,7 +152,7 @@ export const getPartSavedDetails = (searchResultsObj) => {
let formMeta = getFormCollectionByID( let formMeta = getFormCollectionByID(
searchDetail.pinswg_appealcasetype searchDetail.pinswg_appealcasetype
); );
console.log(formMeta); // console.log(formMeta);
detailsArr.push( detailsArr.push(
getBasicPartSavedDetails( getBasicPartSavedDetails(
formMeta.LogicalCollectionName, formMeta.LogicalCollectionName,
@@ -178,15 +180,16 @@ export const getSearchDetailsPaged = (searchResultsObj) => {
let formMeta = getFormCollectionByID( let formMeta = getFormCollectionByID(
searchDetail.pinswg_appealcasetype searchDetail.pinswg_appealcasetype
); );
formMeta?.LogicalCollectionName &&
detailsArr.push( formMeta?.LogicalCollectionName != "pinswg_sipses" &&
getBasicSearchDetailsPaged( detailsArr.push(
formMeta.LogicalCollectionName, getBasicSearchDetailsPaged(
searchDetail.title, formMeta.LogicalCollectionName,
formMeta.PrimaryIdAttribute, searchDetail.title,
searchDetail.incidentid formMeta.PrimaryIdAttribute,
) searchDetail.incidentid
); )
);
} }
}); });
return Promise.all(detailsArr); return Promise.all(detailsArr);
+10
View File
@@ -370,6 +370,16 @@
"appealTypeID": "846040012", "appealTypeID": "846040012",
"NavigationProperty": "pinswg_ElectricityActIds", "NavigationProperty": "pinswg_ElectricityActIds",
"value": "Electricity Act" "value": "Electricity Act"
},
{
"LogicalCollectionName": "pinswg_sipses",
"LogicalName": "pinswg_sips",
"PrimaryIdAttribute": "pinswg_sipscase",
"UrlName": "sips",
"MetadataId": "8d31911b-b8ea-ef11-ab08-00224800be9c",
"appealTypeID": "846040002",
"NavigationProperty": "pinswg_SIPSIds",
"value": "SIP"
} }
] ]
} }
+9 -1
View File
@@ -35,7 +35,15 @@ export default async function ApiProxy(req, res) {
var token = await getToken(); var token = await getToken();
var queryUrl = var queryUrl =
"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc"; "stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' " +
(process.env.SHOWSIPS !== "true"
? "and pinswg_appealcasetype ne 846040002"
: "") +
"&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
// for sips
// "stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
// "stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc"; // "stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
//"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Developments of National Significance' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc"; //"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Developments of National Significance' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
+5 -1
View File
@@ -49,7 +49,11 @@ export default async function ApiProxy(req, res) {
searchString + searchString +
"') or contains(ticketnumber, '" + "') or contains(ticketnumber, '" +
searchString + searchString +
"')) and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; "')) and pinswg_appealcasetype ne null " +
(process.env.SHOWSIPS !== "true"
? "and pinswg_appealcasetype ne 846040002"
: "") +
"and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
console.log( console.log(
"\n==========================================\n", "\n==========================================\n",
@@ -83,7 +83,11 @@ export default async function ApiProxy(req, res) {
searchString + searchString +
"') or contains(ticketnumber, '" + "') or contains(ticketnumber, '" +
searchString + searchString +
"')) and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" + "')) and pinswg_appealcasetype ne null " +
(process.env.SHOWSIPS !== "true"
? "and pinswg_appealcasetype ne 846040002"
: "") +
"and pinswg_publishtoweb eq true&$orderby=" +
orderby + orderby +
" " + " " +
fieldSort + fieldSort +