add contract hazard declaration, DO collection dates, and booking request currency migrations; implement article body diff component and integrate into contract revision timeline

This commit is contained in:
Marshal
2026-07-26 19:14:39 +00:00
parent 5fa012cad3
commit bcf25538b6
14 changed files with 156 additions and 123 deletions

View File

@@ -1,6 +1,13 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsInt, IsOptional, Max, Min, ValidateNested } from 'class-validator';
import {
IsDateString,
IsInt,
IsOptional,
Max,
Min,
ValidateNested,
} from 'class-validator';
import { UpdateContractDocumentDto } from './contract-document.dto';
@@ -18,6 +25,21 @@ export class AcceptContractDto {
@Max(3650)
validityDays!: number;
/**
* Explicit validity window picked by staff in the accept dialog. When both are
* present they win over `validityDays` (which is then only the derived span)
* and the configured-period check is skipped — staff may enter any range.
*/
@ApiPropertyOptional({ description: 'Validity start (ISO date)' })
@IsOptional()
@IsDateString()
validFrom?: string;
@ApiPropertyOptional({ description: 'Validity end (ISO date)' })
@IsOptional()
@IsDateString()
validUntil?: string;
/**
* Optional per-contract document override edited by staff in the accept
* dialog. When present its articles are frozen onto THIS contract; when