my cases portal module by loggedin user

This commit is contained in:
robert.bond@test.gov.wales
2021-09-17 16:37:06 +01:00
parent 219e6a4744
commit c96a72f124
26 changed files with 673 additions and 107 deletions
+31 -18
View File
@@ -425,22 +425,19 @@ export const updateCase = async (
}); });
}; };
export const getMyCases = () => { export const getMyCases = (loggedInUserId) => {
return ( return axios
axios .get(
// .get(BASE_URL + "/api/lookups/myCases", { WEBAPI_URL +
// httpsAgent: new https.Agent({ rejectUnauthorized: false }), "incidents?$select=ticketnumber,casetypecode,createdon,_customerid_value,description,incidentid,pinswg_appealcasetype,_pinswg_assignedinspectrids_value,statecode,statuscode,title&$filter=_customerid_value eq " +
// }) loggedInUserId +
.get( " and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true&$top=3",
WEBAPI_URL + azureHeaders
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true", )
azureHeaders .then((res) => res.data)
) .catch((error) => {
.then((res) => res.data) console.log("thi serror", error);
.catch((error) => { });
console.log("thi serror", error);
})
);
}; };
export const getMyRepresentations = () => { export const getMyRepresentations = () => {
@@ -451,7 +448,7 @@ export const getMyRepresentations = () => {
// }) // })
.get( .get(
WEBAPI_URL + WEBAPI_URL +
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true", "incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true&$top=3",
azureHeaders azureHeaders
) )
.then((res) => res.data) .then((res) => res.data)
@@ -470,7 +467,7 @@ export const getWatchedCases = () => {
// }) // })
.get( .get(
WEBAPI_URL + WEBAPI_URL +
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true", "incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true&$top=3",
azureHeaders azureHeaders
) )
.then((res) => res.data) .then((res) => res.data)
@@ -490,3 +487,19 @@ export const getAwaitingSubmission = () => {
console.log("thi serror", error); console.log("thi serror", error);
}); });
}; };
export const getPortalModuelDetails = (appealType, caseReference) => {
return axios
.get(
WEBAPI_URL +
appealType +
"?$filter=pinswg_name eq '" +
caseReference +
"'&$count=true",
azureHeaders
)
.then((res) => res.data)
.catch((error) => {
console.log("thiserror", error);
});
};
+1
View File
@@ -21,6 +21,7 @@ const CaseSummary = (props) => {
<div className="govuk-grid-column-full"> <div className="govuk-grid-column-full">
<Summary <Summary
myCases={props.myCases} myCases={props.myCases}
myCasesDetails={props.myCasesDetails}
myRepresentations={props.myRepresentations} myRepresentations={props.myRepresentations}
watchedCases={props.watchedCases} watchedCases={props.watchedCases}
awaitingSubmission={props.awaitingSubmission} awaitingSubmission={props.awaitingSubmission}
+13 -9
View File
@@ -21,6 +21,7 @@ const CaseSummary = (props) => {
} = props; } = props;
let setCaseQueryObj = props[currentType]; let setCaseQueryObj = props[currentType];
let setCaseDetailsObj = props[currentType][currentType + "Details"];
var casesObj = {}; var casesObj = {};
@@ -38,10 +39,15 @@ const CaseSummary = (props) => {
var detailsObj = {}; var detailsObj = {};
detailsObj = jsonpath.query( currentType == "searchResultsObj"
searchDetailsObj, ? (detailsObj = jsonpath.query(
'$..[?(@.pinswg_name=="' + caseReference + '")]' searchDetailsObj,
); '$..[?(@.pinswg_name=="' + caseReference + '")]'
))
: (detailsObj = jsonpath.query(
setCaseDetailsObj,
'$..[?(@.pinswg_name=="' + caseReference + '")]'
));
detailsObj = detailsObj[0]; detailsObj = detailsObj[0];
return ( return (
@@ -61,11 +67,9 @@ const CaseSummary = (props) => {
{t("case:summary-applicant-label")} {t("case:summary-applicant-label")}
</dt> </dt>
<dd className="govuk-summary-list__value"> <dd className="govuk-summary-list__value">
{ {detailsObj[
detailsObj[ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" ] || "not entered"}
]
}
</dd> </dd>
</div> </div>
<div className="govuk-summary-list__row"> <div className="govuk-summary-list__row">
+1
View File
@@ -20,6 +20,7 @@ const MyCases = (props) => {
<div className="cardModuleContainer"> <div className="cardModuleContainer">
<TopThree <TopThree
showTopThree={props.myCases.myCases} showTopThree={props.myCases.myCases}
showDetails={props.myCases.myCasesDetails}
topThreeType={"myCases"} topThreeType={"myCases"}
/> />
</div> </div>
+120 -50
View File
@@ -1,4 +1,5 @@
import Link from "next/link"; import Link from "next/link";
import _ from "lodash";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import { setCurrentReference } from "../../store/currentView/action"; import { setCurrentReference } from "../../store/currentView/action";
@@ -6,65 +7,134 @@ import { connect } from "react-redux";
const TopThree = (props) => { const TopThree = (props) => {
let { t } = useTranslation(); let { t } = useTranslation();
const { showTopThree, setCurrentReference, topThreeType } = props; const { showTopThree, showDetails, setCurrentReference, topThreeType } =
props;
const router = useRouter(); const router = useRouter();
const { locale } = router; const { locale } = router;
let topthreeRow = []; let topthreeRow = [];
for (var i = 0; i < 3; i++) { // for (var i = 0; i < 3; i++) {
(function (i) { // (function (i) {
topthreeRow.push( // topthreeRow.push(
<div className="cardModuleItem" key={i}> // <div className="cardModuleItem" key={i}>
<div className="cardModuleDetails"> // <div className="cardModuleDetails">
<div className="cardModuleReference"> // <div className="cardModuleReference">
<b>Case reference:</b>{" "} // <b>Case reference:</b>{" "}
<Link // <Link
href={ // href={
topThreeType == "awaitingSubmission" // topThreeType == "awaitingSubmission"
? "/representation" // ? "/representation"
: "/case" // : "/case"
} // }
> // >
<a // <a
data-id={i} // data-id={i}
onClick={() => { // onClick={() => {
setCurrentReference({ // setCurrentReference({
"currentReference": // "currentReference":
showTopThree.value[i] // showTopThree.value[i]
.ticketnumber, // .ticketnumber,
"currentType": topThreeType, // "currentType": topThreeType,
}); // });
}} // }}
> // >
{showTopThree.value[i].ticketnumber} // {showTopThree.value[i].ticketnumber}
</a> // </a>
</Link> // </Link>
</div> // </div>
{topThreeType != "awaitingSubmission" ? ( // {topThreeType != "awaitingSubmission" ? (
<div className="carModuleAddress"> // <div className="carModuleAddress">
<b>Address: </b> // <b>Addressaa: </b>
{showTopThree.value[i].address1} // {showDetails[i].value[0]
</div> // .pinswg_siteaddressline1 == null
) : ( // ? "not entered"
"" // : showDetails[i].value[0]
)} // .pinswg_siteaddressline1}
// </div>
// ) : (
// ""
// )}
{topThreeType == "awaitingSubmission" ? ( // {topThreeType == "awaitingSubmission" ? (
<div className="carModuleAddress"> // <div className="carModuleAddress">
Make Representation on Case Incomplete, not // Make Representation on Case Incomplete, not
submitted // submitted
</div> // </div>
) : ( // ) : (
"" // ""
)} // )}
// </div>
// <div className="cardModuleRemoveCase"> &mdash;</div>
// </div>
// );
// })(i);
// }
let showTopThreeArr = showTopThree.value;
Object.keys(showTopThreeArr).map((key, index) => {
topthreeRow.push(
<div className="cardModuleItem" key={index}>
<div className="cardModuleDetails">
<div className="cardModuleReference">
<b>Case reference:</b>{" "}
<Link
href={
topThreeType == "awaitingSubmission"
? "/representation"
: "/case"
}
>
<a
data-id={index}
onClick={() => {
setCurrentReference({
"currentReference":
showTopThreeArr[key].ticketnumber,
"currentType": topThreeType,
});
}}
>
{showTopThreeArr[key].ticketnumber}
</a>
</Link>
</div> </div>
<div className="cardModuleRemoveCase"> &mdash;</div> {topThreeType != "awaitingSubmission" ? (
<div className="carModuleAddress">
<b>Addressa:</b>{" "}
{_.isEmpty(showDetails)
? "not entered"
: _.isEmpty(showDetails[index])
? "not entered"
: _.isEmpty(showDetails[index].value[0])
? "not entered"
: _.isEmpty(
showDetails[index].value[0]
.pinswg_siteaddressline1
)
? "not entered"
: showDetails[index].value[0]
.pinswg_siteaddressline1}
</div>
) : (
""
)}
{topThreeType == "awaitingSubmission" ? (
<div className="carModuleAddress">
Make Representation on Case Incomplete, not
submitted
</div>
) : (
""
)}
</div> </div>
); <div className="cardModuleRemoveCase"> &mdash;</div>
})(i); </div>
} );
});
return <>{topthreeRow}</>; return <>{topthreeRow}</>;
}; };
+4
View File
@@ -26,6 +26,10 @@ let CompleteAppeal = (props) => {
"Ids"; "Ids";
Object.assign(updateBody, { Object.assign(updateBody, {
"pinswg_Appellant@odata.bind":
"/contacts(" + props.props.accountDetails.loggedinUserId + ")",
"pinswg_AssociatedLPA@odata.bind":
"/accounts(" + props.appealType.appealLPA + ")",
"pinswg_name": props.appealType.caseReference.ticketnumber, "pinswg_name": props.appealType.caseReference.ticketnumber,
[updateBindAppealTypeToIncident + "@odata.bind"]: [updateBindAppealTypeToIncident + "@odata.bind"]:
"/incidents(" + incidentId + ")", "/incidents(" + incidentId + ")",
+26 -2
View File
@@ -7,6 +7,8 @@ import BuildRow from "./buildrow";
import { reduxForm, formValueSelector, Field } from "redux-form"; import { reduxForm, formValueSelector, Field } from "redux-form";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import jsonpath from "jsonpath"; import jsonpath from "jsonpath";
import data from "../../data/collections.json";
import { import {
setAppealType, setAppealType,
setAppealTypeTitle, setAppealTypeTitle,
@@ -174,7 +176,7 @@ let CreateCase = (props) => {
"," + "," +
optionsObj[key].value optionsObj[key].value
.replace( .replace(
/[\s\-\+\(\)\,]/g, /(\band|[\s\-\+\(\)\,\&])/g,
"" ""
) )
.toLowerCase() .toLowerCase()
@@ -201,11 +203,33 @@ let CreateCase = (props) => {
const required = (value) => (value ? undefined : "Required"); const required = (value) => (value ? undefined : "Required");
const getFormCollection = (formtype) => {
formtype =
"pinswg_" +
(formtype.length > 39 ? formtype.slice(0, 39) : formtype);
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')].UrlName"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const onHandleSubmit = (values) => { const onHandleSubmit = (values) => {
event.preventDefault(); event.preventDefault();
var appTypeCollection = values.appealTypes.split(",")[1];
appTypeCollection = getFormCollection(
appTypeCollection.length > 39
? appTypeCollection.slice(0, 39)
: appTypeCollection
);
router.replace( router.replace(
"/newappeal/" + "/newappeal/" +
values.appealTypes.split(",")[1] + appTypeCollection +
"?lpa=" + "?lpa=" +
values.lpaTypes + values.lpaTypes +
"&apt=" + "&apt=" +
+101 -12
View File
@@ -4,366 +4,455 @@
"LogicalCollectionName": "pinswg_planningobligationss106flows", "LogicalCollectionName": "pinswg_planningobligationss106flows",
"LogicalName": "pinswg_planningobligationss106flow", "LogicalName": "pinswg_planningobligationss106flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "efb4c590-19be-eb11-aac4-00224800be9c" "MetadataId": "efb4c590-19be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_dnsflows", "LogicalCollectionName": "pinswg_dnsflows",
"LogicalName": "pinswg_dnsflow", "LogicalName": "pinswg_dnsflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "328e015f-dabe-eb11-aac4-00224800be9c" "MetadataId": "328e015f-dabe-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_harbourrevisionorderflows", "LogicalCollectionName": "pinswg_harbourrevisionorderflows",
"LogicalName": "pinswg_harbourrevisionorderflow", "LogicalName": "pinswg_harbourrevisionorderflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "98bbb26e-e7be-eb11-aac4-00224800be9c" "MetadataId": "98bbb26e-e7be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_transportandworkactflows", "LogicalCollectionName": "pinswg_transportandworkactflows",
"LogicalName": "pinswg_transportandworkactflow", "LogicalName": "pinswg_transportandworkactflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "ad4bfc8c-e1be-eb11-aac4-00224800be9c" "MetadataId": "ad4bfc8c-e1be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_maintenanceoflands127flows", "LogicalCollectionName": "pinswg_maintenanceoflands127flows",
"LogicalName": "pinswg_maintenanceoflands127flow", "LogicalName": "pinswg_maintenanceoflands127flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "2b26362c-d3be-eb11-aac4-00224800be9c" "MetadataId": "2b26362c-d3be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_environmentalpermittingflows", "LogicalCollectionName": "pinswg_environmentalpermittingflows",
"LogicalName": "pinswg_environmentalpermittingflow", "LogicalName": "pinswg_environmentalpermittingflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "74dd4767-f2be-eb11-aac4-00224800be9c" "MetadataId": "74dd4767-f2be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_dnses", "LogicalCollectionName": "pinswg_dnses",
"LogicalName": "pinswg_dns", "LogicalName": "pinswg_dns",
"PrimaryIdAttribute": "pinswg_dnsid", "PrimaryIdAttribute": "pinswg_dnsid",
"UrlName": "dns",
"MetadataId": "36f07225-4a82-eb11-aac0-00224800be9c" "MetadataId": "36f07225-4a82-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_planningobligationappeals106s", "LogicalCollectionName": "pinswg_planningobligationappeals106s",
"LogicalName": "pinswg_planningobligationappeals106", "LogicalName": "pinswg_planningobligationappeals106",
"PrimaryIdAttribute": "pinswg_planningobligationappeals106id", "PrimaryIdAttribute": "pinswg_planningobligationappeals106id",
"UrlName": "planningobligationappeals106",
"MetadataId": "cb8beeae-8f81-eb11-aac0-00224800be9c" "MetadataId": "cb8beeae-8f81-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_planningconditionss73s79s", "LogicalCollectionName": "pinswg_planningconditionss73s79s",
"LogicalName": "pinswg_planningconditionss73s79", "LogicalName": "pinswg_planningconditionss73s79",
"PrimaryIdAttribute": "pinswg_planningconditionss73s79id", "PrimaryIdAttribute": "pinswg_planningconditionss73s79id",
"UrlName": "planningconditionss73s79",
"MetadataId": "093bf9ff-8d81-eb11-aac0-00224800be9c" "MetadataId": "093bf9ff-8d81-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_rows", "LogicalCollectionName": "pinswg_rows",
"LogicalName": "pinswg_row", "LogicalName": "pinswg_row",
"PrimaryIdAttribute": "pinswg_rowid", "PrimaryIdAttribute": "pinswg_rowid",
"UrlName": "row",
"MetadataId": "4ccc6e93-4f82-eb11-aac0-00224800be9c" "MetadataId": "4ccc6e93-4f82-eb11-aac0-00224800be9c"
}, },
{
"LogicalCollectionName": "pinswg_transportandworkacts",
"LogicalName": "pinswg_transportworksact",
"PrimaryIdAttribute": "pinswg_transportandworkactid",
"UrlName": "transportandworkact",
"MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c"
},
{ {
"LogicalCollectionName": "pinswg_transportandworkacts", "LogicalCollectionName": "pinswg_transportandworkacts",
"LogicalName": "pinswg_transportandworkact", "LogicalName": "pinswg_transportandworkact",
"PrimaryIdAttribute": "pinswg_transportandworkactid", "PrimaryIdAttribute": "pinswg_transportandworkactid",
"UrlName": "transportandworkact",
"MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c" "MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_transportandworkacts", "LogicalCollectionName": "pinswg_transportandworkacts",
"LogicalName": "pinswg_transportandworksact", "LogicalName": "pinswg_transportandworksact",
"PrimaryIdAttribute": "pinswg_transportandworkactid", "PrimaryIdAttribute": "pinswg_transportandworkactid",
"UrlName": "transportandworksact",
"MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c" "MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_wayleaveflows", "LogicalCollectionName": "pinswg_wayleaveflows",
"LogicalName": "pinswg_wayleaveflow", "LogicalName": "pinswg_wayleaveflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "a28054b9-e3be-eb11-aac4-00224800be9c" "MetadataId": "a28054b9-e3be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_planningappeals78flows", "LogicalCollectionName": "pinswg_planningappeals78flows",
"LogicalName": "pinswg_planningappeals78flow", "LogicalName": "pinswg_planningappeals78flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "ddaebde1-0fbe-eb11-aac4-00224800be9c" "MetadataId": "ddaebde1-0fbe-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_harbourrevisionorders", "LogicalCollectionName": "pinswg_harbourrevisionorders",
"LogicalName": "pinswg_harbourrevisionorder", "LogicalName": "pinswg_harbourrevisionorder",
"PrimaryIdAttribute": "pinswg_harbourrevisionorderid", "PrimaryIdAttribute": "pinswg_harbourrevisionorderid",
"UrlName": "harbourrevisionorder",
"MetadataId": "dc8dcd0d-4f82-eb11-aac0-00224800be9c" "MetadataId": "dc8dcd0d-4f82-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_miscellaneouscaseworks", "LogicalCollectionName": "pinswg_miscellaneouscaseworks",
"LogicalName": "pinswg_miscellaneouscasework", "LogicalName": "pinswg_miscellaneouscasework",
"PrimaryIdAttribute": "pinswg_miscellaneouscaseworkid", "PrimaryIdAttribute": "pinswg_miscellaneouscaseworkid",
"UrlName": "miscellaneouscasework",
"MetadataId": "f519aa8e-5782-eb11-aac0-00224800be9c" "MetadataId": "f519aa8e-5782-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_miscellaneouscaseworks", "LogicalCollectionName": "pinswg_miscellaneouscaseworks",
"LogicalName": "pinswg_misccasework", "LogicalName": "pinswg_misccasework",
"PrimaryIdAttribute": "pinswg_miscellaneouscaseworkid", "PrimaryIdAttribute": "pinswg_miscellaneouscaseworkid",
"UrlName": "miscellaneouscasework",
"MetadataId": "f519aa8e-5782-eb11-aac0-00224800be9c" "MetadataId": "f519aa8e-5782-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_localdevelopmentplanses", "LogicalCollectionName": "pinswg_localdevelopmentplanses",
"LogicalName": "pinswg_localdevelopmentplans", "LogicalName": "pinswg_localdevelopmentplans",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "localdevelopmentplans",
"MetadataId": "38ed3835-c1e0-eb11-aac5-00224800be9c" "MetadataId": "38ed3835-c1e0-eb11-aac5-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_planningappeals78s", "LogicalCollectionName": "pinswg_planningappeals78s",
"LogicalName": "pinswg_planningappeals78", "LogicalName": "pinswg_planningappeals78",
"PrimaryIdAttribute": "pinswg_planningappeals78id", "PrimaryIdAttribute": "pinswg_planningappeals78id",
"UrlName": "planningappeals78",
"MetadataId": "8d7f813a-4183-eb11-aac0-00224800be9c" "MetadataId": "8d7f813a-4183-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_enforcementnoticeappealsflow174s", "LogicalCollectionName": "pinswg_enforcementnoticeappealsflow174s",
"LogicalName": "pinswg_enforcementnoticeappealsflow174", "LogicalName": "pinswg_enforcementnoticeappealsflow174",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "enforcementnoticeappealsflow174",
"MetadataId": "a933cf28-20be-eb11-aac4-00224800be9c" "MetadataId": "a933cf28-20be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates", "LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
"LogicalName": "pinswg_lawfuldevelopmentcertificate", "LogicalName": "pinswg_lawfuldevelopmentcertificate",
"PrimaryIdAttribute": "pinswg_lawfuldevelopmentcertificateid", "PrimaryIdAttribute": "pinswg_lawfuldevelopmentcertificateid",
"UrlName": "lawfuldevelopmentcertificate",
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c" "MetadataId": "184e4861-9681-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates", "LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
"LogicalName": "pinswg_lawfuldevelopmentcertificateappeals194195", "LogicalName": "pinswg_lawfuldevelopmentcertificateappeals194195",
"PrimaryIdAttribute": "pinswg_lawfuldevelopmentcertificateid", "PrimaryIdAttribute": "pinswg_lawfuldevelopmentcertificateid",
"UrlName": "lawfuldevelopmentcertificateappeals1941",
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c"
},
{
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
"LogicalName": "pinswg_lawfuldevelopmentcertificateappeals1941",
"PrimaryIdAttribute": "pinswg_lawfuldevelopmentcertificateid",
"UrlName": "lawfuldevelopmentcertificate",
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c" "MetadataId": "184e4861-9681-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_highhedgestreepreservationflows", "LogicalCollectionName": "pinswg_highhedgestreepreservationflows",
"LogicalName": "pinswg_highhedgestreepreservationflow", "LogicalName": "pinswg_highhedgestreepreservationflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "c365b924-f3be-eb11-aac4-00224800be9c" "MetadataId": "c365b924-f3be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_householderappealhases", "LogicalCollectionName": "pinswg_householderappealhases",
"LogicalName": "pinswg_householderappealhas", "LogicalName": "pinswg_householderappealhas",
"PrimaryIdAttribute": "pinswg_householderappealhasid", "PrimaryIdAttribute": "pinswg_householderappealhasid",
"UrlName": "householderappealhas",
"MetadataId": "a6c728b0-9081-eb11-aac0-00224800be9c" "MetadataId": "a6c728b0-9081-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps", "LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
"LogicalName": "pinswg_enforcementlistedbuildingconservationap", "LogicalName": "pinswg_enforcementlistedbuildingconservationap",
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid", "PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid",
"UrlName": "enforcementlistedbuildingconservationap",
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c" "MetadataId": "c697be96-9481-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps", "LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
"LogicalName": "pinswg_enforcementlistedbuildingandconservationappeals39", "LogicalName": "pinswg_enforcementlistedbuildingandconservationappeals39",
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid", "PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid",
"UrlName": "enforcementlistedbuildingconservationap",
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c"
},
{
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
"LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid",
"UrlName": "enforcementlistedbuildingconservationap",
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c" "MetadataId": "c697be96-9481-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_callinss77s", "LogicalCollectionName": "pinswg_callinss77s",
"LogicalName": "pinswg_callinss77", "LogicalName": "pinswg_callinss77",
"PrimaryIdAttribute": "pinswg_callinss77id", "PrimaryIdAttribute": "pinswg_callinss77id",
"UrlName": "callinss77",
"MetadataId": "dd309e51-4982-eb11-aac0-00224800be9c" "MetadataId": "dd309e51-4982-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_commonlands", "LogicalCollectionName": "pinswg_commonlands",
"LogicalName": "pinswg_commonland", "LogicalName": "pinswg_commonland",
"PrimaryIdAttribute": "pinswg_commonlandid", "PrimaryIdAttribute": "pinswg_commonlandid",
"UrlName": "commonland",
"MetadataId": "4161a618-5082-eb11-aac0-00224800be9c" "MetadataId": "4161a618-5082-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_advertses", "LogicalCollectionName": "pinswg_advertses",
"LogicalName": "pinswg_adverts", "LogicalName": "pinswg_adverts",
"PrimaryIdAttribute": "pinswg_advertsid", "PrimaryIdAttribute": "pinswg_advertsid",
"UrlName": "adverts",
"MetadataId": "0735866b-5482-eb11-aac0-00224800be9c" "MetadataId": "0735866b-5482-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_hedgeshedgerowstreepreservationreplacems", "LogicalCollectionName": "pinswg_hedgeshedgerowstreepreservationreplacems",
"LogicalName": "pinswg_hedgeshedgerowstreepreservationreplacem", "LogicalName": "pinswg_hedgeshedgerowstreepreservationreplacem",
"PrimaryIdAttribute": "pinswg_hedgeshedgerowstreepreservationreplacemid", "PrimaryIdAttribute": "pinswg_hedgeshedgerowstreepreservationreplacemid",
"UrlName": "hedgeshedgerowstreepreservationreplacem",
"MetadataId": "60f38fed-5382-eb11-aac0-00224800be9c" "MetadataId": "60f38fed-5382-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_hedgeshedgerowstreepreservationreplacems", "LogicalCollectionName": "pinswg_hedgeshedgerowstreepreservationreplacems",
"LogicalName": "pinswg_highhedgestreepreservationordershedgerowstreereplacementnotice", "LogicalName": "pinswg_highhedgestreepreservationordershedgerowstreereplacementnotice",
"PrimaryIdAttribute": "pinswg_hedgeshedgerowstreepreservationreplacemid", "PrimaryIdAttribute": "pinswg_hedgeshedgerowstreepreservationreplacemid",
"UrlName": "hedgeshedgerowstreepreservationreplacem",
"MetadataId": "60f38fed-5382-eb11-aac0-00224800be9c"
},
{
"LogicalCollectionName": "pinswg_hedgeshedgerowstreepreservationreplacems",
"LogicalName": "pinswg_highhedgestreepreservationordershedgero",
"PrimaryIdAttribute": "pinswg_hedgeshedgerowstreepreservationreplacemid",
"UrlName": "hedgeshedgerowstreepreservationreplacem",
"MetadataId": "60f38fed-5382-eb11-aac0-00224800be9c" "MetadataId": "60f38fed-5382-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_compulsorypurchaseorderses", "LogicalCollectionName": "pinswg_compulsorypurchaseorderses",
"LogicalName": "pinswg_compulsorypurchaseorders", "LogicalName": "pinswg_compulsorypurchaseorders",
"PrimaryIdAttribute": "pinswg_compulsorypurchaseordersid", "PrimaryIdAttribute": "pinswg_compulsorypurchaseordersid",
"UrlName": "compulsorypurchaseorders",
"MetadataId": "054da4c7-5582-eb11-aac0-00224800be9c" "MetadataId": "054da4c7-5582-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_communityinfrastructurelevys117118119s", "LogicalCollectionName": "pinswg_communityinfrastructurelevys117118119s",
"LogicalName": "pinswg_communityinfrastructurelevys117118119", "LogicalName": "pinswg_communityinfrastructurelevys117118119",
"PrimaryIdAttribute": "pinswg_communityinfrastructurelevys117118119id", "PrimaryIdAttribute": "pinswg_communityinfrastructurelevys117118119id",
"UrlName": "communityinfrastructurelevys117118119",
"MetadataId": "0c309f3c-4882-eb11-aac0-00224800be9c" "MetadataId": "0c309f3c-4882-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_objectiveconfigs", "LogicalCollectionName": "pinswg_objectiveconfigs",
"LogicalName": "pinswg_objectiveconfig", "LogicalName": "pinswg_objectiveconfig",
"PrimaryIdAttribute": "pinswg_objectiveconfigid", "PrimaryIdAttribute": "pinswg_objectiveconfigid",
"UrlName": "objectiveconfig",
"MetadataId": "f89ae20c-4777-eb11-aabd-00224800be9c" "MetadataId": "f89ae20c-4777-eb11-aabd-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_nonvalidations", "LogicalCollectionName": "pinswg_nonvalidations",
"LogicalName": "pinswg_nonvalidation", "LogicalName": "pinswg_nonvalidation",
"PrimaryIdAttribute": "pinswg_nonvalidationid", "PrimaryIdAttribute": "pinswg_nonvalidationid",
"UrlName": "nonvalidation",
"MetadataId": "37f31a93-5882-eb11-aac0-00224800be9c" "MetadataId": "37f31a93-5882-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_rightofwayflows", "LogicalCollectionName": "pinswg_rightofwayflows",
"LogicalName": "pinswg_rightofwayflow", "LogicalName": "pinswg_rightofwayflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "b26c1d43-efbe-eb11-aac4-00224800be9c" "MetadataId": "b26c1d43-efbe-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_caseinvolvements", "LogicalCollectionName": "pinswg_caseinvolvements",
"LogicalName": "pinswg_caseinvolvement", "LogicalName": "pinswg_caseinvolvement",
"PrimaryIdAttribute": "pinswg_caseinvolvementid", "PrimaryIdAttribute": "pinswg_caseinvolvementid",
"UrlName": "caseinvolvement",
"MetadataId": "65677cd9-4aae-eb11-aac3-00224800be9c" "MetadataId": "65677cd9-4aae-eb11-aac3-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_commonlandflows", "LogicalCollectionName": "pinswg_commonlandflows",
"LogicalName": "pinswg_commonlandflow", "LogicalName": "pinswg_commonlandflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "338fac85-e6be-eb11-aac4-00224800be9c" "MetadataId": "338fac85-e6be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates195flows", "LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates195flows",
"LogicalName": "pinswg_lawfuldevelopmentcertificates195flow", "LogicalName": "pinswg_lawfuldevelopmentcertificates195flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "0b8f5046-1dbe-eb11-aac4-00224800be9c" "MetadataId": "0b8f5046-1dbe-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_advertisementappealanddiscontinuances", "LogicalCollectionName": "pinswg_advertisementappealanddiscontinuances",
"LogicalName": "pinswg_advertisementappealanddiscontinuance", "LogicalName": "pinswg_advertisementappealanddiscontinuance",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "advertisementappealanddiscontinuance",
"MetadataId": "79b9ab3a-f1be-eb11-aac4-00224800be9c" "MetadataId": "79b9ab3a-f1be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_documenthistories", "LogicalCollectionName": "pinswg_documenthistories",
"LogicalName": "pinswg_documenthistory", "LogicalName": "pinswg_documenthistory",
"PrimaryIdAttribute": "pinswg_documenthistoryid", "PrimaryIdAttribute": "pinswg_documenthistoryid",
"UrlName": "documenthistory",
"MetadataId": "0d8e78a7-33a3-eb11-aac3-00224800be9c" "MetadataId": "0d8e78a7-33a3-eb11-aac3-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_documents", "LogicalCollectionName": "pinswg_documents",
"LogicalName": "pinswg_document", "LogicalName": "pinswg_document",
"PrimaryIdAttribute": "pinswg_documentid", "PrimaryIdAttribute": "pinswg_documentid",
"UrlName": "documents",
"MetadataId": "e6cbbbca-026a-eb11-aabb-00224800be9c" "MetadataId": "e6cbbbca-026a-eb11-aabb-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_electricityactflows", "LogicalCollectionName": "pinswg_electricityactflows",
"LogicalName": "pinswg_electricityactflow", "LogicalName": "pinswg_electricityactflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "699c4318-e3be-eb11-aac4-00224800be9c" "MetadataId": "699c4318-e3be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_planningconditionss73s79flows", "LogicalCollectionName": "pinswg_planningconditionss73s79flows",
"LogicalName": "pinswg_planningconditionss73s79flow", "LogicalName": "pinswg_planningconditionss73s79flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "510154b1-15be-eb11-aac4-00224800be9c" "MetadataId": "510154b1-15be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_wayleaves", "LogicalCollectionName": "pinswg_wayleaves",
"LogicalName": "pinswg_wayleave", "LogicalName": "pinswg_wayleave",
"PrimaryIdAttribute": "pinswg_wayleaveid", "PrimaryIdAttribute": "pinswg_wayleaveid",
"UrlName": "wayleave",
"MetadataId": "a0652117-5782-eb11-aac0-00224800be9c" "MetadataId": "a0652117-5782-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_listedbuildingandconservationareaconsens", "LogicalCollectionName": "pinswg_listedbuildingandconservationareaconsens",
"LogicalName": "pinswg_listedbuildingandconservationareaconsen", "LogicalName": "pinswg_listedbuildingandconservationareaconsen",
"PrimaryIdAttribute": "pinswg_listedbuildingandconservationareaconsenid", "PrimaryIdAttribute": "pinswg_listedbuildingandconservationareaconsenid",
"UrlName": "listedbuildingandconservationareaconsen",
"MetadataId": "4cd95405-8f81-eb11-aac0-00224800be9c" "MetadataId": "4cd95405-8f81-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_listedbuildingandconservationareaconsens", "LogicalCollectionName": "pinswg_listedbuildingandconservationareaconsens",
"LogicalName": "pinswg_listedbuildingandconservationareaconsents73s79", "LogicalName": "pinswg_listedbuildingconservationareaconsents7",
"PrimaryIdAttribute": "pinswg_listedbuildingandconservationareaconsenid", "PrimaryIdAttribute": "pinswg_listedbuildingandconservationareaconsenid",
"UrlName": "listedbuildingandconservationareaconsen",
"MetadataId": "4cd95405-8f81-eb11-aac0-00224800be9c" "MetadataId": "4cd95405-8f81-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_callinapplicationss77flows", "LogicalCollectionName": "pinswg_callinapplicationss77flows",
"LogicalName": "pinswg_callinapplicationss77flow", "LogicalName": "pinswg_callinapplicationss77flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "2a4f3d43-d4be-eb11-aac4-00224800be9c" "MetadataId": "2a4f3d43-d4be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_transfercodes", "LogicalCollectionName": "pinswg_transfercodes",
"LogicalName": "pinswg_transfercode", "LogicalName": "pinswg_transfercode",
"PrimaryIdAttribute": "pinswg_transfercodeid", "PrimaryIdAttribute": "pinswg_transfercodeid",
"UrlName": "transfercode",
"MetadataId": "a551ad5c-29f5-eb11-aac7-00224800be9c" "MetadataId": "a551ad5c-29f5-eb11-aac7-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_compulsorypurchaseordersflows", "LogicalCollectionName": "pinswg_compulsorypurchaseordersflows",
"LogicalName": "pinswg_compulsorypurchaseordersflow", "LogicalName": "pinswg_compulsorypurchaseordersflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "a94f098b-f0be-eb11-aac4-00224800be9c" "MetadataId": "a94f098b-f0be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_environmentalpermittings", "LogicalCollectionName": "pinswg_environmentalpermittings",
"LogicalName": "pinswg_environmentalpermitting", "LogicalName": "pinswg_environmentalpermitting",
"PrimaryIdAttribute": "pinswg_environmentalpermittingid", "PrimaryIdAttribute": "pinswg_environmentalpermittingid",
"UrlName": "environmentalpermitting",
"MetadataId": "62d4aa9a-5682-eb11-aac0-00224800be9c" "MetadataId": "62d4aa9a-5682-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_nonvaidationflows", "LogicalCollectionName": "pinswg_nonvaidationflows",
"LogicalName": "pinswg_nonvaidationflow", "LogicalName": "pinswg_nonvaidationflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "e5ca3ceb-c1e0-eb11-aac5-00224800be9c" "MetadataId": "e5ca3ceb-c1e0-eb11-aac5-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_enforcementnoticeappeals174s", "LogicalCollectionName": "pinswg_enforcementnoticeappeals174s",
"LogicalName": "pinswg_enforcementnoticeappeals174", "LogicalName": "pinswg_enforcementnoticeappeals174",
"PrimaryIdAttribute": "pinswg_enforcementnoticeappeals174id", "PrimaryIdAttribute": "pinswg_enforcementnoticeappeals174id",
"UrlName": "enforcementnoticeappeals174",
"MetadataId": "930a3cc4-9181-eb11-aac0-00224800be9c" "MetadataId": "930a3cc4-9181-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_ldps", "LogicalCollectionName": "pinswg_ldps",
"LogicalName": "pinswg_ldp", "LogicalName": "pinswg_ldp",
"PrimaryIdAttribute": "pinswg_ldpid", "PrimaryIdAttribute": "pinswg_ldpid",
"UrlName": "ldp",
"MetadataId": "af424d4d-5882-eb11-aac0-00224800be9c" "MetadataId": "af424d4d-5882-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_maintenanceoflands217s", "LogicalCollectionName": "pinswg_maintenanceoflands217s",
"LogicalName": "pinswg_maintenanceoflands217", "LogicalName": "pinswg_maintenanceoflands217",
"PrimaryIdAttribute": "pinswg_maintenanceoflands217id", "PrimaryIdAttribute": "pinswg_maintenanceoflands217id",
"UrlName": "maintenanceoflands217",
"MetadataId": "bb302784-9581-eb11-aac0-00224800be9c" "MetadataId": "bb302784-9581-eb11-aac0-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_enforcelistbuild39flows", "LogicalCollectionName": "pinswg_enforcelistbuild39flows",
"LogicalName": "pinswg_enforcelistbuild39flow", "LogicalName": "pinswg_enforcelistbuild39flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "9423206e-d2be-eb11-aac4-00224800be9c" "MetadataId": "9423206e-d2be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_householderappealflows", "LogicalCollectionName": "pinswg_householderappealflows",
"LogicalName": "pinswg_householderappealflow", "LogicalName": "pinswg_householderappealflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "330541bd-d5be-eb11-aac4-00224800be9c" "MetadataId": "330541bd-d5be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_miscellaneouscaseworkflows", "LogicalCollectionName": "pinswg_miscellaneouscaseworkflows",
"LogicalName": "pinswg_miscellaneouscaseworkflow", "LogicalName": "pinswg_miscellaneouscaseworkflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "87db8649-f4be-eb11-aac4-00224800be9c" "MetadataId": "87db8649-f4be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_communityinfrastructurelevyflows", "LogicalCollectionName": "pinswg_communityinfrastructurelevyflows",
"LogicalName": "pinswg_communityinfrastructurelevyflow", "LogicalName": "pinswg_communityinfrastructurelevyflow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "92bc1e3d-e0be-eb11-aac4-00224800be9c" "MetadataId": "92bc1e3d-e0be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_listedbuildconserv20flows", "LogicalCollectionName": "pinswg_listedbuildconserv20flows",
"LogicalName": "pinswg_listedbuildconserv20flow", "LogicalName": "pinswg_listedbuildconserv20flow",
"PrimaryIdAttribute": "businessprocessflowinstanceid", "PrimaryIdAttribute": "businessprocessflowinstanceid",
"UrlName": "",
"MetadataId": "4c11cbe9-27be-eb11-aac4-00224800be9c" "MetadataId": "4c11cbe9-27be-eb11-aac4-00224800be9c"
}, },
{ {
"LogicalCollectionName": "pinswg_electricityacts", "LogicalCollectionName": "pinswg_electricityacts",
"LogicalName": "pinswg_electricityact", "LogicalName": "pinswg_electricityact",
"PrimaryIdAttribute": "pinswg_electricityactid", "PrimaryIdAttribute": "pinswg_electricityactid",
"UrlName": "electricityact",
"MetadataId": "6aedaab1-4a82-eb11-aac0-00224800be9c" "MetadataId": "6aedaab1-4a82-eb11-aac0-00224800be9c"
} }
] ]
+93
View File
@@ -0,0 +1,93 @@
import Link from "next/link";
import _ from "lodash";
import Head from "next/head";
import Header from "../../components/header";
import Banner from "../../components/banner";
import CookieBanner from "../../components/cookieBanner";
import Breadcrumbs from "../../components/breadcrumbs";
import Footer from "../../components/footer";
import { useSelector, shallowEqual, connect } from "react-redux";
import { wrapper } from "../../store/store";
import Cookies from "cookies";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { reduxForm, formValueSelector } from "redux-form";
import RegisterForm from "../../components/account/registerform";
const Home = (props) => {
const { footerLinks, formData } = props;
let { t, lang } = useTranslation();
const router = useRouter();
const { locale } = router;
const { appealtypes } = router.query;
const [registerFormComplete, setRegisterFormComplete] = useState(false);
const [accountCreatedComplete, setAccountCreatedComplete] = useState(false);
return (
<div>
<Head>
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
</Head>
<div id="page_wrapper">
<CookieBanner />
<Header courseName={t("common:service-name")} />
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<div className="govuk-width-container">
<Banner />
<Breadcrumbs slug={appealtypes} />
<main
className="govuk-main-wrapper--auto-spacing"
id="main-content"
role="main"
>
<div className="govuk-grid-row">
<div className="govuk-grid-column-two-thirds">
<h1>Forgotten password</h1>
</div>
</div>
</main>
</div>
</div>
</div>
<Footer footerLinks={footerLinks} />
</div>
</div>
);
};
// export const getServerSideProps = wrapper.getServerSideProps(
// (store) =>
// async ({ query, req, res }) => {
// const appealTypeData = await getAppealsTypes();
// const lpaData = await getLPA();
// console.log("appeal types", appealTypeData);
// console.log("lpa typeswwwww", lpaData);
// store.dispatch(setAppealType(appealTypeData));
// store.dispatch(setLPA(lpaData));
// }
// );
const mapStateToProps = (state) => {
return {
search: state.search,
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
LPAData: state.LPAData,
form: state.form,
accountDetails: state.accountDetails,
};
};
export default connect(mapStateToProps)(Home);
+93
View File
@@ -0,0 +1,93 @@
import Link from "next/link";
import _ from "lodash";
import Head from "next/head";
import Header from "../../components/header";
import Banner from "../../components/banner";
import CookieBanner from "../../components/cookieBanner";
import Breadcrumbs from "../../components/breadcrumbs";
import Footer from "../../components/footer";
import { useSelector, shallowEqual, connect } from "react-redux";
import { wrapper } from "../../store/store";
import Cookies from "cookies";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { reduxForm, formValueSelector } from "redux-form";
import RegisterForm from "../../components/account/registerform";
const Home = (props) => {
const { footerLinks, formData } = props;
let { t, lang } = useTranslation();
const router = useRouter();
const { locale } = router;
const { appealtypes } = router.query;
const [registerFormComplete, setRegisterFormComplete] = useState(false);
const [accountCreatedComplete, setAccountCreatedComplete] = useState(false);
return (
<div>
<Head>
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
</Head>
<div id="page_wrapper">
<CookieBanner />
<Header courseName={t("common:service-name")} />
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<div className="govuk-width-container">
<Banner />
<Breadcrumbs slug={appealtypes} />
<main
className="govuk-main-wrapper--auto-spacing"
id="main-content"
role="main"
>
<div className="govuk-grid-row">
<div className="govuk-grid-column-two-thirds">
<h1>Forgotten user</h1>
</div>
</div>
</main>
</div>
</div>
</div>
<Footer footerLinks={footerLinks} />
</div>
</div>
);
};
// export const getServerSideProps = wrapper.getServerSideProps(
// (store) =>
// async ({ query, req, res }) => {
// const appealTypeData = await getAppealsTypes();
// const lpaData = await getLPA();
// console.log("appeal types", appealTypeData);
// console.log("lpa typeswwwww", lpaData);
// store.dispatch(setAppealType(appealTypeData));
// store.dispatch(setLPA(lpaData));
// }
// );
const mapStateToProps = (state) => {
return {
search: state.search,
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
LPAData: state.LPAData,
form: state.form,
accountDetails: state.accountDetails,
};
};
export default connect(mapStateToProps)(Home);
+1
View File
@@ -37,6 +37,7 @@ const Home = (props) => {
<Banner /> <Banner />
<Breadcrumbs slug={appealtypes} props={props} /> <Breadcrumbs slug={appealtypes} props={props} />
<Case <Case
props={props}
myCases={props.myCases.myCases} myCases={props.myCases.myCases}
searchResultsObj={ searchResultsObj={
props.searchResultsObj.searchResultsObj props.searchResultsObj.searchResultsObj
+89 -12
View File
@@ -1,4 +1,6 @@
import _ from "lodash"; import _ from "lodash";
import Cookies from "cookies";
import jsonpath from "jsonpath";
import Head from "next/head"; import Head from "next/head";
import Header from "../../components/header"; import Header from "../../components/header";
import Banner from "../../components/banner"; import Banner from "../../components/banner";
@@ -10,18 +12,32 @@ import Errorpage from "../../components/errorpage";
import styles from "../../styles/Home.module.css"; import styles from "../../styles/Home.module.css";
import { useSelector, shallowEqual, connect } from "react-redux"; import { useSelector, shallowEqual, connect } from "react-redux";
import { wrapper } from "../../store/store"; import { wrapper } from "../../store/store";
import Cookies from "cookies";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import { setMyCases } from "../../store/myCases/action"; import data from "../../data/collections.json";
import { setMyRepresentations } from "../../store/myRepresentations/action"; import {
import { setWatchedCases } from "../../store/watchedCases/action"; setLoggedInUserId,
import { setAwaitingSubmission } from "../../store/awaitingSubmission/action"; setAccountDetails,
} from "../../store/accountDetails/action";
import { setMyCases, setMyCasesDetails } from "../../store/myCases/action";
import {
setMyRepresentations,
setMyRepresentationsDetails,
} from "../../store/myRepresentations/action";
import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import {
setAwaitingSubmission,
setAwaitingSubmissionDetails,
} from "../../store/awaitingSubmission/action";
import { import {
getMyCases, getMyCases,
getMyRepresentations, getMyRepresentations,
getWatchedCases, getWatchedCases,
getAwaitingSubmission, getAwaitingSubmission,
getPortalModuelDetails,
} from "../../actions"; } from "../../actions";
const Home = (props) => { const Home = (props) => {
@@ -69,35 +85,96 @@ export const getServerSideProps = wrapper.getServerSideProps(
(store) => (store) =>
async ({ query, req, res }) => { async ({ query, req, res }) => {
//console.log("the query", query); //console.log("the query", query);
res.setHeader(
"Cache-Control",
"public, s-maxage=604800, stale-while-revalidate"
);
const [ const [
myCases, myCases,
myRepresentations, myRepresentations,
watchedCases, watchedCases,
awaitingSubmission, awaitingSubmission,
] = await Promise.all([ ] = await Promise.all([
await getMyCases(), await getMyCases("f8b454ed-eded-eb11-aac7-00224800be9c"),
await getMyRepresentations(), await getMyRepresentations(),
await getWatchedCases(), await getWatchedCases(),
await getAwaitingSubmission(), await getAwaitingSubmission(),
]); ]);
const cookies = new Cookies(req, res);
cookies.set("pinsUser", "f8b454ed-eded-eb11-aac7-00224800be9c", {
httpOnly: true, // true by default
});
const [
myCasesDetails,
// myRepresentationsDetails,
// watchedCasesDetails,
// awaitingSubmissionDetails,
] = await Promise.all([
await getDetails(myCases),
// await getDetails(myRepresentations),
// await getDetails(watchedCases),
// await getDetails(awaitingSubmission),
]);
store.dispatch(
setLoggedInUserId("f8b454ed-eded-eb11-aac7-00224800be9c")
);
store.dispatch(setMyCases(myCases)); store.dispatch(setMyCases(myCases));
store.dispatch(setMyCasesDetails(myCasesDetails));
store.dispatch(setMyRepresentations(myRepresentations)); store.dispatch(setMyRepresentations(myRepresentations));
// store.dispatch(
// setMyRepresentationsDetails(myRepresentationsDetails)
// );
store.dispatch(setWatchedCases(watchedCases)); store.dispatch(setWatchedCases(watchedCases));
//store.dispatch(setWatchedCasesDetails(watchedCasesDetails));
store.dispatch(setAwaitingSubmission(awaitingSubmission)); store.dispatch(setAwaitingSubmission(awaitingSubmission));
// store.dispatch(
// setAwaitingSubmissionDetails(awaitingSubmissionDetails)
// );
} }
); );
const getFormCollection = (formtype) => {
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')].LogicalCollectionName"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const getDetails = (resultsObj) => {
// console.log(resultsObj);
let detailsArr = [];
resultsObj = resultsObj.value;
const detailsObj = resultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(searchDetail.ticketnumber);
} else {
detailsArr.push(
getPortalModuelDetails(
getFormCollection(
"pinswg_" +
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/[\s\-\+\(\)\,\&\.]/g, "")
.toLowerCase()
),
searchDetail.ticketnumber
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
//console.log(state); //console.log(state);
return { return {
accountDetails: state.accountDetails,
currentView: state.currentView, currentView: state.currentView,
search: state.search, search: state.search,
searchResultsObj: state.searchResultsObj, searchResultsObj: state.searchResultsObj,
+1
View File
@@ -72,6 +72,7 @@ const Home = (props) => {
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
return { return {
accountDetails: state.accountDetails,
search: state.search, search: state.search,
searchResultsObj: state.searchResultsObj, searchResultsObj: state.searchResultsObj,
formData: state.formData, formData: state.formData,
+17 -3
View File
@@ -14,6 +14,10 @@ import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath"; import jsonpath from "jsonpath";
import { useEffect } from "react"; import { useEffect } from "react";
import {
setLoggedInUserId,
setAccountDetails,
} from "../../store/accountDetails/action";
import { import {
setAppealType, setAppealType,
setAppealTypeTitle, setAppealTypeTitle,
@@ -73,8 +77,9 @@ let Home = (props) => {
const optionsTitleObj = selectedObj.reduce( const optionsTitleObj = selectedObj.reduce(
(obj, arrValue) => ( (obj, arrValue) => (
(obj[arrValue] = arrValue (obj[arrValue] = arrValue
.replace(/[\s\-\+\(\)\,]/g, "") .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()), .toLowerCase()
.slice(0, 39)),
obj obj
), ),
{} {}
@@ -164,7 +169,7 @@ let Home = (props) => {
export const getServerSideProps = wrapper.getServerSideProps( export const getServerSideProps = wrapper.getServerSideProps(
(store) => (store) =>
async ({ query, req, res }) => { async ({ query, req, res }) => {
//console.log("the query", query); console.log("the query", query);
const [ const [
caseReferenceData, caseReferenceData,
@@ -185,12 +190,20 @@ export const getServerSideProps = wrapper.getServerSideProps(
// query.apt // query.apt
// ); // );
const cookies = new Cookies(req, res);
// Get a cookie
console.log(cookies.get("pipinsUser"));
let caseReference = caseReferenceData; let caseReference = caseReferenceData;
let xmlStr = formdata; let xmlStr = formdata;
xmlStr = formdata.value[0].formxml; xmlStr = formdata.value[0].formxml;
xmlStr = xmlStr.replace(/\\"/g, ""); xmlStr = xmlStr.replace(/\\"/g, "");
//console.log(caseReference, query.appealtypes, formdata); //console.log(caseReference, query.appealtypes, formdata);
store.dispatch(
setLoggedInUserId("f8b454ed-eded-eb11-aac7-00224800be9c")
);
store.dispatch(setAppealLPA(query.lpa)); store.dispatch(setAppealLPA(query.lpa));
store.dispatch(setAppealTypeID(query.apt)); store.dispatch(setAppealTypeID(query.apt));
store.dispatch(setCaseReference(caseReference)); store.dispatch(setCaseReference(caseReference));
@@ -206,6 +219,7 @@ const mapStateToProps = (state) => {
formData: state.formData, formData: state.formData,
appealType: state.appealType, appealType: state.appealType,
form: state.form, form: state.form,
accountDetails: state.accountDetails,
}; };
}; };
+1
View File
@@ -98,6 +98,7 @@ const mapStateToProps = (state) => {
appealType: state.appealType, appealType: state.appealType,
LPAData: state.LPAData, LPAData: state.LPAData,
form: state.form, form: state.form,
accountDetails: state.accountDetails,
}; };
}; };
+8
View File
@@ -1,6 +1,7 @@
export const AccountDetailsDataActionTypes = { export const AccountDetailsDataActionTypes = {
GETACCOUNTDETAILSDATA: "GETACCOUNTDETAILSDATA", GETACCOUNTDETAILSDATA: "GETACCOUNTDETAILSDATA",
SETACCOUNTDETAILSDATA: "SETACCOUNTDETAILSDATA", SETACCOUNTDETAILSDATA: "SETACCOUNTDETAILSDATA",
SETLOGGEDINUSER: "SETLOGGEDINUSER",
}; };
export const getAccountDetailsObj = () => (dispatch) => { export const getAccountDetailsObj = () => (dispatch) => {
@@ -16,6 +17,13 @@ export const setAccountDetails = (accountDetails) => (dispatch) => {
}); });
}; };
export const setLoggedInUserId = (loggedinUserId) => (dispatch) => {
return dispatch({
type: AccountDetailsDataActionTypes.SETLOGGEDINUSER,
loggedinUserId: loggedinUserId,
});
};
export const setLogout = () => (dispatch) => { export const setLogout = () => (dispatch) => {
return dispatch({ return dispatch({
type: "USER_LOGOUT", type: "USER_LOGOUT",
+6
View File
@@ -2,6 +2,7 @@ import { AccountDetailsDataActionTypes } from "./action";
const AccountDetailsDataInitialState = { const AccountDetailsDataInitialState = {
accountDetails: {}, accountDetails: {},
loggedinUserId: "",
}; };
export default function reducer( export default function reducer(
@@ -14,6 +15,11 @@ export default function reducer(
...state, ...state,
accountDetails: action.accountDetails, accountDetails: action.accountDetails,
}; };
case AccountDetailsDataActionTypes.SETLOGGEDINUSER:
return {
...state,
loggedinUserId: action.loggedinUserId,
};
default: default:
return state; return state;
} }
+9
View File
@@ -1,6 +1,7 @@
export const awaitingSubmissionActionTypes = { export const awaitingSubmissionActionTypes = {
GETAWAITINGSUBMISSION: "GETAWAITINGSUBMISSION", GETAWAITINGSUBMISSION: "GETAWAITINGSUBMISSION",
SETAWAITINGSUBMISSION: "SETAWAITINGSUBMISSION", SETAWAITINGSUBMISSION: "SETAWAITINGSUBMISSION",
SETAWAITINGSUBMISSIONDETAILS: "SETAWAITINGSUBMISSIONDETAILS",
UPDATEAWAITINGSUBMISSION: "UPDATEAWAITINGSUBMISSION", UPDATEAWAITINGSUBMISSION: "UPDATEAWAITINGSUBMISSION",
}; };
@@ -16,3 +17,11 @@ export const setAwaitingSubmission = (awaitingSubmission) => (dispatch) => {
awaitingSubmission: awaitingSubmission, awaitingSubmission: awaitingSubmission,
}); });
}; };
export const setAwaitingSubmissionDetails =
(awaitingSubmissionDetails) => (dispatch) => {
return dispatch({
type: awaitingSubmissionActionTypes.SETAWAITINGSUBMISSIONDETAILS,
awaitingSubmissionDetails: awaitingSubmissionDetails,
});
};
+7
View File
@@ -2,6 +2,7 @@ import { awaitingSubmissionActionTypes } from "./action";
const awaitingSubmissionInitialState = { const awaitingSubmissionInitialState = {
awaitingSubmission: {}, awaitingSubmission: {},
awaitingSubmissionDetails: {},
}; };
export default function reducer( export default function reducer(
@@ -11,8 +12,14 @@ export default function reducer(
switch (action.type) { switch (action.type) {
case awaitingSubmissionActionTypes.SETAWAITINGSUBMISSION: case awaitingSubmissionActionTypes.SETAWAITINGSUBMISSION:
return { return {
...state,
awaitingSubmission: action.awaitingSubmission, awaitingSubmission: action.awaitingSubmission,
}; };
case awaitingSubmissionActionTypes.SETAWAITINGSUBMISSIONDETAILS:
return {
...state,
awaitingSubmissionDetails: action.awaitingSubmissionDetails,
};
default: default:
return state; return state;
} }
+7
View File
@@ -2,6 +2,7 @@ export const myCasesActionTypes = {
GETMYCASES: "GETMYCASES", GETMYCASES: "GETMYCASES",
SETMYCASES: "SETMYCASES", SETMYCASES: "SETMYCASES",
UPDATEMYCASES: "UPDATEMYCASES", UPDATEMYCASES: "UPDATEMYCASES",
SETMYCASESDETAILS: "SETMYCASESDETAILS",
}; };
export const getMyCasesObj = () => (dispatch) => { export const getMyCasesObj = () => (dispatch) => {
@@ -16,3 +17,9 @@ export const setMyCases = (myCases) => (dispatch) => {
myCases: myCases, myCases: myCases,
}); });
}; };
export const setMyCasesDetails = (myCasesDetails) => (dispatch) => {
return dispatch({
type: myCasesActionTypes.SETMYCASESDETAILS,
myCasesDetails: myCasesDetails,
});
};
+7
View File
@@ -2,14 +2,21 @@ import { myCasesActionTypes } from "./action";
const myCasesInitialState = { const myCasesInitialState = {
myCases: {}, myCases: {},
myCasesDetails: {},
}; };
export default function reducer(state = myCasesInitialState, action) { export default function reducer(state = myCasesInitialState, action) {
switch (action.type) { switch (action.type) {
case myCasesActionTypes.SETMYCASES: case myCasesActionTypes.SETMYCASES:
return { return {
...state,
myCases: action.myCases, myCases: action.myCases,
}; };
case myCasesActionTypes.SETMYCASESDETAILS:
return {
...state,
myCasesDetails: action.myCasesDetails,
};
default: default:
return state; return state;
} }
+9
View File
@@ -1,6 +1,7 @@
export const myRepresentationsActionTypes = { export const myRepresentationsActionTypes = {
GETMYREPRESENTATIONS: "GETMYREPRESENTATIONS", GETMYREPRESENTATIONS: "GETMYREPRESENTATIONS",
SETMYREPRESENTATIONS: "SETMYREPRESENTATIONS", SETMYREPRESENTATIONS: "SETMYREPRESENTATIONS",
SETMYREPRESENTATIONSDETAILS: "SETMYREPRESENTATIONSDETAILS",
UPDATEMYREPRESENTATIONS: "UPDATEMYREPRESENTATIONS", UPDATEMYREPRESENTATIONS: "UPDATEMYREPRESENTATIONS",
}; };
@@ -16,3 +17,11 @@ export const setMyRepresentations = (myRepresentations) => (dispatch) => {
myRepresentations: myRepresentations, myRepresentations: myRepresentations,
}); });
}; };
export const setMyRepresentationsDetails =
(myRepresentationsDetails) => (dispatch) => {
return dispatch({
type: myRepresentationsActionTypes.SETMYREPRESENTATIONSDETAILS,
myRepresentationsDetails: myRepresentationsDetails,
});
};
+7
View File
@@ -2,14 +2,21 @@ import { myRepresentationsActionTypes } from "./action";
const myRepresentationsInitialState = { const myRepresentationsInitialState = {
myRepresentations: {}, myRepresentations: {},
myRepresentationsDetails: {},
}; };
export default function reducer(state = myRepresentationsInitialState, action) { export default function reducer(state = myRepresentationsInitialState, action) {
switch (action.type) { switch (action.type) {
case myRepresentationsActionTypes.SETMYREPRESENTATIONS: case myRepresentationsActionTypes.SETMYREPRESENTATIONS:
return { return {
...state,
myRepresentations: action.myRepresentations, myRepresentations: action.myRepresentations,
}; };
case myRepresentationsActionTypes.SETMYREPRESENTATIONSDETAILS:
return {
...state,
myRepresentationsDetails: action.myRepresentationsDetails,
};
default: default:
return state; return state;
} }
+6 -1
View File
@@ -1,5 +1,5 @@
import { createStore, applyMiddleware, combineReducers } from "redux"; import { createStore, applyMiddleware, combineReducers } from "redux";
import { createWrapper, HYDRATE } from "next-redux-wrapper"; import { createWrapper, HYDRATE, REHYDRATE } from "next-redux-wrapper";
import thunkMiddleware from "redux-thunk"; import thunkMiddleware from "redux-thunk";
import { reducer as formReducer } from "redux-form"; import { reducer as formReducer } from "redux-form";
import autoMergeLevel2 from "redux-persist/lib/stateReconciler/autoMergeLevel2"; import autoMergeLevel2 from "redux-persist/lib/stateReconciler/autoMergeLevel2";
@@ -47,6 +47,11 @@ const reducer = (state = {}, action) => {
switch (action.type) { switch (action.type) {
case HYDRATE: case HYDRATE:
return { ...state, ...action.payload }; return { ...state, ...action.payload };
case REHYDRATE: {
console.log("am rhydrating........");
return { ...state, ...action.payload };
}
case "SERVER_ACTION": case "SERVER_ACTION":
return { return {
...state, ...state,
+8
View File
@@ -1,6 +1,7 @@
export const watchedCasesActionTypes = { export const watchedCasesActionTypes = {
GETWATCHEDCASES: "GETWATCHEDCASES", GETWATCHEDCASES: "GETWATCHEDCASES",
SETWATCHEDCASES: "SETWATCHEDCASES", SETWATCHEDCASES: "SETWATCHEDCASES",
SETWATCHEDCASESDETAILS: "SETWATCHEDCASESDETAILS",
UPDATEWATCHEDCASES: "UPDATEWATCHEDCASES", UPDATEWATCHEDCASES: "UPDATEWATCHEDCASES",
}; };
@@ -16,3 +17,10 @@ export const setWatchedCases = (watchedCases) => (dispatch) => {
watchedCases: watchedCases, watchedCases: watchedCases,
}); });
}; };
export const setWatchedCasesDetails = (watchedCasesDetails) => (dispatch) => {
return dispatch({
type: watchedCasesActionTypes.SETWATCHEDCASESDETAILS,
watchedCasesDetails: watchedCasesDetails,
});
};
+7
View File
@@ -2,14 +2,21 @@ import { watchedCasesActionTypes } from "./action";
const watchedCasesInitialState = { const watchedCasesInitialState = {
watchedCases: {}, watchedCases: {},
watchedCasesDetails: {},
}; };
export default function reducer(state = watchedCasesInitialState, action) { export default function reducer(state = watchedCasesInitialState, action) {
switch (action.type) { switch (action.type) {
case watchedCasesActionTypes.SETWATCHEDCASES: case watchedCasesActionTypes.SETWATCHEDCASES:
return { return {
...state,
watchedCases: action.watchedCases, watchedCases: action.watchedCases,
}; };
case watchedCasesActionTypes.SETWATCHEDCASESDETAILS:
return {
...state,
watchedCasesDetails: action.watchedCasesDetails,
};
default: default:
return state; return state;
} }