Add product applicability controls to promotion forms

Introduces product selection and exclusion controls to both new and edit promotion forms, allowing promotions to target all, specific, or all-but-specific products. Adds a reusable ProductSelector component, updates promotion types to support new fields, and adjusts cookie max-age for authentication. Also adds two new business quotes.
This commit is contained in:
NotII
2025-08-07 16:05:31 +01:00
parent db1ebcb19d
commit 2c48ecd2b4
8 changed files with 584 additions and 86 deletions

View File

@@ -31,8 +31,8 @@ export async function POST(req: NextRequest) {
const cookieOptions = {
// HttpOnly for security - prevents JavaScript access
httpOnly: true,
// Valid for 7 days (same as the JWT)
maxAge: 7 * 24 * 60 * 60,
// Valid for 3 hours
maxAge: 3 * 60 * 60,
// Only send in requests to our domain
path: '/',
// Strict same-site policy to prevent CSRF