fix
All checks were successful
Build And Deploy Main / build-and-deploy (push) Successful in 34s

This commit is contained in:
2026-03-12 12:50:45 -04:00
parent 9a6e503fb3
commit 1f0c6938b9
18 changed files with 1449 additions and 12 deletions

View File

@@ -0,0 +1,22 @@
const fs = require("fs");
const path = require("path");
const rootDir = path.resolve(__dirname, "..");
const sourceDir = path.join(rootDir, "public", "upload");
const targetDir = path.join(rootDir, "build", "upload");
const templates = ["pdf_templete1.pdf", "pdf_templete2.pdf", "pdf_templete3.pdf"];
if (!fs.existsSync(targetDir)) {
fs.mkdirSync(targetDir, { recursive: true });
}
templates.forEach((templateName) => {
const sourcePath = path.join(sourceDir, templateName);
const targetPath = path.join(targetDir, templateName);
if (!fs.existsSync(sourcePath)) {
throw new Error(`Missing source template: ${sourcePath}`);
}
fs.copyFileSync(sourcePath, targetPath);
});
console.log("Route report PDF templates copied to build/upload.");