fix(f6.9): include every field photo and preserve document revisions
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m8s
DH V2 CI / WEB · typecheck, build (push) Successful in 19s
DH V2 CI / API · typecheck, tests, build (push) Successful in 32s
Production dependency audit / API · production dependencies (push) Successful in 8s
Production dependency audit / WEB · production dependencies (push) Successful in 9s
DH V2 CI / Docker / scripts contract (push) Successful in 59s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m8s
DH V2 CI / WEB · typecheck, build (push) Successful in 19s
DH V2 CI / API · typecheck, tests, build (push) Successful in 32s
Production dependency audit / API · production dependencies (push) Successful in 8s
Production dependency audit / WEB · production dependencies (push) Successful in 9s
DH V2 CI / Docker / scripts contract (push) Successful in 59s
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
Get,
|
||||
Param,
|
||||
ParseUUIDPipe,
|
||||
ParseIntPipe,
|
||||
Patch,
|
||||
Post,
|
||||
Query,
|
||||
@@ -83,6 +84,20 @@ export class InspectionReportsController {
|
||||
return response.sendFile(content.filePath);
|
||||
}
|
||||
|
||||
@Get(':id/consolidated-word/revisions/:version')
|
||||
@RequirePermissions('inspection_reports.read')
|
||||
async consolidatedWordRevision(
|
||||
@Param('id', new ParseUUIDPipe({ version: '4' })) id: string,
|
||||
@Param('version', ParseIntPipe) version: number,
|
||||
@Res() response: Response,
|
||||
) {
|
||||
const content = await this.word.consolidatedRevisionContent(id, version);
|
||||
response.setHeader('Content-Type', content.mimeType);
|
||||
response.setHeader('Content-Disposition', `attachment; filename="${content.originalName.replaceAll('"', '')}"`);
|
||||
response.setHeader('Cache-Control', 'private, no-store');
|
||||
return response.sendFile(content.filePath);
|
||||
}
|
||||
|
||||
@Get(':id/gedo-pdf')
|
||||
@RequirePermissions('inspection_reports.read')
|
||||
async gedoPdfContent(
|
||||
@@ -206,6 +221,22 @@ export class InspectionActPdfController {
|
||||
export class InspectionActConsolidatedPdfController {
|
||||
constructor(private readonly pdf: InspectionActPdfService) {}
|
||||
|
||||
@Get('revisions/:version')
|
||||
@RequirePermissions('inspection_acts.read')
|
||||
async revision(
|
||||
@Param('actId', new ParseUUIDPipe({ version: '4' })) actId: string,
|
||||
@Param('version', ParseIntPipe) version: number,
|
||||
@Res() response: Response,
|
||||
) {
|
||||
const content = await this.pdf.consolidatedRevisionContent(actId, version);
|
||||
response.setHeader('Content-Type', content.mimeType);
|
||||
response.setHeader('Content-Length', String(content.buffer.length));
|
||||
response.setHeader('Content-Disposition', `inline; filename="${content.originalName.replaceAll('"', '')}"`);
|
||||
response.setHeader('Cache-Control', 'private, no-store');
|
||||
return response.send(content.buffer);
|
||||
}
|
||||
|
||||
|
||||
@Get()
|
||||
@RequirePermissions('inspection_acts.read')
|
||||
async content(
|
||||
|
||||
Reference in New Issue
Block a user