refactor phase 3a api-file chunk 3 targeted actions imports
This commit is contained in:
@@ -82,9 +82,9 @@ import {
|
|||||||
downloadProgressFile,
|
downloadProgressFile,
|
||||||
getProgressBlobs,
|
getProgressBlobs,
|
||||||
getTempCaseBlob,
|
getTempCaseBlob,
|
||||||
createAppealPDFBlob,
|
createAppealPDFBlob
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
import ReactPDF, {
|
import ReactPDF, {
|
||||||
Document,
|
Document,
|
||||||
@@ -92,13 +92,13 @@ import ReactPDF, {
|
|||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
PDFViewer,
|
PDFViewer
|
||||||
} from "@react-pdf/renderer";
|
} from "@react-pdf/renderer";
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { getPickLists } from "../../../actions";
|
import { getPickLists } from "../../../actions/services/referenceDataService";
|
||||||
import { planningappeals78_pdf } from "../../../components/pdftemplates/planningappeals78_pdf";
|
import { planningappeals78_pdf } from "../../../components/pdftemplates/planningappeals78_pdf";
|
||||||
import { finalComments_pdf } from "../../../components/pdftemplates/finalComments_pdf";
|
import { finalComments_pdf } from "../../../components/pdftemplates/finalComments_pdf";
|
||||||
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
||||||
@@ -165,7 +165,7 @@ export default async function handler(req, res) {
|
|||||||
|
|
||||||
Object.assign(blobProgress, {
|
Object.assign(blobProgress, {
|
||||||
"filesList": uniqueArray,
|
"filesList": uniqueArray,
|
||||||
"caseObj": tempCaseBlob,
|
"caseObj": tempCaseBlob
|
||||||
});
|
});
|
||||||
|
|
||||||
const pickListData = await getPickLists(appealType);
|
const pickListData = await getPickLists(appealType);
|
||||||
@@ -208,7 +208,7 @@ export default async function handler(req, res) {
|
|||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
status: "success",
|
status: "success",
|
||||||
data: data,
|
data: data,
|
||||||
path: `/files/${pdfFileName}.pdf`,
|
path: `/files/${pdfFileName}.pdf`
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,15 +8,13 @@ import {
|
|||||||
downloadProgressFile,
|
downloadProgressFile,
|
||||||
getProgressBlobs,
|
getProgressBlobs,
|
||||||
getTempCaseBlob,
|
getTempCaseBlob,
|
||||||
createAppealPDFBlob,
|
createAppealPDFBlob
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
import {
|
import {
|
||||||
hashAPIPath,
|
|
||||||
getSearchDocumentDetails,
|
|
||||||
getCaseByID,
|
getCaseByID,
|
||||||
getPortalModuleDetails,
|
getPortalModuleDetails,
|
||||||
getAppealPDFDocs,
|
getAppealPDFDocs
|
||||||
} from "../../../actions";
|
} from "../../../actions/services/caseService";
|
||||||
import { getFormCollectionByID } from "../../../components/utils";
|
import { getFormCollectionByID } from "../../../components/utils";
|
||||||
import ReactPDF, {
|
import ReactPDF, {
|
||||||
Document,
|
Document,
|
||||||
@@ -25,14 +23,14 @@ import ReactPDF, {
|
|||||||
View,
|
View,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
PDFViewer,
|
PDFViewer,
|
||||||
pdf,
|
pdf
|
||||||
} from "@react-pdf/renderer";
|
} from "@react-pdf/renderer";
|
||||||
|
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { getPickLists } from "../../../actions";
|
import { getPickLists } from "../../../actions/services/referenceDataService";
|
||||||
import { planningappeals78_pdf } from "../../../components/pdftemplates/planningappeals78_pdf";
|
import { planningappeals78_pdf } from "../../../components/pdftemplates/planningappeals78_pdf";
|
||||||
import { finalComments_pdf } from "../../../components/pdftemplates/finalComments_pdf";
|
import { finalComments_pdf } from "../../../components/pdftemplates/finalComments_pdf";
|
||||||
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
||||||
@@ -89,7 +87,7 @@ export default async function handler(req, res) {
|
|||||||
|
|
||||||
const appealTypeMap = {
|
const appealTypeMap = {
|
||||||
846040000: planningappeals78_pdf,
|
846040000: planningappeals78_pdf,
|
||||||
846040004: planningappeals78_pdf,
|
846040004: planningappeals78_pdf
|
||||||
};
|
};
|
||||||
|
|
||||||
//console.log(caseDetailsObj[0].value[0]);
|
//console.log(caseDetailsObj[0].value[0]);
|
||||||
@@ -102,7 +100,7 @@ export default async function handler(req, res) {
|
|||||||
|
|
||||||
const pdfComponent = MyDocument({
|
const pdfComponent = MyDocument({
|
||||||
docProps: caseDetailsObj[0].value[0],
|
docProps: caseDetailsObj[0].value[0],
|
||||||
pickListData,
|
pickListData
|
||||||
});
|
});
|
||||||
|
|
||||||
const pdfBuffer = await pdf(pdfComponent).toBuffer();
|
const pdfBuffer = await pdf(pdfComponent).toBuffer();
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ import {
|
|||||||
uploadPDFRepFiles,
|
uploadPDFRepFiles,
|
||||||
createRepPDFBlob
|
createRepPDFBlob
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
import ReactPDF, {
|
import ReactPDF, {
|
||||||
Document,
|
Document,
|
||||||
@@ -100,7 +100,7 @@ import { finalComments_pdf } from "../../../components/pdftemplates/finalComment
|
|||||||
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
||||||
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
|
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
|
||||||
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
||||||
import { consoleLogger } from "../../../actions";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
//const ApiProxy = nextConnect();
|
//const ApiProxy = nextConnect();
|
||||||
// ApiProxy.use(middleware);
|
// ApiProxy.use(middleware);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user