21187 implement helper function on summary
This commit is contained in:
+19
-19
@@ -100,7 +100,7 @@ export const getSearchDetails = async (searchResultsObj) => {
|
||||
searchResultsObj = searchResultsObj.value;
|
||||
const detailsObj = searchResultsObj.map((searchDetail, index) => {
|
||||
let formMeta = getFormCollectionByID(
|
||||
searchDetail.pinswg_appealcasetype
|
||||
searchDetail.pinswg_appealcasetype,
|
||||
);
|
||||
// console.log(
|
||||
// "------------------- Details: ",
|
||||
@@ -117,11 +117,11 @@ export const getSearchDetails = async (searchResultsObj) => {
|
||||
"pinswg_dnses",
|
||||
searchDetail.title,
|
||||
"pinswg_dnsid",
|
||||
searchDetail.incidentid
|
||||
searchDetail.incidentid,
|
||||
) || {
|
||||
"@odata.count": 1,
|
||||
"value": [{ "title": searchDetail.title }],
|
||||
}
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// formMeta?.LogicalCollectionName &&
|
||||
@@ -131,11 +131,11 @@ export const getSearchDetails = async (searchResultsObj) => {
|
||||
formMeta.LogicalCollectionName,
|
||||
searchDetail.title,
|
||||
formMeta.PrimaryIdAttribute,
|
||||
searchDetail.incidentid
|
||||
searchDetail.incidentid,
|
||||
) || {
|
||||
"@odata.count": 1,
|
||||
"value": [{ "title": searchDetail.title }],
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -159,7 +159,7 @@ export const getPartSavedDetails = (searchResultsObj) => {
|
||||
console.log(searchDetail.title);
|
||||
} else {
|
||||
let formMeta = getFormCollectionByID(
|
||||
searchDetail.pinswg_appealcasetype
|
||||
searchDetail.pinswg_appealcasetype,
|
||||
);
|
||||
// console.log(formMeta);
|
||||
detailsArr.push(
|
||||
@@ -167,8 +167,8 @@ export const getPartSavedDetails = (searchResultsObj) => {
|
||||
formMeta.LogicalCollectionName,
|
||||
searchDetail.title,
|
||||
formMeta.PrimaryIdAttribute,
|
||||
searchDetail.incidentid
|
||||
)
|
||||
searchDetail.incidentid,
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -307,7 +307,7 @@ export const getSearchDetailsPaged = async (searchResultsObj) => {
|
||||
formMeta.LogicalCollectionName, // appealTypeName
|
||||
null, // caseReference is no longer used in batch
|
||||
formMeta.PrimaryIdAttribute, // primaryIdAttribute
|
||||
incidentIDs // pass array of incidentIDs
|
||||
incidentIDs, // pass array of incidentIDs
|
||||
);
|
||||
|
||||
allDetails.push(...details);
|
||||
@@ -323,7 +323,7 @@ export const getProgressObj = (
|
||||
formObjXML,
|
||||
titleList,
|
||||
mandatoryFieldsData,
|
||||
props
|
||||
props,
|
||||
) => {
|
||||
const parser = new DOMParser();
|
||||
const BuildFormObj = (formObjXML) => {
|
||||
@@ -336,7 +336,7 @@ export const getProgressObj = (
|
||||
"//tabs/tab[" +
|
||||
(index + 1) +
|
||||
"]//rows/row/control[not(@parentField)]/..",
|
||||
doc
|
||||
doc,
|
||||
);
|
||||
|
||||
return BuildRowObj(sectionXML, titleList[key].value);
|
||||
@@ -376,7 +376,7 @@ export const getProgressObj = (
|
||||
0) ||
|
||||
(_.has(props.props.form.appealForm, "values") &&
|
||||
Object.keys(
|
||||
props.props.form.appealForm.values
|
||||
props.props.form.appealForm.values,
|
||||
).filter((k) => k.startsWith("pinswg_fileUpload"))
|
||||
.length > 0)
|
||||
: rowCount == formObj[key].fieldsTotal,
|
||||
@@ -401,17 +401,17 @@ export const getProgressObj = (
|
||||
|
||||
var parentFieldShowOnValue = xpath.select(
|
||||
"//@parentFieldShowOnValue",
|
||||
doc
|
||||
doc,
|
||||
);
|
||||
|
||||
var requiredDocumentValue = xpath.select(
|
||||
"//@requiredDocumentValue",
|
||||
doc
|
||||
doc,
|
||||
);
|
||||
|
||||
var requiredDocumentLabel = xpath.select(
|
||||
"//@requiredDocumentLabel",
|
||||
doc
|
||||
doc,
|
||||
);
|
||||
|
||||
var hint = xpath.select("//label/@hint", doc);
|
||||
@@ -616,7 +616,7 @@ export const getDetailsProxy = (resultsObj, detailsType) => {
|
||||
? searchDetail.ticketnumber
|
||||
: searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
],
|
||||
);
|
||||
} else {
|
||||
detailsArr.push(
|
||||
@@ -627,8 +627,8 @@ export const getDetailsProxy = (resultsObj, detailsType) => {
|
||||
? searchDetail.ticketnumber
|
||||
: searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -700,7 +700,7 @@ export const updateLinks = (jsonObj) => {
|
||||
// Before the URL
|
||||
if (match.index > lastIndex) {
|
||||
newNodeContent.push(
|
||||
currentText.slice(lastIndex, match.index)
|
||||
currentText.slice(lastIndex, match.index),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user