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:
@@ -21,7 +21,6 @@ function parseUserAgent(ua: string | null): {
|
||||
icon: "monitor",
|
||||
};
|
||||
|
||||
// Browser detection
|
||||
let browser = "Neznámý prohlížeč";
|
||||
if (ua.includes("Edg/")) browser = "Edge";
|
||||
else if (ua.includes("OPR/") || ua.includes("Opera")) browser = "Opera";
|
||||
@@ -29,7 +28,6 @@ function parseUserAgent(ua: string | null): {
|
||||
else if (ua.includes("Safari/") && !ua.includes("Chrome")) browser = "Safari";
|
||||
else if (ua.includes("Firefox/")) browser = "Firefox";
|
||||
|
||||
// OS detection
|
||||
let os = "Neznámý systém";
|
||||
if (ua.includes("Windows")) os = "Windows";
|
||||
else if (ua.includes("Mac OS X") || ua.includes("Macintosh")) os = "macOS";
|
||||
@@ -37,7 +35,6 @@ function parseUserAgent(ua: string | null): {
|
||||
else if (ua.includes("Android")) os = "Android";
|
||||
else if (ua.includes("iPhone") || ua.includes("iPad")) os = "iOS";
|
||||
|
||||
// Device icon
|
||||
let icon = "monitor";
|
||||
if (
|
||||
ua.includes("Mobile") ||
|
||||
@@ -76,7 +73,7 @@ export default async function sessionsRoutes(
|
||||
is_current: currentHash ? s.token_hash === currentHash : false,
|
||||
device_info,
|
||||
ip_address: s.ip_address || "",
|
||||
created_at: s.created_at ? s.created_at.toISOString() : "",
|
||||
created_at: s.created_at ?? "",
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user