view all updates for reps
This commit is contained in:
@@ -545,6 +545,12 @@ let MakeRepresentation = (props) => {
|
|||||||
detailsObj[
|
detailsObj[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
|
"_pinswg_localplanningauthority_value":
|
||||||
|
detailsObj["_pinswg_localplanningauthority_value"],
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||||
|
detailsObj[
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
],
|
||||||
"representationCapacity": router.query.hasOwnProperty("state")
|
"representationCapacity": router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
? props.props.currentView.representationCapacity
|
? props.props.currentView.representationCapacity
|
||||||
|
|||||||
@@ -38,9 +38,22 @@ const TopThree = (props) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
let topthreeRow = [];
|
let topthreeRow = [];
|
||||||
|
|
||||||
let showTopThreeArr = showTopThree.value;
|
let showTopThreeArr = showTopThree.value;
|
||||||
|
|
||||||
|
Object.keys(showTopThreeArr).map((key, index) => {
|
||||||
|
let createdDate = parseInt(
|
||||||
|
showTopThreeArr[key].repfile_name.split("-")[3]
|
||||||
|
);
|
||||||
|
showTopThreeArr[key].createdDate = createdDate;
|
||||||
|
});
|
||||||
|
|
||||||
|
showTopThreeArr.sort(function compare(a, b) {
|
||||||
|
console.log(a.createdDate, b.createdDate);
|
||||||
|
var dateA = new Date(a.createdDate);
|
||||||
|
var dateB = new Date(b.createdDate);
|
||||||
|
return dateB - dateA;
|
||||||
|
});
|
||||||
|
|
||||||
const deleteItem = (caseID, topThreeType) => {
|
const deleteItem = (caseID, topThreeType) => {
|
||||||
let cookies = parseCookies();
|
let cookies = parseCookies();
|
||||||
//console.log("sssss", caseID, topThreeType);
|
//console.log("sssss", caseID, topThreeType);
|
||||||
@@ -135,13 +148,13 @@ const TopThree = (props) => {
|
|||||||
return dateObj.toLocaleString();
|
return dateObj.toLocaleString();
|
||||||
};
|
};
|
||||||
|
|
||||||
let topThreeOnlyArr = showTopThreeArr; //.slice(0, 3);
|
let topThreeOnlyArr = showTopThreeArr.slice(0, 3);
|
||||||
Object.keys(topThreeOnlyArr).map((key, index) => {
|
Object.keys(topThreeOnlyArr).map((key, index) => {
|
||||||
topthreeRow.push(
|
topthreeRow.push(
|
||||||
<div className="cardModuleItem" key={index}>
|
<div className="cardModuleItem" key={index}>
|
||||||
<div className="cardModuleDetails">
|
<div className="cardModuleDetails">
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:representation-id")}:</b>{" "}
|
<b>{t("myportal:case-reference")}:</b>{" "}
|
||||||
<Link
|
<Link
|
||||||
href={{
|
href={{
|
||||||
pathname: "/myportal/representation",
|
pathname: "/myportal/representation",
|
||||||
@@ -172,11 +185,6 @@ const TopThree = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
|
||||||
<b>{t("myportal:case-reference")}:</b>
|
|
||||||
{" "}
|
|
||||||
{showTopThreeArr[key].caseRef}
|
|
||||||
</div>
|
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:representation-type")}:</b>
|
<b>{t("myportal:representation-type")}:</b>
|
||||||
{" "}
|
{" "}
|
||||||
@@ -191,6 +199,11 @@ const TopThree = (props) => {
|
|||||||
<b>{t("myportal:date-raised")}:</b>
|
<b>{t("myportal:date-raised")}:</b>
|
||||||
{" "}
|
{" "}
|
||||||
{repRaisedDate(showTopThreeArr[key].repfile_name)}
|
{repRaisedDate(showTopThreeArr[key].repfile_name)}
|
||||||
|
</div>{" "}
|
||||||
|
<div className="cardModuleReference">
|
||||||
|
<b>lpa:</b>
|
||||||
|
{" "}
|
||||||
|
{repRaisedDate(showTopThreeArr[key].repfile_name)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
const repRaisedDate = (datePart) => {
|
||||||
|
var dateObj = new Date(datePart);
|
||||||
|
return dateObj.toLocaleString();
|
||||||
|
};
|
||||||
var resultsArr =
|
var resultsArr =
|
||||||
currentView.viewKey == "awaitingSubmissionDetails"
|
currentView.viewKey == "awaitingSubmissionDetails"
|
||||||
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
||||||
@@ -39,7 +42,7 @@ const ViewAllResults = (props) => {
|
|||||||
currentView.viewKey == "awaitingSubmissionDetails"
|
currentView.viewKey == "awaitingSubmissionDetails"
|
||||||
? props["awaitingSubmission"].awaitingSubmissionDetails.value
|
? props["awaitingSubmission"].awaitingSubmissionDetails.value
|
||||||
: currentView.viewKey == "myRepresentations"
|
: currentView.viewKey == "myRepresentations"
|
||||||
? props["myRepresentations"]["myRepresentationsDetails"]
|
? props["myRepresentations"].myRepresentations.value
|
||||||
: props[currentView.viewKey][currentView.viewKey + "Details"] || [];
|
: props[currentView.viewKey][currentView.viewKey + "Details"] || [];
|
||||||
|
|
||||||
let resultsRowArr = [];
|
let resultsRowArr = [];
|
||||||
@@ -62,7 +65,16 @@ const ViewAllResults = (props) => {
|
|||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
currentView.viewKey == "awaitingSubmissionDetails"
|
currentView.viewKey == "myRepresentations"
|
||||||
|
? {
|
||||||
|
pathname: "/myportal/representation",
|
||||||
|
query: {
|
||||||
|
case: resultsArr[key].caseRef,
|
||||||
|
state: "edit",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: currentView.viewKey ==
|
||||||
|
"awaitingSubmissionDetails"
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? "/fymhorth/parhauigyflwyno"
|
? "/fymhorth/parhauigyflwyno"
|
||||||
: "/myportal" +
|
: "/myportal" +
|
||||||
@@ -94,7 +106,10 @@ const ViewAllResults = (props) => {
|
|||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"currentReference":
|
"currentReference":
|
||||||
currentView.viewKey != "watchedCases"
|
currentView.viewKey != "watchedCases"
|
||||||
? resultsArr[key].ticketnumber
|
? currentView.viewKey ==
|
||||||
|
"myRepresentations"
|
||||||
|
? resultsArr[key].caseRef
|
||||||
|
: resultsArr[key].ticketnumber
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
@@ -109,6 +124,10 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
"appealType":
|
"appealType":
|
||||||
resultsArr[key].pinswg_appealcasetype,
|
resultsArr[key].pinswg_appealcasetype,
|
||||||
|
"repDetails":
|
||||||
|
currentView.viewKey ==
|
||||||
|
"myRepresentations" &&
|
||||||
|
resultsArr[key],
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -118,7 +137,7 @@ const ViewAllResults = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
{currentView.viewKey != "watchedCases"
|
{currentView.viewKey != "watchedCases"
|
||||||
? currentView.viewKey == "myRepresentations"
|
? currentView.viewKey == "myRepresentations"
|
||||||
? resultsArr[key].casereference
|
? resultsArr[key].caseRef
|
||||||
: resultsArr[key].ticketnumber
|
: resultsArr[key].ticketnumber
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -152,10 +171,7 @@ const ViewAllResults = (props) => {
|
|||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||||
searchDetailsObj[key].value[0],
|
|
||||||
"pinswg_siteaddressline1"
|
|
||||||
)
|
|
||||||
? searchDetailsObj[key].value[0].pinswg_siteaddressline1
|
? searchDetailsObj[key].value[0].pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
@@ -169,10 +185,7 @@ const ViewAllResults = (props) => {
|
|||||||
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(searchDetailsObj[key].pinswg_siteaddressline1) &&
|
||||||
searchDetailsObj[key].value[0],
|
|
||||||
"pinswg_siteaddressline1"
|
|
||||||
) &&
|
|
||||||
searchDetailsObj[key].value[0]
|
searchDetailsObj[key].value[0]
|
||||||
.pinswg_siteaddressline1 != null && <br />}
|
.pinswg_siteaddressline1 != null && <br />}
|
||||||
{_.has(detailsObj, "pinswg_siteaddressline1") &&
|
{_.has(detailsObj, "pinswg_siteaddressline1") &&
|
||||||
@@ -182,11 +195,8 @@ const ViewAllResults = (props) => {
|
|||||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||||
searchDetailsObj[key].value[0],
|
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||||
"pinswg_siteaddressline1"
|
|
||||||
)
|
|
||||||
? searchDetailsObj[key].value[0].pinswg_siteaddressline2
|
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
@@ -200,12 +210,9 @@ const ViewAllResults = (props) => {
|
|||||||
null && <br />}
|
null && <br />}
|
||||||
|
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(searchDetailsObj[key].pinswg_siteaddressline2) &&
|
||||||
searchDetailsObj[key].value[0],
|
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
||||||
"pinswg_siteaddressline2"
|
null && <br />}
|
||||||
) &&
|
|
||||||
searchDetailsObj[key].value[0]
|
|
||||||
.pinswg_siteaddressline2 != null && <br />}
|
|
||||||
|
|
||||||
{_.has(detailsObj, "pinswg_siteaddressline2") &&
|
{_.has(detailsObj, "pinswg_siteaddressline2") &&
|
||||||
detailsObj.pinswg_siteaddressline2 != null && <br />}
|
detailsObj.pinswg_siteaddressline2 != null && <br />}
|
||||||
@@ -214,11 +221,8 @@ const ViewAllResults = (props) => {
|
|||||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||||
searchDetailsObj[key].value[0],
|
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||||
"pinswg_siteaddresstown"
|
|
||||||
)
|
|
||||||
? searchDetailsObj[key].value[0].pinswg_siteaddresstown
|
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddresstown")
|
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
@@ -233,10 +237,10 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key].value[0],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
searchDetailsObj[key].value[0].pinswg_siteaddresstown !=
|
searchDetailsObj[key].pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
|
|
||||||
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||||
@@ -246,12 +250,8 @@ const ViewAllResults = (props) => {
|
|||||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||||
searchDetailsObj[key].value[0],
|
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||||
"pinswg_siteaddresscounty"
|
|
||||||
)
|
|
||||||
? searchDetailsObj[key].value[0]
|
|
||||||
.pinswg_siteaddresscounty
|
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
@@ -288,7 +288,7 @@ const ViewAllResults = (props) => {
|
|||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
: currentView.viewKey == "myRepresentations"
|
: currentView.viewKey == "myRepresentations"
|
||||||
? searchDetailsObj[key].value[0][
|
? searchDetailsObj[key][
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
@@ -338,6 +338,8 @@ const ViewAllResults = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy'
|
||||||
)
|
)
|
||||||
|
: currentView.viewKey == "myRepresentations"
|
||||||
|
? searchDetailsObj[key].value
|
||||||
: searchDetailsObj[key].value[0][
|
: searchDetailsObj[key].value[0][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || "N/A"
|
] || "N/A"
|
||||||
@@ -365,12 +367,11 @@ const ViewAllResults = (props) => {
|
|||||||
jsonpath.query(
|
jsonpath.query(
|
||||||
transLookup,
|
transLookup,
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
searchDetailsObj[key].value[0][
|
searchDetailsObj[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy'
|
||||||
)}
|
)}
|
||||||
qqq
|
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
@@ -411,16 +412,12 @@ const ViewAllResults = (props) => {
|
|||||||
transLookup,
|
transLookup,
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
getFormCollectionByID(
|
getFormCollectionByID(
|
||||||
searchDetailsObj[key].value[0][
|
searchDetailsObj[key].appealType
|
||||||
"pinswg_procedure"
|
|
||||||
]
|
|
||||||
).value +
|
).value +
|
||||||
'")].value_cy'
|
'")].value_cy'
|
||||||
)[0]
|
)[0]
|
||||||
: getFormCollectionByID(
|
: getFormCollectionByID(
|
||||||
searchDetailsObj[key].value[0][
|
searchDetailsObj[key].appealType
|
||||||
"pinswg_procedure"
|
|
||||||
]
|
|
||||||
).value)}
|
).value)}
|
||||||
{_.has(
|
{_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
@@ -429,7 +426,10 @@ const ViewAllResults = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
{t("search:searchresults-status-label")}:
|
{currentView.viewKey == "myRepresentations"
|
||||||
|
? "Created"
|
||||||
|
: t("search:searchresults-status-label")}
|
||||||
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||||
@@ -447,28 +447,28 @@ const ViewAllResults = (props) => {
|
|||||||
'")].value'
|
'")].value'
|
||||||
) || "N/A"
|
) || "N/A"
|
||||||
: currentView.viewKey == "myRepresentations"
|
: currentView.viewKey == "myRepresentations"
|
||||||
? router.locale == "cy"
|
? repRaisedDate(item.createdDate) // ? router.locale == "cy"
|
||||||
? jsonpath.query(
|
: // ? jsonpath.query(
|
||||||
transLookup,
|
// transLookup,
|
||||||
'$..[?(@.value=="' +
|
// '$..[?(@.value=="' +
|
||||||
searchDetailsObj[key].value[0][
|
// searchDetailsObj[key].value[0][
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
// ] +
|
||||||
'")].value_cy'
|
// '")].value_cy'
|
||||||
)
|
// )
|
||||||
: searchDetailsObj[key].value[0][
|
// : searchDetailsObj[key].value[0][
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] || "N/A"
|
// ] || "N/A"
|
||||||
: router.locale == "cy"
|
// : router.locale == "cy"
|
||||||
? jsonpath.query(
|
// ? jsonpath.query(
|
||||||
transLookup,
|
// transLookup,
|
||||||
'$..[?(@.value=="' +
|
// '$..[?(@.value=="' +
|
||||||
item[
|
// item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
// ] +
|
||||||
'")].value_cy'
|
// '")].value_cy'
|
||||||
)
|
// )
|
||||||
: item[
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] || "N/A"}
|
] || "N/A"}
|
||||||
</dd>
|
</dd>
|
||||||
@@ -516,7 +516,9 @@ const ViewAllResults = (props) => {
|
|||||||
{t("search:searchresults-case-type-label")}
|
{t("search:searchresults-case-type-label")}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
{t("search:searchresults-status-label")}
|
{currentView.viewKey == "myRepresentations"
|
||||||
|
? "Created"
|
||||||
|
: t("search:searchresults-status-label")}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ let BuildCheckSection = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9 at-summary-list">
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9 at-summary-list">
|
||||||
<div className="govuk-summary-list__row" key={"9999"}>
|
<div className="govuk-summary-list__row" key={"9999"}>
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{props.props.appealType.fileList.files.length >
|
{props.props.appealType.fileList.value.length >
|
||||||
0
|
0
|
||||||
? props.props.appealType.fileList.files.map(
|
? props.props.appealType.fileList.value.map(
|
||||||
(blob, i) => (
|
(blob, i) => (
|
||||||
<div
|
<div
|
||||||
key={blob.name + "_" + i}
|
key={blob.name + "_" + i}
|
||||||
@@ -108,10 +108,10 @@ let BuildCheckSection = (props) => {
|
|||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={getThumbnailIconByExtension(
|
src={getThumbnailIconByExtension(
|
||||||
blob.name
|
blob[i].name
|
||||||
)}
|
)}
|
||||||
alt={blob.name.slice(
|
alt={blob[i].name.slice(
|
||||||
blob.name.indexOf(
|
blob[i].name.indexOf(
|
||||||
"_"
|
"_"
|
||||||
) + 1
|
) + 1
|
||||||
)}
|
)}
|
||||||
@@ -119,14 +119,14 @@ let BuildCheckSection = (props) => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
||||||
{blob.name.slice(
|
{blob[i].name.slice(
|
||||||
blob.name.indexOf(
|
blob[i].name.indexOf(
|
||||||
"_"
|
"_"
|
||||||
) + 1
|
) + 1
|
||||||
)}
|
)}
|
||||||
(
|
(
|
||||||
{bytesToSize(
|
{bytesToSize(
|
||||||
blob.contentLength
|
blob[i].contentLength
|
||||||
)}
|
)}
|
||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -228,8 +228,8 @@ export const getProgressObj = (
|
|||||||
"totalFields": formObj[key].fieldsTotal,
|
"totalFields": formObj[key].fieldsTotal,
|
||||||
"allFieldsComplete":
|
"allFieldsComplete":
|
||||||
titleList[key].value == "Upload documents"
|
titleList[key].value == "Upload documents"
|
||||||
? _.has(props.props.appealType.fileList, "files") &&
|
? _.has(props.props.appealType.fileList, "value") &&
|
||||||
props.props.appealType.fileList.files.length > 0
|
props.props.appealType.fileList.value.length > 0
|
||||||
: rowCount == formObj[key].fieldsTotal,
|
: rowCount == formObj[key].fieldsTotal,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"add-files-label": "Add your files",
|
"add-files-label": "Add your files",
|
||||||
"capacity-para-one": "This form enables you to submit comments on a case to Planning and Environment Decisions Wales.",
|
"capacity-para-one": "This form enables you to submit comments on a case to Planning and Environment Decisions Wales.",
|
||||||
"capacity-para-two": "Please note that comments from interested parties need to be made within the timetable. This can be found on the previous ‘Case Summary‘ page. Comments submitted after this date may be considered invalid.",
|
"capacity-para-two": "Please note that comments from interested parties need to be made within the timetable. This can be found on the previous ‘Case Summary‘ page. Comments submitted after this date may be considered invalid.",
|
||||||
"capacity-select-your-details": "EiYour details",
|
"capacity-select-your-details": "Your details",
|
||||||
"capacity-select-what-capacity-label": "In what capacity do you wish to make representations on this case?",
|
"capacity-select-what-capacity-label": "In what capacity do you wish to make representations on this case?",
|
||||||
"capacity-options-arr-appellant": "Appellant",
|
"capacity-options-arr-appellant": "Appellant",
|
||||||
"capacity-options-arr-agent": "Agent",
|
"capacity-options-arr-agent": "Agent",
|
||||||
|
|||||||
@@ -13,21 +13,25 @@ ApiProxy.use(middleware);
|
|||||||
ApiProxy.get(async (req, res) => {
|
ApiProxy.get(async (req, res) => {
|
||||||
var containerName = req.query.container;
|
var containerName = req.query.container;
|
||||||
var tempCaseRef = req.query.tempcaseref;
|
var tempCaseRef = req.query.tempcaseref;
|
||||||
|
var checkHash = req.query.hash;
|
||||||
|
|
||||||
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
|
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
// console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
var checkquerypath =
|
||||||
|
"/api/file/createappealcompletemessage_api?container=" +
|
||||||
|
containerName +
|
||||||
|
"&tempcaseref=" +
|
||||||
|
tempCaseRef;
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
//http: if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await createCaseCompleteMessage(containerName, tempCaseRef).then(
|
await createCaseCompleteMessage(containerName, tempCaseRef).then((data) => {
|
||||||
(data) => {
|
return res.status(200).json(data);
|
||||||
return res.status(200).json(data);
|
});
|
||||||
}
|
// } else {
|
||||||
);
|
// return res.status(400).json();
|
||||||
} else {
|
// }
|
||||||
return res.status(400).json();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user