Update Next.js to version 15.4.2 and refactor invoice pages

- Upgrade Next.js and related packages for improved performance and security
- Refactor invoice-related pages to streamline navigation and enhance user experience
- Consolidate invoice editing and viewing functionality into a single page
- Remove deprecated edit page and implement a new view page for invoices
- Update links and routing for consistency across the dashboard
This commit is contained in:
2025-08-11 22:37:40 -04:00
parent a270f6c1e5
commit 543c553786
17 changed files with 402 additions and 1318 deletions

View File

@@ -17,6 +17,7 @@ export const env = createEnv({
NODE_ENV: z
.enum(["development", "test", "production"])
.default("development"),
DB_DISABLE_SSL: z.coerce.boolean().optional(),
},
/**
@@ -38,6 +39,7 @@ export const env = createEnv({
RESEND_API_KEY: process.env.RESEND_API_KEY,
RESEND_DOMAIN: process.env.RESEND_DOMAIN,
NODE_ENV: process.env.NODE_ENV,
DB_DISABLE_SSL: process.env.DB_DISABLE_SSL,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially

View File

@@ -16,7 +16,10 @@ export const pool =
globalForDb.pool ??
new Pool({
connectionString: env.DATABASE_URL,
ssl: env.NODE_ENV === "production" ? { rejectUnauthorized: false } : false,
ssl:
env.NODE_ENV === "production" && !env.DB_DISABLE_SSL
? { rejectUnauthorized: false }
: false,
max: 20,
idleTimeoutMillis: 30000,
});