diff --git a/actions/selectQueryTypes.js b/actions/selectQueryTypes.js
index e64a4086..539d702c 100644
--- a/actions/selectQueryTypes.js
+++ b/actions/selectQueryTypes.js
@@ -19,7 +19,7 @@ export const getSelectQuery = (appealTypeName) => {
case "pinswg_compulsorypurchaseorderses":
return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode";
case "pinswg_dnses":
- return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectdescription,pinswg_projectlocation,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode";
+ return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectdescription,pinswg_projectlocation,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage";
case "pinswg_electricityacts":
return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode";
case "pinswg_householderappealhases":
diff --git a/components/case/documents.js b/components/case/documents.js
index e9c698ec..9e096b5a 100644
--- a/components/case/documents.js
+++ b/components/case/documents.js
@@ -75,113 +75,130 @@ const DocumentDetails = (props) => {
{t("case:documents-size-label")}
*/}
+ {showSpinnerState == true ? (
+
+
+ {t("common:spinner-fetching-data")}
+

+
+
+ ) : (
+ documentDetailsArr.map((item) => {
+ let detailsObj = jsonpath.query(
+ item,
+ "$..[?(@._pinswg_documentids_value=='" +
+ incidentid +
+ "')]"
+ );
+ detailsObj = item;
- {documentDetailsArr.map((item) => {
- let detailsObj = jsonpath.query(
- item,
- "$..[?(@._pinswg_documentids_value=='" +
- incidentid +
- "')]"
- );
- detailsObj = item;
+ if (typeof detailsObj != "undefined") {
+ var documentHistoryArr =
+ documentHistoryObj || [];
+ return documentHistoryArr.map(
+ (historyItem, key) => {
+ let historyObj = jsonpath.query(
+ documentHistoryObj[key],
+ "$..value[?(@._pinswg_documentid_value=='" +
+ detailsObj.pinswg_documentid +
+ "')]"
+ );
- if (typeof detailsObj != "undefined") {
- var documentHistoryArr = documentHistoryObj || [];
- return documentHistoryArr.map(
- (historyItem, key) => {
- let historyObj = jsonpath.query(
- documentHistoryObj[key],
- "$..value[?(@._pinswg_documentid_value=='" +
- detailsObj.pinswg_documentid +
- "')]"
- );
-
- historyObj = historyObj[0];
- return !_.isEmpty(historyObj) ? (
-
+ ) : (
+ ""
+ );
+ }
+ );
+ }
+ })
+ )}
>
@@ -201,7 +218,6 @@ const DocumentDetails = (props) => {
(result) => {
setDocumentHistory(result);
setDocumentSearchState(true);
-
return result;
}
);
@@ -236,16 +252,13 @@ const DocumentDetails = (props) => {
const getDocumentResults = (pageNumber) => {
getSearchDocumentDetailsPaged(incidentid, pageNumber)
- .then((data) => {
- //console.log(data);
- setDocumentDetails(data);
- return data;
- })
+ .then((data) => data)
.then((data) => {
//console.log("getting details", data);
+ setDocumentDetails(data);
return getDocumentHistory(data.value).then((data) => {
setDocumentHistory(data);
- //setShowSpinnerState(false);
+ setShowSpinnerState(false);
});
});
};
@@ -323,13 +336,13 @@ const DocumentDetails = (props) => {
)
: pagesCount;
- //const [showSpinnerState, setShowSpinnerState] = useState(false);
+ const [showSpinnerState, setShowSpinnerState] = useState(false);
- // let spinnerState = () => {
- // showSpinnerState == true
- // ? setShowSpinnerState(false)
- // : setShowSpinnerState(true);
- // };
+ let spinnerState = () => {
+ showSpinnerState == true
+ ? setShowSpinnerState(false)
+ : setShowSpinnerState(true);
+ };
const [showDocumentSearchState, setDocumentSearchState] = useState(false);
diff --git a/components/case/pagination.js b/components/case/pagination.js
index 41768f9b..50b88581 100644
--- a/components/case/pagination.js
+++ b/components/case/pagination.js
@@ -81,8 +81,8 @@ const PaginationControl = (props) => {
{
- // spinnerState(),
- getDocumentResults(currentPage - 1);
+ spinnerState(),
+ getDocumentResults(currentPage - 1);
}}
>
{t("common:previous-link-button")}
@@ -114,7 +114,7 @@ const PaginationControl = (props) => {
className="govuk-body govuk-link govuk-!-padding-2 govuk-!-font-weight-bold govuk-link--no-underline activePaginationItem"
key={i}
onClick={() => {
- // spinnerState();
+ spinnerState();
console.log(i + 1);
getDocumentResults(i + 1);
}}
@@ -129,8 +129,8 @@ const PaginationControl = (props) => {
{
- // spinnerState(),
- getDocumentResults(currentPage + 1);
+ spinnerState(),
+ getDocumentResults(currentPage + 1);
}}
>
{t("common:next-link-button")}
diff --git a/components/case/summary.js b/components/case/summary.js
index 2722ef2f..e49cd42c 100644
--- a/components/case/summary.js
+++ b/components/case/summary.js
@@ -227,6 +227,30 @@ const CaseSummary = (props) => {
)}
+ {detailsObj.pinswg_casestage != null && (
+
+
+ {t("case:summary-case-stage-label")}
+
+
+ {router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ detailsObj[
+ "pinswg_casestage@OData.Community.Display.V1.FormattedValue"
+ ] +
+ '")].value_cy'
+ )
+ : detailsObj[
+ "pinswg_casestage@OData.Community.Display.V1.FormattedValue"
+ ] ||
+ t(
+ "case:summary-no-date-entered-label"
+ )}
+
+
+ )}
diff --git a/components/search/dnssearchresults.js b/components/search/dnssearchresults.js
index 777a59f7..11167c23 100644
--- a/components/search/dnssearchresults.js
+++ b/components/search/dnssearchresults.js
@@ -38,13 +38,13 @@ const DNSSearchResults = (props) => {
var resultsArr = searchResultsObj.value || [];
- //const [showSpinnerState, setShowSpinnerState] = useState(false);
+ const [showSpinnerState, setShowSpinnerState] = useState(false);
- // let spinnerState = () => {
- // showSpinnerState == true
- // ? setShowSpinnerState(false)
- // : setShowSpinnerState(true);
- // };
+ let spinnerState = () => {
+ showSpinnerState == true
+ ? setShowSpinnerState(false)
+ : setShowSpinnerState(true);
+ };
const ResultsView = (resultsArr) => {
return (
@@ -70,163 +70,180 @@ const DNSSearchResults = (props) => {
- {resultsArr.map((item, key) => {
- let detailsObj = jsonpath.query(
- searchDetailsObj,
- "$..value[?(@.pinswg_name=='" +
- item.title +
- "')]"
- );
- detailsObj = detailsObj[0];
+ {showSpinnerState == true ? (
+
+
+ {t("common:spinner-fetching-data")}
+

+
+
+ ) : (
+ resultsArr.map((item, key) => {
+ let detailsObj = jsonpath.query(
+ searchDetailsObj,
+ "$..value[?(@.pinswg_name=='" +
+ item.title +
+ "')]"
+ );
+ detailsObj = detailsObj[0];
- return (
-
-
-
- {
- setCurrentReference({
- "currentReference":
- item.title,
- "currentType":
- "searchResultsObj",
- "incidentid":
- item.incidentid,
- "appealType":
- item.pinswg_appealcasetype,
- });
- }}
+ return (
+
+
+
-
- {t(
- "search:searchresults-case-reference-label"
- )}
- :
-
- {item.title}
-
-
-
-
-
- {t(
- "search:searchresults-site-address-label"
- )}
- :
-
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddressline1
- : ""}
-
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddressline2
- : ""}
-
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddresstown
- : ""}
-
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddresscounty
- : ""}
-
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddresspostcode
- : ""}
-
-
-
- {t(
- "search:searchresults-applicant-label"
- )}
- :
-
- {_.has(detailsObj, [
- "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
- ])
- ? detailsObj[
- "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
- ]
- : ""}
-
-
-
- {t(
- "search:searchresults-authority-label"
- )}
- :
-
- {_.has(detailsObj, [
- "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
- ])
- ? router.locale == "cy"
+ {
+ setCurrentReference({
+ "currentReference":
+ item.title,
+ "currentType":
+ "searchResultsObj",
+ "incidentid":
+ item.incidentid,
+ "appealType":
+ item.pinswg_appealcasetype,
+ });
+ }}
+ >
+
+ {t(
+ "search:searchresults-case-reference-label"
+ )}
+ :
+
+ {item.title}
+
+
+
+
+
+ {t(
+ "search:searchresults-site-address-label"
+ )}
+ :
+
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddressline1
+ : ""}
+
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddressline2
+ : ""}
+
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddresstown
+ : ""}
+
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddresscounty
+ : ""}
+
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddresspostcode
+ : ""}
+
+
+
+ {t(
+ "search:searchresults-applicant-label"
+ )}
+ :
+
+ {_.has(detailsObj, [
+ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
+ ])
+ ? detailsObj[
+ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
+ ]
+ : ""}
+
+
+
+ {t(
+ "search:searchresults-authority-label"
+ )}
+ :
+
+ {_.has(detailsObj, [
+ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
+ ])
+ ? router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ detailsObj[
+ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
+ ] +
+ '")].value_cy'
+ )
+ : detailsObj[
+ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
+ ] || "N/A"
+ : ""}
+
+
+
+ {t(
+ "search:searchresults-status-label"
+ )}
+ :
+
+
+ {router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
- detailsObj[
- "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
+ item[
+ "statuscode@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy'
)
- : detailsObj[
- "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
- ] || "N/A"
- : ""}
-
-
-
- {t(
- "search:searchresults-status-label"
- )}
- :
-
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- item[
- "statuscode@OData.Community.Display.V1.FormattedValue"
- ] +
- '")].value_cy'
- )
- : item[
- "statuscode@OData.Community.Display.V1.FormattedValue"
- ] || "N/A"}
-
-
- );
- })}
+ : item[
+ "statuscode@OData.Community.Display.V1.FormattedValue"
+ ] || "N/A"}
+
+
+ );
+ })
+ )}
@@ -260,14 +277,13 @@ const DNSSearchResults = (props) => {
getBasicDNSSearchPaged(pageNumber)
.then((data) => {
- setSearchResults(data);
return data;
})
.then((data) => {
- //console.log("getting details", data);
+ setSearchResults(data);
return getSearchDetailsPaged(data).then((data) => {
setSearchDetails(data);
- //setShowSpinnerState(false);
+ setShowSpinnerState(false);
});
});
};
diff --git a/components/search/pagination.js b/components/search/pagination.js
index 9a29050d..2ac43e98 100644
--- a/components/search/pagination.js
+++ b/components/search/pagination.js
@@ -7,7 +7,7 @@ const PaginationControl = (props) => {
searchString,
searchResultsObj,
currentPage,
- // spinnerState,
+ spinnerState,
getSearchPageResults,
} = props;
let { t } = useTranslation();
@@ -81,8 +81,8 @@ const PaginationControl = (props) => {
{
- // spinnerState(),
- getSearchPageResults(currentPage - 1);
+ spinnerState(),
+ getSearchPageResults(currentPage - 1);
}}
>
{t("common:previous-link-button")}
@@ -114,7 +114,7 @@ const PaginationControl = (props) => {
className="govuk-body govuk-link govuk-!-padding-2 govuk-!-font-weight-bold govuk-link--no-underline activePaginationItem"
key={i}
onClick={() => {
- // spinnerState();
+ spinnerState();
console.log(i + 1);
getSearchPageResults(i + 1);
}}
@@ -129,8 +129,8 @@ const PaginationControl = (props) => {
{
- // spinnerState(),
- getSearchPageResults(currentPage + 1);
+ spinnerState(),
+ getSearchPageResults(currentPage + 1);
}}
>
{t("common:next-link-button")}
diff --git a/components/search/searchresults.js b/components/search/searchresults.js
index 0436111d..5b8a635a 100644
--- a/components/search/searchresults.js
+++ b/components/search/searchresults.js
@@ -66,13 +66,13 @@ const SearchResults = (props) => {
var resultsArr = searchResultsObj.value || [];
- // const [showSpinnerState, setShowSpinnerState] = useState(false);
+ const [showSpinnerState, setShowSpinnerState] = useState(false);
- // let spinnerState = () => {
- // showSpinnerState == true
- // ? setShowSpinnerState(false)
- // : setShowSpinnerState(true);
- // };
+ let spinnerState = () => {
+ showSpinnerState == true
+ ? setShowSpinnerState(false)
+ : setShowSpinnerState(true);
+ };
const cookies = parseCookies();
@@ -178,249 +178,278 @@ const SearchResults = (props) => {
)}
-
- {resultsArr.map((item, key) => {
- let detailsObj = jsonpath.query(
- searchDetailsObj,
- "$..value[?(@.pinswg_name=='" + item.title + "')]"
- );
- detailsObj = detailsObj[0];
- return (
-
-
-
- {
- setCurrentReference({
- "currentReference":
- item.title,
- "currentType":
- "searchResultsObj",
- "incidentid":
- item.incidentid,
- "appealType":
- item.pinswg_appealcasetype,
- });
- }}
+ {showSpinnerState == true ? (
+
+
+ {t("common:spinner-fetching-data")}
+

+
+
+ ) : (
+ resultsArr.map((item, key) => {
+ let detailsObj = jsonpath.query(
+ searchDetailsObj,
+ "$..value[?(@.pinswg_name=='" +
+ item.title +
+ "')]"
+ );
+ detailsObj = detailsObj[0];
+ return (
+
+
+
-
- {t(
- "search:searchresults-case-reference-label"
- )}
- :
-
- {item.title}
-
-
-
-
-
- {t(
- "search:searchresults-site-address-label"
- )}
- :
-
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddressline1
- : ""}
+ {
+ setCurrentReference({
+ "currentReference":
+ item.title,
+ "currentType":
+ "searchResultsObj",
+ "incidentid":
+ item.incidentid,
+ "appealType":
+ item.pinswg_appealcasetype,
+ });
+ }}
+ >
+
+ {t(
+ "search:searchresults-case-reference-label"
+ )}
+ :
+
+ {item.title}
+
+
+
+
+
+ {t(
+ "search:searchresults-site-address-label"
+ )}
+ :
+
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddressline1
+ : ""}
- {/* {detailsObj.pinswg_siteaddressline1 !=
+ {/* {detailsObj.pinswg_siteaddressline1 !=
null &&
} */}
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- ) &&
- detailsObj.pinswg_siteaddressline1 !=
- null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ ) &&
+ detailsObj.pinswg_siteaddressline1 !=
+ null &&
}
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddressline2
- : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddressline2
+ : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddressline2"
- ) &&
- detailsObj.pinswg_siteaddressline2 !=
- null &&
}
- {_.has(detailsObj, "pinswg_siteaddresstown")
- ? detailsObj.pinswg_siteaddresstown
- : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddresstown"
- ) &&
- detailsObj.pinswg_siteaddresstown !=
- null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline2"
+ ) &&
+ detailsObj.pinswg_siteaddressline2 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresstown"
+ )
+ ? detailsObj.pinswg_siteaddresstown
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresstown"
+ ) &&
+ detailsObj.pinswg_siteaddresstown !=
+ null &&
}
- {_.has(
- detailsObj,
- "pinswg_siteaddresscounty"
- )
- ? detailsObj.pinswg_siteaddresscounty
- : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddresscounty"
- ) &&
- detailsObj.pinswg_siteaddresscounty !=
- null &&
}
- {_.has(
- detailsObj,
- "pinswg_siteaddresspostcode"
- )
- ? detailsObj.pinswg_siteaddresspostcode
- : ""}
-
-
-
- {t(
- "search:searchresults-applicant-label"
- )}
- :
-
- {_.has(detailsObj, [
- "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
- ])
- ? detailsObj[
- "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
- ]
- : ""}
-
-
-
- {t(
- "search:searchresults-authority-label"
- )}
- :
-
- {_.has(item, [
- "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
- ])
- ? router.locale == "cy"
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresscounty"
+ )
+ ? detailsObj.pinswg_siteaddresscounty
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresscounty"
+ ) &&
+ detailsObj.pinswg_siteaddresscounty !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresspostcode"
+ )
+ ? detailsObj.pinswg_siteaddresspostcode
+ : ""}
+
+
+
+ {t(
+ "search:searchresults-applicant-label"
+ )}
+ :
+
+ {_.has(detailsObj, [
+ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
+ ])
+ ? detailsObj[
+ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
+ ]
+ : ""}
+
+
+
+ {t(
+ "search:searchresults-authority-label"
+ )}
+ :
+
+ {_.has(item, [
+ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
+ ])
+ ? router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ item[
+ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
+ ] +
+ '")].value_cy'
+ )
+ : item[
+ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
+ ] || "N/A"
+ : ""}
+
+
+
+ {t(
+ "search:searchresults-case-type-label"
+ )}
+ :
+
+ {router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
item[
- "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
+ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy'
)
: item[
- "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
- ] || "N/A"
- : ""}
-
-
-
- {t(
- "search:searchresults-case-type-label"
- )}
- :
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- item[
- "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
- ] +
- '")].value_cy'
- )
- : item[
- "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
- ] || "N/A"}
-
-
-
- {t("search:searchresults-status-label")}
- :
-
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- item[
- "statuscode@OData.Community.Display.V1.FormattedValue"
- ] +
- '")].value_cy'
- )
- : item[
- "statuscode@OData.Community.Display.V1.FormattedValue"
- ] || "N/A"}
-
- {myportal == true && (
-
- {isWatchedCase(item.incidentid).length >
- 0 ==
- true ? (
- {
- deleteItem(
- isWatchedCase(
- item.incidentid
- )[0].pinswg_watchlistid,
-
- "watchedCases"
- );
- alert(
- "You have stopped watching case " +
- item.title
- );
- }}
- title="Stop watching this case"
- >
- −
-
- ) : (
- {
- selectWatchedCase(
- cookies.pinsUser,
- item.incidentid,
- item.pinswg_appealcasetype
- );
- alert(
- "You are watching case " +
- item.title
- );
- }}
- title="Watch this case"
- >
- +
-
- )}
+ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
+ ] || "N/A"}
- )}
-
- );
- })}
+
+
+ {t(
+ "search:searchresults-status-label"
+ )}
+ :
+
+
+ {router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ item[
+ "statuscode@OData.Community.Display.V1.FormattedValue"
+ ] +
+ '")].value_cy'
+ )
+ : item[
+ "statuscode@OData.Community.Display.V1.FormattedValue"
+ ] || "N/A"}
+
+ {myportal == true && (
+
+ {isWatchedCase(item.incidentid)
+ .length >
+ 0 ==
+ true ? (
+ {
+ deleteItem(
+ isWatchedCase(
+ item.incidentid
+ )[0]
+ .pinswg_watchlistid,
+
+ "watchedCases"
+ );
+ alert(
+ "You have stopped watching case " +
+ item.title
+ );
+ }}
+ title="Stop watching this case"
+ >
+ −
+
+ ) : (
+ {
+ selectWatchedCase(
+ cookies.pinsUser,
+ item.incidentid,
+ item.pinswg_appealcasetype
+ );
+ alert(
+ "You are watching case " +
+ item.title
+ );
+ }}
+ title="Watch this case"
+ >
+ +
+
+ )}
+
+ )}
+
+ );
+ })
+ )}
+
>
@@ -457,16 +486,13 @@ const SearchResults = (props) => {
);
getAdvancedSearchPaged(searchoObj, pageNumber)
- .then((data) => {
- //console.log(data);
- setSearchResults(data);
- return data;
- })
+ .then((data) => data)
.then((data) => {
//console.log("getting details", data);
+ setSearchResults(data);
return getSearchDetailsPaged(data).then((data) => {
setSearchDetails(data);
- //setShowSpinnerState(false);
+ setShowSpinnerState(false);
});
});
} else {
@@ -480,7 +506,7 @@ const SearchResults = (props) => {
//console.log("getting details", data);
return getSearchDetailsPaged(data).then((data) => {
setSearchDetails(data);
- //setShowSpinnerState(false);
+ setShowSpinnerState(false);
});
});
}
diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json
index c4882e34..bfc9d567 100644
--- a/data/lookuptranslations.json
+++ b/data/lookuptranslations.json
@@ -499,5 +499,47 @@
"value_cy": "Penderfyniad / Adroddiad Terfyno",
"pinswg_isharedocumentlocations": 0
}
+ ],
+ "pinswg_casestage": [
+ {
+ "value": "Pre-Application",
+ "value_cy": "Cyn Ymgeisio",
+ "pinswg_decision": 846040000
+ },
+ {
+ "value": "Acceptance",
+ "value_cy": "Derbyn",
+ "pinswg_decision": 846040001
+ },
+ {
+ "value": "Pre-Examiniation",
+ "value_cy": "Rhag-Arholiad",
+ "pinswg_decision": 846040001
+ },
+ {
+ "value": "Examination",
+ "value_cy": "Arholiad",
+ "pinswg_decision": 846040003
+ },
+ {
+ "value": "Recommendation",
+ "value_cy": "Argymhelliad",
+ "pinswg_decision": 846040004
+ },
+ {
+ "value": "Decision",
+ "value_cy": "Penderfyniad",
+ "pinswg_decision": 846040005
+ },
+ {
+ "value": "Post Decision",
+ "value_cy": "Wedi Penderfyniad",
+ "pinswg_decision": 846040006
+ },
+ {
+ "value": "Withdrawn",
+ "value_cy": "Tynnwyd yn ôl",
+ "pinswg_decision": 846040007
+ }
]
}
\ No newline at end of file
diff --git a/locales/cy/case.json b/locales/cy/case.json
index 176e4a5b..47a1c822 100644
--- a/locales/cy/case.json
+++ b/locales/cy/case.json
@@ -6,6 +6,7 @@
"summary-agent-label": "Asiant",
"summary-site-address-label": "Cyfeiriad y Safle",
"summary-description-label": "Disgrifiad",
+ "summary-case-stage-label": "Cam achos",
"summary-make-representation-label": "Cyflwyno cynrychiolaeth",
"summary-back-button-label": "Ewch yn ôl",
"summary-case-details-label": "Manylion yr Achos",
diff --git a/locales/cy/common.json b/locales/cy/common.json
index eb7bc9f5..4ed82261 100644
--- a/locales/cy/common.json
+++ b/locales/cy/common.json
@@ -46,6 +46,7 @@
"breadcrumb-case-reference": "Cyfeirnod Achos",
"spinner-loading": "Llwytho...",
"spinner-searching": "Chwilio...",
+ "spinner-fetching-data": "Nôl data",
"logged-out-title": "Rydych chi wedi allgofnodi",
"logged-out-link": "Dychwelwch i'r porth Gwaith Achos Cynllunio",
"404-not-found-title": "404 - heb ei ddarganfod",
diff --git a/locales/en/case.json b/locales/en/case.json
index 8c6b5591..dd3ccdae 100644
--- a/locales/en/case.json
+++ b/locales/en/case.json
@@ -6,6 +6,7 @@
"summary-agent-label": "Agent",
"summary-site-address-label": "Site Address",
"summary-description-label": "Description",
+ "summary-case-stage-label": "Case stage",
"summary-make-representation-label": "Make representation",
"summary-back-button-label": "Go back",
"summary-case-details-label": "Case Details",
diff --git a/locales/en/common.json b/locales/en/common.json
index 7e8e5323..c1713622 100644
--- a/locales/en/common.json
+++ b/locales/en/common.json
@@ -46,6 +46,7 @@
"breadcrumb-case-reference": "Case Reference",
"spinner-loading": "Loading...",
"spinner-searching": "Searching...",
+ "spinner-fetching-data": "Fetching data",
"logged-out-title": "You have been logged out",
"logged-out-link": "Return to Planning Casework portal",
"404-not-found-title": "404 - not found",
diff --git a/pages/api/documents/download/[id].js b/pages/api/documents/download/[id].js
index 4acc9afa..80c9c8e9 100644
--- a/pages/api/documents/download/[id].js
+++ b/pages/api/documents/download/[id].js
@@ -58,6 +58,8 @@ export default async function ApiProxy(req, res) {
};
};
+ console.log(WEBAPI_URL + queryUrl);
+
return axios
.get(
WEBAPI_URL + queryUrl, // + hashAPIPath(queryUrl),
diff --git a/pages/api/endpoint/getbasicsearchdetails_api.js b/pages/api/endpoint/getbasicsearchdetails_api.js
index 608efbfa..0abcb60b 100644
--- a/pages/api/endpoint/getbasicsearchdetails_api.js
+++ b/pages/api/endpoint/getbasicsearchdetails_api.js
@@ -34,7 +34,7 @@ export default async function ApiProxy(req, res) {
queryUrl = queryUrl + getSelectQuery(appealTypeName);
- //console.log("query: ", queryUrl, "<<<