Replace BPS Excel stub with multi-client calendar template.

Official download now generates a blank workbook with catalog autofill, notas_internas ignored on import, and the same template for every tenant.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-10-08 17:38:38 +02:00
parent 025fc85175
commit 501f8203e8
8 changed files with 2999 additions and 34 deletions

View File

@@ -9,11 +9,11 @@ import {
} from '@/lib/agency';
import {
parseJsonCalendar,
SAMPLE_CSV,
sheetsToPlans,
type ImportResult,
type SheetRows,
} from '@/lib/calendar-import';
import { buildOfficialCsv } from '@/lib/calendar-template';
import type { RrssMonthPlan } from '@/components/RrssMonthView';
export const dynamic = 'force-dynamic';
@@ -21,12 +21,14 @@ export const runtime = 'nodejs';
const MAX_BYTES = 8 * 1024 * 1024;
/** @deprecated Prefer GET /api/calendar/template?format=csv */
export async function GET() {
return new NextResponse(SAMPLE_CSV, {
return new NextResponse(buildOfficialCsv('CLIENTE'), {
headers: {
'Content-Type': 'text/csv; charset=utf-8',
'Content-Disposition':
'attachment; filename="plantilla-calendario-4ventures.csv"',
'Cache-Control': 'no-store',
},
});
}