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:
22
scripts/generate_calendar_template.ts
Normal file
22
scripts/generate_calendar_template.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Regenerate public/plantillas/calendario-rrss-oficial.xlsx
|
||||
* npx tsx scripts/generate_calendar_template.ts
|
||||
*/
|
||||
import { writeFileSync } from 'fs';
|
||||
import { resolve } from 'path';
|
||||
import { buildOfficialXlsx } from '../src/lib/calendar-template';
|
||||
|
||||
async function main() {
|
||||
const { buffer, filename } = await buildOfficialXlsx('CLIENTE');
|
||||
const out = resolve(
|
||||
process.cwd(),
|
||||
'public/plantillas/calendario-rrss-oficial.xlsx'
|
||||
);
|
||||
writeFileSync(out, buffer);
|
||||
console.log('Wrote', out, `(${buffer.length} bytes) · ${filename}`);
|
||||
}
|
||||
|
||||
main().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user