feat: NAS storage for invoices/offers, code cleanup, date/time fixes
- NAS storage for created invoices (PDF via puppeteer), received invoices, and offers with auto-save on create/edit - Deterministic file paths derived from DB fields (no file_path column needed) - Separate NAS mount points: NAS_FINANCIALS_PATH, NAS_OFFERS_PATH - Invoice language field (cs/en) stored per invoice, replaces lang modal - Invoices list filtered by month/year matching KPI card selection - Centralized date helpers (src/utils/date.ts) replacing all .toISOString() calls that returned UTC instead of local time - Attendance project switching uses exact time (not rounded) - Comment cleanup: removed ~100 unnecessary/Czech comments - Removed as-any casts in orders and attendance - Prisma migrations: add invoice language, drop received_invoices BLOB columns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import path from "path";
|
||||
import { config } from "./config/env";
|
||||
import { securityHeaders } from "./middleware/security";
|
||||
|
||||
// Route imports
|
||||
import authRoutes from "./routes/admin/auth";
|
||||
import usersRoutes from "./routes/admin/users";
|
||||
import rolesRoutes from "./routes/admin/roles";
|
||||
@@ -194,6 +193,8 @@ async function start() {
|
||||
await app.close();
|
||||
const { default: prisma } = await import("./config/database");
|
||||
await prisma.$disconnect();
|
||||
const { closeBrowser } = await import("./utils/html-to-pdf");
|
||||
await closeBrowser();
|
||||
app.log.info("Server shut down successfully");
|
||||
process.exit(0);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user