Files
edr-platform/apps/edr-freight-api/src/modules/reports/reports.module.ts
Nathnael fc2b5ee0e3 refactor(reports): export through the shared tabular writer
Completes the writer extraction whose other half landed in fb21ad154.
reports.controller now builds a TabularDoc and calls TabularExportService,
so report-export.service.ts and report-export-request.util.ts are dead and
removed — HEAD was carrying both copies with the controller still on the old
one.

Reports gain CSV for free, and the PDF path now passes buildTabularFallbackPdf
as its fallback: previously it passed none, so a box without Chromium silently
returned PdfRenderService's ~900-character generic text dump instead of a
table. Adds a spec covering the CSV writer's quoting of embedded commas and
double quotes — the reason this uses ExcelJS's csv writer rather than a
hand-rolled join.
2026-08-20 05:16:15 +00:00

16 lines
601 B
TypeScript

import { Module } from '@nestjs/common';
import { ExportsModule } from '../exports/exports.module';
import { UserTradeAccessModule } from '../user-trade-access/user-trade-access.module';
import { ReportRunnerService } from './report-runner.service';
import { ReportsController } from './reports.controller';
@Module({
// ExportsModule provides the shared tabular writer (xlsx/csv/pdf) and pulls
// DocumentsModule in for the PDF renderer.
imports: [UserTradeAccessModule, ExportsModule],
controllers: [ReportsController],
providers: [ReportRunnerService],
})
export class ReportsModule {}