finalised new appeal pdf to show selected dropdowns
This commit is contained in:
@@ -22,57 +22,59 @@ const ApiResponse = (req, res) => {
|
||||
"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;
|
||||
|
||||
// list of other appeal types for create new appeals
|
||||
// {
|
||||
// "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,
|
||||
// },
|
||||
|
||||
@@ -95,6 +95,7 @@ import ReactPDF, {
|
||||
import middleware from "../middleware/middleware";
|
||||
import nextConnect from "next-connect";
|
||||
import fs from "fs";
|
||||
import { getPickLists } from "../../../actions";
|
||||
import { planningappeals78_pdf } from "../../../components/pdftemplates/planningappeals78_pdf";
|
||||
import { finalComments_pdf } from "../../../components/pdftemplates/finalComments_pdf";
|
||||
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
||||
@@ -108,6 +109,7 @@ import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
||||
|
||||
export default async function handler(req, res) {
|
||||
var checkHash = req.query.hash;
|
||||
var appealType = req.query.appealType;
|
||||
|
||||
let appealBodyObj = req.body; //JSON.parse(req.body);
|
||||
|
||||
@@ -144,7 +146,7 @@ export default async function handler(req, res) {
|
||||
return listedbuildingandconservationareaconsen_pdf(values);
|
||||
break;
|
||||
case "846040004":
|
||||
return householderappealhas_pdf(values);
|
||||
return planningappeals78_pdf(values);
|
||||
break;
|
||||
case "846040018":
|
||||
return adverts_pdf(values);
|
||||
@@ -178,8 +180,10 @@ export default async function handler(req, res) {
|
||||
|
||||
// createRepBlob(req.body, containerID, caseRef);
|
||||
|
||||
const pickListData = await getPickLists(appealType);
|
||||
|
||||
ReactPDF.render(
|
||||
<MyDocument docProps={blobProgress} />,
|
||||
<MyDocument docProps={blobProgress} pickListData={pickListData} />,
|
||||
`tmp/${blobProgress.pinswg_name}.pdf`
|
||||
);
|
||||
|
||||
@@ -200,11 +204,11 @@ export default async function handler(req, res) {
|
||||
"\n/////////////////////////"
|
||||
);
|
||||
|
||||
uploadPDFAppealFiles(
|
||||
`tmp/${appealBodyObj.pinswg_name}.pdf`,
|
||||
containerID,
|
||||
appealBodyObj.pinswg_name
|
||||
);
|
||||
// uploadPDFAppealFiles(
|
||||
// `tmp/${appealBodyObj.pinswg_name}.pdf`,
|
||||
// containerID,
|
||||
// appealBodyObj.pinswg_name
|
||||
// );
|
||||
|
||||
// to do upload file to storage account
|
||||
|
||||
|
||||
Reference in New Issue
Block a user