mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 17:38:12 +00:00
- Implemented a shared file viewer modal using `useFileViewer` hook to allow inline viewing of documents (images, PDFs, videos, etc.) across the application. - Updated `ContractClearanceReviewSection`, `ContractRequestDetailPage`, `ContractViewPage`, and booking-related components to utilize the new file viewer for document previews. - Added "Approve all" button in `ContractClearanceReviewSection` to bulk approve documents. - Enhanced document action buttons to include view and download options based on file type. - Introduced `isViewable` utility to determine if a file can be previewed inline. - Created `FileViewer` component to handle rendering of various file types and added appropriate fallback for unsupported formats.
30 lines
825 B
TypeScript
30 lines
825 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsIn, IsOptional, IsString, MinLength } from 'class-validator';
|
|
|
|
export class SignContractDto {
|
|
@ApiProperty({ enum: ['CUSTOMER', 'STAFF', 'DIRECTOR', 'CEO'] })
|
|
@IsIn(['CUSTOMER', 'STAFF', 'DIRECTOR', 'CEO'])
|
|
role!: 'CUSTOMER' | 'STAFF' | 'DIRECTOR' | 'CEO';
|
|
|
|
@ApiPropertyOptional({
|
|
description:
|
|
'PNG signature image as base64 (with or without data URL prefix). ' +
|
|
'Optional: when omitted, the signer\'s reusable saved signature from their ' +
|
|
'profile is used instead.',
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
@MinLength(20)
|
|
signatureImageBase64?: string;
|
|
|
|
@ApiProperty()
|
|
@IsString()
|
|
@MinLength(1)
|
|
signerDisplayName!: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
consentText?: string;
|
|
}
|