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 {
detailsArr.push(
getBasicSearchDetails(
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
) || {
"@odata.count": 1,
"value": [{ "title": searchDetail.title }],
}
);
formMeta?.LogicalCollectionName &&
formMeta?.LogicalCollectionName != "pinswg_sipses" &&
detailsArr.push(
getBasicSearchDetails(
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
) || {
"@odata.count": 1,
"value": [{ "title": searchDetail.title }],
}
);
}
});
// Promise.all(detailsArr).then((data) => {
@@ -150,7 +152,7 @@ export const getPartSavedDetails = (searchResultsObj) => {
let formMeta = getFormCollectionByID(
searchDetail.pinswg_appealcasetype
);
console.log(formMeta);
// console.log(formMeta);
detailsArr.push(
getBasicPartSavedDetails(
formMeta.LogicalCollectionName,
@@ -178,15 +180,16 @@ export const getSearchDetailsPaged = (searchResultsObj) => {
let formMeta = getFormCollectionByID(
searchDetail.pinswg_appealcasetype
);
detailsArr.push(
getBasicSearchDetailsPaged(
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
)
);
formMeta?.LogicalCollectionName &&
formMeta?.LogicalCollectionName != "pinswg_sipses" &&
detailsArr.push(
getBasicSearchDetailsPaged(
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
)
);
}
});
return Promise.all(detailsArr);
+10
View File
@@ -370,6 +370,16 @@
"appealTypeID": "846040012",
"NavigationProperty": "pinswg_ElectricityActIds",
"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 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 '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 +
"') or contains(ticketnumber, '" +
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(
"\n==========================================\n",
@@ -83,7 +83,11 @@ export default async function ApiProxy(req, res) {
searchString +
"') or contains(ticketnumber, '" +
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 +
" " +
fieldSort +