update appeal pdf file name
This commit is contained in:
@@ -319,8 +319,16 @@ export const createAppealPDFBlob = async (
|
|||||||
|
|
||||||
const content = formContent;
|
const content = formContent;
|
||||||
|
|
||||||
|
const repDate = new Date();
|
||||||
|
|
||||||
|
let day = repDate.getDate();
|
||||||
|
let month = repDate.getMonth() + 1;
|
||||||
|
let year = repDate.getFullYear();
|
||||||
|
|
||||||
|
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
|
||||||
|
|
||||||
//console.log(content);
|
//console.log(content);
|
||||||
const blobName = caseID + "/files/" + caseID + ".pdf";
|
const blobName = caseID + "/files/" + pdfFileName + ".pdf";
|
||||||
|
|
||||||
console.log("blobName:", blobName);
|
console.log("blobName:", blobName);
|
||||||
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
||||||
|
|||||||
@@ -180,6 +180,14 @@ export default async function handler(req, res) {
|
|||||||
<MyDocument docProps={blobProgress} pickListData={pickListData} />
|
<MyDocument docProps={blobProgress} pickListData={pickListData} />
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const repDate = new Date();
|
||||||
|
|
||||||
|
let day = repDate.getDate();
|
||||||
|
let month = repDate.getMonth() + 1;
|
||||||
|
let year = repDate.getFullYear();
|
||||||
|
|
||||||
|
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
|
||||||
|
|
||||||
await createAppealPDFBlob(
|
await createAppealPDFBlob(
|
||||||
renderedPDF,
|
renderedPDF,
|
||||||
containerID,
|
containerID,
|
||||||
@@ -187,13 +195,13 @@ export default async function handler(req, res) {
|
|||||||
).then((data) => {
|
).then((data) => {
|
||||||
console.log(
|
console.log(
|
||||||
"///////////////////////////////////\nfile created: " +
|
"///////////////////////////////////\nfile created: " +
|
||||||
`/files/${blobProgress.pinswg_name}.pdf`,
|
`/files/${pdfFileName}.pdf`,
|
||||||
"\n/////////////////////////"
|
"\n/////////////////////////"
|
||||||
);
|
);
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
status: "success",
|
status: "success",
|
||||||
data: data,
|
data: data,
|
||||||
path: `/files/${blobProgress.pinswg_name}.pdf`,
|
path: `/files/${pdfFileName}.pdf`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user