updated welsh translations
This commit is contained in:
@@ -217,7 +217,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
const { cookies } = req;
|
||||
|
||||
//console.log(cookies);
|
||||
//console.log("the query", query.appealtypes);
|
||||
console.log("the query", query);
|
||||
let loggedInUser = cookies.pinsUser;
|
||||
|
||||
let thisSession = await getSession(ctx);
|
||||
@@ -228,6 +228,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
//console.log("logged ident:", loggedInUserIdent);
|
||||
|
||||
console.log("which appeal: ", query.appealtypes);
|
||||
|
||||
const [appealTypeData, mandatoryFieldsData, pickListData, blobList] =
|
||||
await Promise.all([
|
||||
await getAppealsTypesForNewAppeal(),
|
||||
|
||||
+62
-12
@@ -263,13 +263,33 @@ const getDetails = (resultsObj, detailsType) => {
|
||||
resultsObj = resultsObj.value;
|
||||
if (detailsType == "myRepresentations") {
|
||||
const repsObj = resultsObj.map((searchDetail, index) => {
|
||||
console.log("==== ", searchDetail["_pinswg_case_value"]);
|
||||
detailsArr.push(
|
||||
getCase(searchDetail["incidentID"]).then((data) => {
|
||||
let caseID = "";
|
||||
|
||||
switch (detailsType) {
|
||||
case "myCases":
|
||||
caseID = data.pinswg_title;
|
||||
break;
|
||||
case "myWatchedCases":
|
||||
caseID =
|
||||
data[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
];
|
||||
break;
|
||||
case "awaitingSubmission":
|
||||
caseID = data.ticketnumber;
|
||||
break;
|
||||
case "myRepresentations":
|
||||
caseID = data.casereference;
|
||||
break;
|
||||
default:
|
||||
caseID = data.pinswg_title;
|
||||
}
|
||||
return getPortalModuleDetails(
|
||||
getFormCollectionByID(data.pinswg_appealcasetype)
|
||||
.LogicalCollectionName,
|
||||
data.ticketnumber
|
||||
caseID
|
||||
);
|
||||
})
|
||||
);
|
||||
@@ -277,24 +297,54 @@ const getDetails = (resultsObj, detailsType) => {
|
||||
}
|
||||
|
||||
const detailsObj = resultsObj.map((searchDetail, index) => {
|
||||
let caseID = "";
|
||||
|
||||
switch (detailsType) {
|
||||
case "myCases":
|
||||
caseID = searchDetail.pinswg_title;
|
||||
break;
|
||||
case "myWatchedCases":
|
||||
caseID =
|
||||
searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
];
|
||||
break;
|
||||
case "awaitingSubmission":
|
||||
caseID = searchDetail.ticketnumber;
|
||||
break;
|
||||
case "myRepresentations":
|
||||
caseID = searchDetail.casereference;
|
||||
break;
|
||||
default:
|
||||
caseID = searchDetail.pinswg_title;
|
||||
}
|
||||
|
||||
//console.log(detailsType, " case id : ", caseID);
|
||||
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
console.log(
|
||||
detailsType != "myWatchedCases"
|
||||
? searchDetail.ticketnumber
|
||||
: searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
"detailsObj:",
|
||||
detailsType,
|
||||
detailsType == "myCases" && searchDetail.pinswg_title,
|
||||
detailsType == "myWatchedCases" &&
|
||||
searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
detailsType == "awaitingSubmission" &&
|
||||
searchDetail.ticketnumber,
|
||||
detailsType == "myRepresentations" && searchDetail.casereference
|
||||
);
|
||||
} else {
|
||||
detailsArr.push(
|
||||
getPortalModuleDetails(
|
||||
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
||||
.LogicalCollectionName,
|
||||
detailsType != "myWatchedCases"
|
||||
? searchDetail.ticketnumber
|
||||
: searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
caseID
|
||||
// detailsType != "myWatchedCases"
|
||||
// ? searchDetail.ticketnumber
|
||||
// : searchDetail[
|
||||
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
// ]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user