Merged PR 492: translations deployment to environments
Related work items: #6240, #6268, #6270
This commit is contained in:
+56
-23
@@ -143,7 +143,7 @@ export const getBasicSearch = (token, searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=contains(title, '" +
|
||||
"incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=contains(title, '" +
|
||||
searchString +
|
||||
"') and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true&$top=201",
|
||||
azureHeaders(token)
|
||||
@@ -166,7 +166,7 @@ export const getBasicDNSSearch = (token, searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
"incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
azureHeaders(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
@@ -201,15 +201,10 @@ export const getAdvancedSearch = (token, searchString) => {
|
||||
searchString.apt
|
||||
: "";
|
||||
|
||||
// console.log(
|
||||
// "incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title&$filter=" +
|
||||
// queryString +
|
||||
// " &$count=true"
|
||||
// );
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
"incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
queryString +
|
||||
" and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true&$top=201",
|
||||
|
||||
@@ -217,7 +212,13 @@ export const getAdvancedSearch = (token, searchString) => {
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText,
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -268,13 +269,8 @@ export const getSearchDocumentHistory = (token, documentID) => {
|
||||
};
|
||||
|
||||
export const getSearchDocumentDetails1 = (incidentID) => {
|
||||
console.log(incidentID);
|
||||
//console.log(incidentID);
|
||||
var token = getSASToken();
|
||||
console.log(
|
||||
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
||||
incidentID +
|
||||
"&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference"
|
||||
);
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
||||
@@ -288,7 +284,7 @@ export const getSearchDocumentDetails1 = (incidentID) => {
|
||||
};
|
||||
|
||||
export const getSearchDocumentHistory1 = (documentID) => {
|
||||
console.log(documentID);
|
||||
// console.log(documentID);
|
||||
var token = getSASToken();
|
||||
return axios
|
||||
.get(
|
||||
@@ -317,6 +313,25 @@ export const getBasicDNSSearchDetails = (token, appealType, caseReference) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getLinkedCases = (parentIncidentid) => {
|
||||
console.log(parentIncidentid);
|
||||
var token = getSASToken();
|
||||
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/incidents?$count=true&$filter=_parentcaseid_value eq " +
|
||||
parentIncidentid +
|
||||
" and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true &$select=title, incidentid,"
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(" linked date", res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getFormData = (token, whichForm) => {
|
||||
//console.log("got to axios", whichForm);
|
||||
//console.log("api_root: ", BASE_URL);
|
||||
@@ -373,7 +388,14 @@ export const getAppealsTypes = (token) => {
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
console.log(error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText,
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -424,12 +446,22 @@ export const getLPA = (token) => {
|
||||
// console.log("api_root: ", BASE_URL);
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL + "accounts?$count=true&$select=name",
|
||||
WEBAPI_URL +
|
||||
"accounts?$count=true&$filter=pinswg_isalocalplanningauthorityaccount eq 846040000&$select=name",
|
||||
azureHeaders(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.then((res) => {
|
||||
// console.log(res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("thi serror", error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText,
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -475,7 +507,7 @@ export const getAppealID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const createCase = (appealTypeId) => {
|
||||
export const createCase = (token, appealTypeId) => {
|
||||
appealTypeId = parseInt(appealTypeId);
|
||||
var data = JSON.stringify({
|
||||
"title": "insertion test case",
|
||||
@@ -494,7 +526,7 @@ export const createCase = (appealTypeId) => {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Content-Type": "application/json",
|
||||
"ServiceBusAuthorization": SASToken,
|
||||
"ServiceBusAuthorization": token,
|
||||
},
|
||||
data: data,
|
||||
};
|
||||
@@ -510,6 +542,7 @@ export const createCase = (appealTypeId) => {
|
||||
};
|
||||
|
||||
export const updateCase = async (
|
||||
token,
|
||||
incidentId,
|
||||
updateBody,
|
||||
updateFormCollection,
|
||||
@@ -536,7 +569,7 @@ export const updateCase = async (
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Content-Type": "application/json",
|
||||
"ServiceBusAuthorization": SASToken,
|
||||
"ServiceBusAuthorization": token,
|
||||
},
|
||||
data: data,
|
||||
};
|
||||
|
||||
@@ -30,6 +30,7 @@ const CaseSummary = (props) => {
|
||||
searchResultsObj={props.searchResultsObj}
|
||||
searchDetailsObj={props.searchDetailsObj}
|
||||
searchString={props.searchString}
|
||||
incidentid={props.incidentid}
|
||||
/>
|
||||
<Documents
|
||||
incidentid={props.incidentid}
|
||||
|
||||
@@ -42,7 +42,7 @@ const DocumentDetails = (props) => {
|
||||
var documentDetailsArr = documentDetailsObj || [];
|
||||
|
||||
const DocumentView = (documentDetailsArr) => {
|
||||
console.log(documentDetailsArr);
|
||||
//console.log(documentDetailsArr);
|
||||
|
||||
documentDetailsArr = documentDetailsArr.value;
|
||||
|
||||
@@ -89,7 +89,12 @@ const DocumentDetails = (props) => {
|
||||
key={key}
|
||||
>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<Link href="/">
|
||||
<Link
|
||||
href={
|
||||
"/" +
|
||||
detailsObj.pinswg_isharedocumentreference
|
||||
}
|
||||
>
|
||||
<a>
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
@@ -168,7 +173,7 @@ const DocumentDetails = (props) => {
|
||||
const docDetailsObj = async () => {
|
||||
let docObj = await getSearchDocumentDetails1(incidentid)
|
||||
.then((data) => {
|
||||
console.log(data);
|
||||
//console.log(data);
|
||||
setDocumentDetails(data);
|
||||
return data;
|
||||
})
|
||||
|
||||
+113
-19
@@ -1,18 +1,26 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import jsonpath from "jsonpath";
|
||||
import _ from "lodash";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import LoadingOverlay from "react-loading-overlay";
|
||||
|
||||
import { getLinkedCases } from "../../actions";
|
||||
import {
|
||||
setCurrentLinkedCases,
|
||||
setCurrentReference,
|
||||
} from "../../store/currentView/action";
|
||||
|
||||
const CaseSummary = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
incidentid,
|
||||
caseReference,
|
||||
myCases,
|
||||
myRepresentations,
|
||||
@@ -21,6 +29,9 @@ const CaseSummary = (props) => {
|
||||
searchResultsObj,
|
||||
searchDetailsObj,
|
||||
currentType,
|
||||
setCurrentLinkedCases,
|
||||
linkedCasesReference,
|
||||
setCurrentReference,
|
||||
} = props;
|
||||
|
||||
const noRepresentationLink = ["/case", "/dnsdetails"];
|
||||
@@ -64,7 +75,7 @@ const CaseSummary = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||
Reference:{" "}
|
||||
{t("case:summary-reference-label")}:{" "}
|
||||
{currentType == "searchResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: casesObj.reference}
|
||||
@@ -322,28 +333,39 @@ const CaseSummary = (props) => {
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(detailsObj, [
|
||||
"pinswg_linkedstatus@OData.Community.Display.V1.FormattedValue",
|
||||
{_.has(casesObj, [
|
||||
"numberofchildincidents",
|
||||
])
|
||||
? detailsObj[
|
||||
"pinswg_linkedstatus@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
? casesObj.numberofchildincidents >
|
||||
0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
)
|
||||
: t(
|
||||
"case:summary-case-link-status-not-linked"
|
||||
)
|
||||
: t(
|
||||
"case:summary-case-link-status-not-linked"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-linked-cases-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{/* {casesObj.caseDetails.linkedCases ||
|
||||
""} */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 ? (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-linked-cases-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{linkedCasesList(
|
||||
props.currentView
|
||||
.linkedCaseReferences
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -582,6 +604,20 @@ const CaseSummary = (props) => {
|
||||
</>
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const linkCaseObj = async () => {
|
||||
let docObj = await getLinkedCases(incidentid).then((data) => {
|
||||
console.log(data);
|
||||
setCurrentLinkedCases(data);
|
||||
return data;
|
||||
});
|
||||
|
||||
return linkCaseObj;
|
||||
};
|
||||
|
||||
const linkedCases = linkCaseObj();
|
||||
}, [incidentid, setCurrentLinkedCases]);
|
||||
|
||||
const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||
|
||||
let spinnerState = () => {
|
||||
@@ -599,6 +635,47 @@ const CaseSummary = (props) => {
|
||||
return dd + "/" + mm + "/" + yyyy;
|
||||
}
|
||||
|
||||
function linkedCasesList(linkedCasesReference) {
|
||||
console.log(linkedCasesReference);
|
||||
|
||||
linkedCasesReference = linkedCasesReference.value || [];
|
||||
|
||||
return (
|
||||
<>
|
||||
<ul className="govuk-list govuk-!-font-size-14">
|
||||
{linkedCasesReference.map((item, key) => {
|
||||
return (
|
||||
<li key={key}>
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/achos"
|
||||
: "/case"
|
||||
}
|
||||
>
|
||||
<a
|
||||
onClick={() => {
|
||||
setCurrentReference({
|
||||
"currentReference": item.title,
|
||||
"currentType":
|
||||
"searchResultsObj",
|
||||
"incidentid": item.incidentid,
|
||||
});
|
||||
}}
|
||||
className=""
|
||||
>
|
||||
{item.title}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
// console.log(item.incidentid, item.title);
|
||||
})}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{showDetailsBlock}
|
||||
@@ -611,4 +688,21 @@ const CaseSummary = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default CaseSummary;
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentLinkedCases: (parentIncidentid) => {
|
||||
dispatch(setCurrentLinkedCases(parentIncidentid));
|
||||
},
|
||||
setCurrentReference: (currentReference) => {
|
||||
dispatch(setCurrentReference(currentReference));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(CaseSummary);
|
||||
|
||||
+11
-3
@@ -6,10 +6,17 @@ import { DiagConsoleLogger } from "@opentelemetry/api";
|
||||
const CRMError = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const { whichError } = props;
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const searchResultsObj = props.props.searchResultsObj.searchResultsObj;
|
||||
console.log(searchResultsObj);
|
||||
|
||||
const errorSwitch = _.has(props, "whichError")
|
||||
? "LPAData"
|
||||
: "searchResultsObj";
|
||||
|
||||
//console.log(errorSwitch);
|
||||
|
||||
return (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
@@ -17,7 +24,8 @@ const CRMError = (props) => {
|
||||
Something has happened....
|
||||
</h1>
|
||||
<p>
|
||||
{searchResultsObj.errorCode} - {searchResultsObj.errorMsg}
|
||||
{props.props[errorSwitch][errorSwitch].errorCode} -{" "}
|
||||
{props.props[errorSwitch][errorSwitch].errorMsg}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function Search(props) {
|
||||
? true
|
||||
: false;
|
||||
|
||||
console.log("has an error", hasError);
|
||||
//console.log("has an error", hasError);
|
||||
|
||||
return (
|
||||
<main
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function Inspectorate() {
|
||||
<div className="card clear" id="inspectorate-card">
|
||||
<div className="card-body">
|
||||
<Image
|
||||
alt="Planning Inspectorate"
|
||||
alt={t("home:inspectorate-card-alt-text")}
|
||||
src="/assets/images/PINS_dual_logo_400.png"
|
||||
width="380px"
|
||||
height="58px"
|
||||
|
||||
@@ -27,10 +27,10 @@ export default function LoginSoon() {
|
||||
<br />
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://gov.wales/planning-appeal-forms"
|
||||
href={t("home:login-comingsoon-forms-link")}
|
||||
rel="noreferrer"
|
||||
>
|
||||
https://gov.wales/planning-appeal-forms
|
||||
{t("home:login-comingsoon-forms-link")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import BuildRow from "./buildrow";
|
||||
import { reduxForm, formValueSelector, Field } from "redux-form";
|
||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||
import jsonpath from "jsonpath";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
|
||||
import data from "../../data/collections.json";
|
||||
import {
|
||||
@@ -90,7 +91,7 @@ let CreateCase = (props) => {
|
||||
//onChange={(e) => props.onChangeSelectLPA(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
Select...
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
@@ -100,7 +101,15 @@ let CreateCase = (props) => {
|
||||
key={key}
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{optionsObj[key].name}
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.name +
|
||||
'")].value_cy'
|
||||
)
|
||||
: optionsObj[key].name}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -151,7 +160,7 @@ let CreateCase = (props) => {
|
||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
Select...
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
@@ -190,6 +199,14 @@ let CreateCase = (props) => {
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy'
|
||||
)
|
||||
: optionsObj[key].value}
|
||||
</option>
|
||||
);
|
||||
@@ -248,8 +265,8 @@ let CreateCase = (props) => {
|
||||
component={RenderLPAList}
|
||||
optionsObj={lpaOptionsObj}
|
||||
validate={[required]}
|
||||
label="Select your local planning authority"
|
||||
errorMsg="Local authority is required"
|
||||
label={t("newappeal:select-lpa-label")}
|
||||
errorMsg={t("newappeal:select-lpa-label-error-msg")}
|
||||
/>
|
||||
|
||||
<Field
|
||||
@@ -257,8 +274,8 @@ let CreateCase = (props) => {
|
||||
component={RenderAppealTypeList}
|
||||
optionsObj={appealOptionsObj}
|
||||
validate={[required]}
|
||||
label="Select an appeal type"
|
||||
errorMsg="Appeal type is required"
|
||||
label={t("newappeal:select-appeal-type-label")}
|
||||
errorMsg={t("newappeal:select-appeal-type-label-error-msg")}
|
||||
/>
|
||||
|
||||
<button
|
||||
@@ -266,7 +283,7 @@ let CreateCase = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||
import jsonpath from "jsonpath";
|
||||
import data from "../../data/collections.json";
|
||||
import LoadingOverlay from "react-loading-overlay";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
|
||||
let AdvancedSearch = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -78,7 +79,7 @@ let AdvancedSearch = (props) => {
|
||||
//onChange={(e) => props.onChangeSelectLPA(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
Select...
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
@@ -88,7 +89,20 @@ let AdvancedSearch = (props) => {
|
||||
key={key}
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{optionsObj[key].name}
|
||||
{/* {optionsObj[key].name} */}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.name +
|
||||
'")].value_cy'
|
||||
)
|
||||
: optionsObj[key].name ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -141,7 +155,7 @@ let AdvancedSearch = (props) => {
|
||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
Select...
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
@@ -180,7 +194,18 @@ let AdvancedSearch = (props) => {
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key].value}
|
||||
: router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy'
|
||||
)
|
||||
: optionsObj[key].value ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -218,7 +243,7 @@ let AdvancedSearch = (props) => {
|
||||
event.preventDefault();
|
||||
spinnerState();
|
||||
|
||||
console.log(values);
|
||||
//console.log(values);
|
||||
// var appTypeCollection = values.appealTypes.split(",")[1];
|
||||
|
||||
// appTypeCollection = getFormCollection(
|
||||
@@ -293,7 +318,7 @@ let AdvancedSearch = (props) => {
|
||||
component={RenderAppealTypeList}
|
||||
optionsObj={appealOptionsObj}
|
||||
// validate={[required]}
|
||||
label="Select an appeal type"
|
||||
label={t("search:appealtype-label")}
|
||||
errormsg="Appeal type is required"
|
||||
/>
|
||||
<Field
|
||||
@@ -395,7 +420,7 @@ let AdvancedSearch = (props) => {
|
||||
name="search"
|
||||
className="govuk-button"
|
||||
>
|
||||
Search
|
||||
{t("common:search-button")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -223,7 +223,7 @@ const DNSSearchResults = (props) => {
|
||||
) : (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h3>There are no records</h3>
|
||||
<h3>{t("search:searchresults-no-records-label")}</h3>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -215,7 +215,9 @@ const SearchResults = (props) => {
|
||||
) : (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-two-thirds">
|
||||
<h3>There are no records</h3>
|
||||
<h3>
|
||||
{t("search:searchresults-no-records-label")}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function Search(props) {
|
||||
? true
|
||||
: false;
|
||||
|
||||
console.log("has an error", hasError);
|
||||
//console.log("has an error", hasError);
|
||||
|
||||
return (
|
||||
<main
|
||||
|
||||
@@ -201,6 +201,11 @@
|
||||
"value_cy": "Cyngor Bwrdeistref Sirol Blaenau Gwent",
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Bridgend CBC",
|
||||
"value_cy": "Cyngor Bwrdeistref Sirol Pen-y-bont ar Ogwr",
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Bridgend County Borough Council",
|
||||
"value_cy": "Cyngor Bwrdeistref Sirol Pen-y-bont ar Ogwr",
|
||||
@@ -212,7 +217,7 @@
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Cardiff Council",
|
||||
"value": "Cardiff County Council",
|
||||
"value_cy": "Cyngor Caerdydd",
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
@@ -317,19 +322,24 @@
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Brecon Beacons National Park",
|
||||
"value": "Brecon Beacons National Park Authority",
|
||||
"value_cy": "Parc Cenedlaethol Bannau Brycheiniog",
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Pembrokeshire Coast National Park",
|
||||
"value": "Pembrokeshire Coast National Park Authority",
|
||||
"value_cy": "Parc Cenedlaethol Arfordir Penfro",
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Snowdonia National Park",
|
||||
"value": "Snowdonia National Park Authority",
|
||||
"value_cy": "Parc Cenedlaethol Eryri",
|
||||
"pinswg_lpa": 0
|
||||
},
|
||||
{
|
||||
"value": "Developments of National Significance",
|
||||
"value_cy": "Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"pinswg_lpa": 0
|
||||
}
|
||||
],
|
||||
"pinswg_procedure": [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"page-title": "Cyfeirnod",
|
||||
"case-card-title": "Reference: APP/B1415/W/20/3271702",
|
||||
"summary-reference-label": "Cyfeirnod",
|
||||
"summary-applicant-label": "Apelydd/Ymgeisydd",
|
||||
"summary-agent-label": "Asiant",
|
||||
"summary-site-address-label": "Cyfeiriad y Safle",
|
||||
@@ -16,6 +17,7 @@
|
||||
"summary-decision-label": "Penderfyniad a chanlyniad",
|
||||
"summary-case-link-status-label": "Statws cysylltiad yr Achos",
|
||||
"summary-case-link-status-not-linked": "Heb ei Gysylltu",
|
||||
"summary-case-link-status-linked": "Cysylltiedig",
|
||||
"summary-linked-cases-label": "Achosion cysylltiedig",
|
||||
"summary-dates-label": "Dyddiadau",
|
||||
"summary-no-date-entered-label": "dim dyddiad wedi'i nodi",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"error-textbox": "Choose an option",
|
||||
"available-in": "English",
|
||||
"continue-button": "Parhewch",
|
||||
"search-button": "Chwilio",
|
||||
"submit-and-start": "Cyflwyno a dechrau'r cwrs",
|
||||
"footer-terms-conditions-link": "Telerau ac amodau",
|
||||
"footer-privacy-link": "Rhybudd Preifatrwydd",
|
||||
@@ -37,5 +38,6 @@
|
||||
"cookie-banner-list-item-2": "i wella'n gwefan drwy gasglu ac adrodd gwybodaeth ar sut yr ydych yn defnyddio'r safle",
|
||||
"cookie-banner-list-item-3": "i deilwra cyfathrebu",
|
||||
"cookie-banner-decline": "Rwy'n dirywio",
|
||||
"cookie-banner-accept": "Derbyn cwcis"
|
||||
"cookie-banner-accept": "Derbyn cwcis",
|
||||
"drop-down-select": "Dewiswch..."
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
"login-card-title-temp": "Croeso",
|
||||
"login-comingsoon-temp-1": "Mae’r wefan hon yn cael ei datblygu o hyd. Os hoffech gyflwyno apêl neu gais newydd, neu wneud sylwadau ar un sydd eisoes yn bodoli, cyflwynwch yr apêl, y cais neu’r sylwadau, ynghyd ag unrhyw ddogfennau cysylltiedig perthnasol, i ",
|
||||
"login-comingsoon-temp-2": "Gellir gofyn am ffurflenni apelio a ffurflenni cais trwy e-bost neu gellir eu lawrlwytho trwy ddilyn y ddolen isod. ",
|
||||
"login-comingsoon-forms-link": "https://llyw.cymru/ffurflenni-apelio",
|
||||
"login-card-title": "Mewngofnodi i apelio yn erbyn penderfyniad cynllunio",
|
||||
"login-card-id-label": "Dynodydd Defnyddiwr (ID) Porth y Llywodraeth",
|
||||
"login-card-id-hint": "Gallai hyn fod hyd at 12 o gymeriadau.",
|
||||
@@ -23,6 +24,7 @@
|
||||
"casescomment-card-paragraph-two": "O ran apeliadau Deiliaid Tai a Masnachol, ni all partïon â buddiant wneud sylwadau yn ystod y cam apêl. Bydd unrhyw sylwadau a wnaed yn ystod y cam ymgeisio’n cael eu darparu gan yr awdurdod cynllunio lleol a’u hystyried gan yr arolygydd.",
|
||||
"inspectorate-card-visit-label": "Ymweld Yr Arolygiaeth Gynllunio",
|
||||
"inspectorate-card-visit-link": "Hafan",
|
||||
"inspectorate-card-alt-text": "Yr Arolygiaeth Gynllunio",
|
||||
"dns-card-title": "Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"dns-card-paragraph": "Mae Datblygiad o Arwyddocâd Cenedlaethol (DAC) yn fath o gais cynllunio ar gyfer prosiect seilwaith mawr sydd o bwysigrwydd cenedlaethol yng Nghymru. Yn y fan hon, gallwch gael gwybod am geisiadau DAC arfaethedig. Rheolir y safle hwn gan yr Arolygiaeth Gynllunio.",
|
||||
"dns-card-button": "Gweld pob cais"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"viewall-link": "View all",
|
||||
"parent-page-title": "My portal",
|
||||
"page-title": "New appeal"
|
||||
"parent-page-title": "Fy Mhorth",
|
||||
"page-title": "Apêl newydd",
|
||||
"select-lpa-label": "Dewiswch eich awdurdod cynllunio lleol",
|
||||
"select-lpa-label-error-msg": "Mae angen awdurdod lleol",
|
||||
"select-appeal-type-label": "Dewiswch fath o apêl",
|
||||
"select-appeal-type-label-error-msg": "Mae angen math o apêl"
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"postcode-label": "Cod Post",
|
||||
"lpa-label": "Awdurdod Cynllunio Lleol",
|
||||
"lpa-reference-label": "Cyfeirnod yr Awdurdod Cynllunio Lleol",
|
||||
"appealtype-label": "Dewiswch fath o apêl",
|
||||
"case-type-label": "Math o Achos",
|
||||
"case-type-option-1": "--Dewiswch--",
|
||||
"case-type-option-2": "Unrhyw fath/Pob math",
|
||||
@@ -57,5 +58,6 @@
|
||||
"searchresults-status-label": "Statws",
|
||||
"searchresults-watch-label": "Gwylio",
|
||||
"searchresults-search-button-label": "Mireinio'r chwiliad",
|
||||
"searchresults-new-search-button-label": "Chwiliad newydd"
|
||||
"searchresults-new-search-button-label": "Chwiliad newydd",
|
||||
"searchresults-no-records-label": "Nid oes unrhyw gofnodion"
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"page-title": "Reference",
|
||||
"case-card-title": "Reference: APP/B1415/W/20/3271702",
|
||||
"summary-reference-label": "Reference",
|
||||
"summary-applicant-label": "Appellant/Applicant",
|
||||
"summary-agent-label": "Agent",
|
||||
"summary-site-address-label": "Site Address",
|
||||
@@ -16,6 +17,7 @@
|
||||
"summary-decision-label": "Decision and Outcome",
|
||||
"summary-case-link-status-label": "Case Link Status",
|
||||
"summary-case-link-status-not-linked": "Not linked",
|
||||
"summary-case-link-status-linked": "Linked",
|
||||
"summary-linked-cases-label": "Linked Cases",
|
||||
"summary-dates-label": "Dates",
|
||||
"summary-no-date-entered-label": "no date entered",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"error-textbox": "Choose an option",
|
||||
"available-in": "Cymraeg",
|
||||
"continue-button": "Continue",
|
||||
"search-button": "Search",
|
||||
"submit-and-start": "Submit and start course",
|
||||
"footer-terms-conditions-link": "Terms and conditions",
|
||||
"footer-privacy-link": "Privacy Notice",
|
||||
@@ -37,5 +38,6 @@
|
||||
"cookie-banner-list-item-2": "improve our website by collecting and reporting information on how you use it",
|
||||
"cookie-banner-list-item-3": "tailor communications",
|
||||
"cookie-banner-decline": "I decline",
|
||||
"cookie-banner-accept": "Accept cookies"
|
||||
"cookie-banner-accept": "Accept cookies",
|
||||
"drop-down-select": "Select..."
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
"login-card-title-temp": "Welcome",
|
||||
"login-comingsoon-temp-1": "This website is still in development, if you wish to submit a new appeal or application please submit it, along with any relevant associated documentation, to ",
|
||||
"login-comingsoon-temp-2": "Appeal and application forms can be requested by e-mail or downloaded following the below link.",
|
||||
"login-comingsoon-forms-link": "https://gov.wales/planning-appeal-forms",
|
||||
"login-card-title": "Sign in to appeal a planning decision",
|
||||
"login-card-id-label": "Government Gateway user ID",
|
||||
"login-card-id-hint": "This could be up to 12 characters.",
|
||||
@@ -23,6 +24,7 @@
|
||||
"casescomment-card-paragraph-two": "For Householder and Commercial appeals, interested parties are unable to make representations at appeal stage. Any representations made at application stage will be provided by the local planning authority and considered by the inspector.",
|
||||
"inspectorate-card-visit-label": "Visit the Planning Inspectorate",
|
||||
"inspectorate-card-visit-link": "Home",
|
||||
"inspectorate-card-alt-text": "The Planning Inspectorate",
|
||||
"dns-card-title": "Developments of National Significance",
|
||||
"dns-card-paragraph": "A Development of National Significance (DNS) is a type of planning application for a large infrastructure project of national importance in Wales. Here you can find out about proposed DNS applications. This site is managed by the Planning Inspectorate.",
|
||||
"dns-card-button": "View all applications"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"viewall-link": "View all",
|
||||
"parent-page-title": "My portal",
|
||||
"page-title": "New appeal"
|
||||
"page-title": "New appeal",
|
||||
"select-lpa-label": "Select your local planning authority",
|
||||
"select-lpa-label-error-msg": "Local authority is required",
|
||||
"select-appeal-type-label": "Select an appeal type",
|
||||
"select-appeal-type-label-error-msg": "Appeal type is required"
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"postcode-label": "Postcode",
|
||||
"lpa-label": "Local Planning Authority",
|
||||
"lpa-reference-label": "LPA reference number",
|
||||
"appealtype-label": "Select an appeal type",
|
||||
"case-type-label": "Case type",
|
||||
"case-type-option-1": "-- Select --",
|
||||
"case-type-option-2": "Any/All",
|
||||
@@ -57,5 +58,6 @@
|
||||
"searchresults-status-label": "Status",
|
||||
"searchresults-watch-label": "Watch",
|
||||
"searchresults-search-button-label": "Refine Search",
|
||||
"searchresults-new-search-button-label": "New Search"
|
||||
"searchresults-new-search-button-label": "New Search",
|
||||
"searchresults-no-records-label": "There are no records"
|
||||
}
|
||||
+17
-5
@@ -14,6 +14,7 @@ import { wrapper } from "../store/store";
|
||||
import Cookies from "cookies";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import CRMError from "../components/crmError";
|
||||
|
||||
import {
|
||||
setAppealType,
|
||||
@@ -39,6 +40,13 @@ const Home = (props) => {
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
console.log(props, props.LPAData);
|
||||
var hasError =
|
||||
_.has(props.LPAData.LPAData, "errorCode") ||
|
||||
_.has(props.appealType.appealType, "errorCode")
|
||||
? true
|
||||
: false;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
@@ -52,10 +60,14 @@ const Home = (props) => {
|
||||
<div className="govuk-width-container">
|
||||
<Banner />
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<Search
|
||||
lpadata={props.LPAData}
|
||||
appealType={props.appealType}
|
||||
/>
|
||||
{hasError ? (
|
||||
<CRMError props={props} whichError="advancedSearch" />
|
||||
) : (
|
||||
<Search
|
||||
lpadata={props.LPAData}
|
||||
appealType={props.appealType}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
</div>
|
||||
@@ -68,7 +80,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
async ({ query, req, res }) => {
|
||||
const token = await getSASToken();
|
||||
|
||||
const [appealTypeData, lpaData, caseData] = await Promise.all([
|
||||
const [appealTypeData, lpaData] = await Promise.all([
|
||||
await getAppealsTypes(token),
|
||||
await getLPA(token),
|
||||
]);
|
||||
|
||||
+11
-6
@@ -33,6 +33,7 @@ import {
|
||||
setAwaitingSubmissionDetails,
|
||||
} from "../../store/awaitingSubmission/action";
|
||||
import {
|
||||
getSASToken,
|
||||
getMyCases,
|
||||
getMyRepresentations,
|
||||
getWatchedCases,
|
||||
@@ -85,16 +86,19 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
//console.log("the query", query);
|
||||
|
||||
const token = await getSASToken();
|
||||
|
||||
const [
|
||||
myCases,
|
||||
myRepresentations,
|
||||
watchedCases,
|
||||
awaitingSubmission,
|
||||
] = await Promise.all([
|
||||
await getMyCases("f8b454ed-eded-eb11-aac7-00224800be9c"),
|
||||
await getMyRepresentations(),
|
||||
await getWatchedCases(),
|
||||
await getAwaitingSubmission(),
|
||||
await getMyCases(token, "f8b454ed-eded-eb11-aac7-00224800be9c"),
|
||||
await getMyRepresentations(token),
|
||||
await getWatchedCases(token),
|
||||
await getAwaitingSubmission(token),
|
||||
]);
|
||||
|
||||
const cookies = new Cookies(req, res);
|
||||
@@ -109,7 +113,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
// watchedCasesDetails,
|
||||
// awaitingSubmissionDetails,
|
||||
] = await Promise.all([
|
||||
await getDetails(myCases),
|
||||
await getDetails(token, myCases),
|
||||
// await getDetails(myRepresentations),
|
||||
// await getDetails(watchedCases),
|
||||
// await getDetails(awaitingSubmission),
|
||||
@@ -142,7 +146,7 @@ const getFormCollection = (formtype) => {
|
||||
return collectionName[0];
|
||||
};
|
||||
|
||||
const getDetails = (resultsObj) => {
|
||||
const getDetails = (token, resultsObj) => {
|
||||
//console.log(resultsObj);
|
||||
let detailsArr = [];
|
||||
resultsObj = resultsObj.value;
|
||||
@@ -152,6 +156,7 @@ const getDetails = (resultsObj) => {
|
||||
} else {
|
||||
detailsArr.push(
|
||||
getPortalModuelDetails(
|
||||
token,
|
||||
getFormCollection(
|
||||
"pinswg_" +
|
||||
searchDetail[
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
} from "../../store/appealType/action";
|
||||
import { setForm, getFormObj } from "../../store/formData/action";
|
||||
import {
|
||||
getSASToken,
|
||||
getFormData,
|
||||
getAppealsTypes,
|
||||
getMandatoryFields,
|
||||
@@ -170,7 +171,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
console.log("the query", query);
|
||||
|
||||
const token = await getSASToken();
|
||||
const [
|
||||
caseReferenceData,
|
||||
appealTypeData,
|
||||
@@ -178,11 +179,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
pickListData,
|
||||
formdata,
|
||||
] = await Promise.all([
|
||||
await createCase(query.apt),
|
||||
await getAppealsTypes(),
|
||||
await getMandatoryFields(query.appealtypes),
|
||||
await getPickLists(query.appealtypes),
|
||||
await getFormData(query.appealtypes),
|
||||
await createCase(token, query.apt),
|
||||
await getAppealsTypes(token),
|
||||
await getMandatoryFields(token, query.appealtypes),
|
||||
await getPickLists(token, query.appealtypes),
|
||||
await getFormData(token, query.appealtypes),
|
||||
]);
|
||||
|
||||
// let updateCaseReferenceData = await updateCase(
|
||||
|
||||
@@ -26,7 +26,13 @@ import {
|
||||
setAppealLPA,
|
||||
getAppealTypeObj,
|
||||
} from "../../store/appealType/action";
|
||||
import { getAppealsTypes, getLPA, updateCase, createCase } from "../../actions";
|
||||
import {
|
||||
getAppealsTypes,
|
||||
getLPA,
|
||||
updateCase,
|
||||
createCase,
|
||||
getSASToken,
|
||||
} from "../../actions";
|
||||
import { setLPA } from "../../store/lpa/action";
|
||||
|
||||
const Home = (props) => {
|
||||
@@ -80,9 +86,11 @@ const Home = (props) => {
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
const token = await getSASToken();
|
||||
|
||||
const [appealTypeData, lpaData, caseData] = await Promise.all([
|
||||
await getAppealsTypes(),
|
||||
await getLPA(),
|
||||
await getAppealsTypes(token),
|
||||
await getLPA(token),
|
||||
]);
|
||||
|
||||
store.dispatch(setAppealType(appealTypeData));
|
||||
|
||||
@@ -77,6 +77,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
searchResultsObj.status == 502
|
||||
? {
|
||||
value: [],
|
||||
errorCode: searchResultsObj.status,
|
||||
errorMsg: searchResultsObj.statusText,
|
||||
}
|
||||
: searchResultsObj;
|
||||
|
||||
@@ -5,6 +5,7 @@ export const currentViewActionTypes = {
|
||||
SETREPRESENTATIONCAPACITY: "SETREPRESENTATIONCAPACITY",
|
||||
SETREPRESENTATIONSUBMIT: "SETREPRESENTATIONSUBMIT",
|
||||
SETREPRESENTATIONSUBMITCONFIRMATION: "SETREPRESENTATIONSUBMITCONFIRMATION",
|
||||
SETCURRENTLINKEDCASES: "SETCURRENTLINKEDCASES",
|
||||
};
|
||||
|
||||
export const getCurrentViewObj = () => (dispatch) => {
|
||||
@@ -56,3 +57,10 @@ export const setRepresentationSubmitConfirmation =
|
||||
representationSubmitConfirmation: representationSubmitConfirmation,
|
||||
});
|
||||
};
|
||||
|
||||
export const setCurrentLinkedCases = (linkedCaseReferences) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: currentViewActionTypes.SETCURRENTLINKEDCASES,
|
||||
linkedCaseReferences: linkedCaseReferences,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@ const currentViewInitialState = {
|
||||
representationCapacity: {},
|
||||
representationSubmit: null,
|
||||
representationSubmitConfirmation: {},
|
||||
linkedCaseReferences: {},
|
||||
};
|
||||
|
||||
export default function reducer(state = currentViewInitialState, action) {
|
||||
@@ -20,6 +21,12 @@ export default function reducer(state = currentViewInitialState, action) {
|
||||
...state,
|
||||
caseReference: action.caseReference,
|
||||
};
|
||||
|
||||
case currentViewActionTypes.SETCURRENTLINKEDCASES:
|
||||
return {
|
||||
...state,
|
||||
linkedCaseReferences: action.linkedCaseReferences,
|
||||
};
|
||||
case currentViewActionTypes.SETREPRESENTATIONCAPACITY:
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user