specific appeal types for new appeals

This commit is contained in:
2022-05-19 12:07:56 +01:00
parent ebdcd630f3
commit 06f7d44e81
3 changed files with 84 additions and 2 deletions
+16
View File
@@ -491,6 +491,22 @@ export const getAppealsTypes = () => {
});
};
export const getAppealsTypesForNewAppeal = () => {
return axios
.get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api")
.then((res) => res.data)
.catch((error) => {
console.log(error);
let ErrResponse = {
value: [],
errorCode: error.response.status,
errorMsg: error.response.statusText,
};
return ErrResponse;
});
};
export const getLPA = () => {
return axios
.get(BASE_URL + "/api/endpoint/getlpa_api")
@@ -0,0 +1,66 @@
const ApiResponse = (req, res) => {
res.statusCode = 200;
res.json({
"value": [
{
"value": "Planning Appeal - S78",
"stringmapid": "cb4aa9f2-e275-eb11-aabd-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,000",
"attributevalue": 846040000,
},
{
"value": "Listed Building and Conservation Area Consent",
"stringmapid": "d3b500b5-1228-ec11-aaca-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,025",
"attributevalue": 846040025,
},
{
"value": "Householder and Minor Commercial Appeals - HAS/CAS",
"stringmapid": "585d46a7-9138-ec11-aacb-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,004",
"attributevalue": 846040004,
},
{
"value": "Adverts",
"stringmapid": "c356f05c-7f90-eb11-aac2-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,018",
"attributevalue": 846040018,
},
{
"value": "Non-Validation",
"stringmapid": "c956f05c-7f90-eb11-aac2-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,024",
"attributevalue": 846040024,
},
{
"value": "Enforcement Notice Appeal - S174",
"stringmapid": "b656f05c-7f90-eb11-aac2-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,005",
"attributevalue": 846040005,
},
{
"value":
"High Hedges, Tree Preservation orders, Hedgerows, Tree Replacement Notice.",
"stringmapid": "c256f05c-7f90-eb11-aac2-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":
"846,040,017",
"attributevalue": 846040017,
},
],
});
};
export default ApiResponse;
+2 -2
View File
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import { getAppealsTypes, getLPA } from "../../actions";
import { getAppealsTypesForNewAppeal, getLPA } from "../../actions";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
@@ -130,7 +130,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
let loggedInUser = cookies.pinsUser;
const [appealTypeData, lpaData, caseData] = await Promise.all([
await getAppealsTypes(),
await getAppealsTypesForNewAppeal(),
await getLPA(),
]);