changed pdf generated path
This commit is contained in:
@@ -78,7 +78,7 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:temp-reference")}:</b>
|
||||
{showTopThreeArr[key].hasOwnProperty(
|
||||
"appealComplete"
|
||||
"appealCompletes"
|
||||
) ? (
|
||||
<b>
|
||||
{showTopThreeArr[index].pinswg_name}
|
||||
|
||||
@@ -43,7 +43,10 @@ export default async function ApiProxy(req, res) {
|
||||
var queryUrl =
|
||||
"incidents?$select=modifiedon,pinswg_publishtoweb,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
|
||||
loggedInUserId +
|
||||
" and servicestage eq 0 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
||||
" and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
||||
|
||||
// Removed servicestage but not sure why.....
|
||||
//" and servicestage eq 0 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
||||
|
||||
//console.log("///////////\nPortal query: ", queryUrl, "<<<<end query");
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ import ReactPDF, {
|
||||
import middleware from "../middleware/middleware";
|
||||
import nextConnect from "next-connect";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { getPickLists } from "../../../actions";
|
||||
import { planningappeals78_pdf } from "../../../components/pdftemplates/planningappeals78_pdf";
|
||||
import { finalComments_pdf } from "../../../components/pdftemplates/finalComments_pdf";
|
||||
@@ -169,20 +170,21 @@ export default async function handler(req, res) {
|
||||
|
||||
ReactPDF.render(
|
||||
<MyDocument docProps={blobProgress} pickListData={pickListData} />,
|
||||
process.cwd() + `/tmp/${blobProgress.pinswg_name}.pdf`
|
||||
`./tmp/${blobProgress.pinswg_name}.pdf`
|
||||
);
|
||||
|
||||
console.log(
|
||||
"///////////////////////////////////\nfile created: " +
|
||||
process.cwd() +
|
||||
`/tmp/${blobProgress.pinswg_name}.pdf` +
|
||||
`./tmp/${blobProgress.pinswg_name}.pdf` +
|
||||
"\n folder:" +
|
||||
process.cwd() +
|
||||
"\n/////////////////////////"
|
||||
path.dirname(fs.realpathSync(__filename)) +
|
||||
"\n" +
|
||||
__dirname,
|
||||
"\n/////////////////////////"
|
||||
);
|
||||
|
||||
uploadPDFAppealFiles(
|
||||
process.cwd() + `/tmp/${appealBodyObj.pinswg_name}.pdf`,
|
||||
`./tmp/${appealBodyObj.pinswg_name}.pdf`,
|
||||
containerID,
|
||||
appealBodyObj.pinswg_name
|
||||
);
|
||||
@@ -193,7 +195,7 @@ export default async function handler(req, res) {
|
||||
|
||||
return res.status(200).json({
|
||||
data: "success",
|
||||
path: process.cwd() + `/tmp/${blobProgress.pinswg_name}.pdf`,
|
||||
path: `./tmp/${blobProgress.pinswg_name}.pdf`,
|
||||
});
|
||||
// } else {
|
||||
// return res.status(400).json();
|
||||
|
||||
Reference in New Issue
Block a user