add company stamp upload functionality for contract signing

- Introduced StampUpload component for uploading company stamp images.
- Integrated stamp upload in contract signing modal, supporting PNG and JPG formats.
- Implemented validation for file type and size (max 5 MB).
- Added visual feedback for drag-and-drop functionality.
- Updated contract-related pages to handle duplicate contract alerts and pricing notices.
- Enhanced contract expiry management with a nightly sweep service.
- Added unit tests for new features and updated existing tests for contract handling.
This commit is contained in:
Marshal
2026-07-25 17:14:58 +00:00
parent 54b5882355
commit fde5e6de4b
68 changed files with 1858 additions and 289 deletions

View File

@@ -8,6 +8,7 @@ import {
} from "@nestjs/common";
import { CurrentUser } from "@edr/api-common";
import {
BookingDocReviewAlert,
TrainSchedulingCancel,
TrainSchedulingCreate,
TrainSchedulingReschedule,
@@ -747,6 +748,18 @@ export class TrainSchedulingController {
return this.trainSchedulingService.getContainerTrainScheduleById(id);
}
@Get("doc-review-alert")
// Dedicated permission, not scheduling or bookings:view — the alarm is meant
// for the position types that actually decide operation requests.
@BookingDocReviewAlert()
@ApiOperation({
summary:
"Nearest document-review deadline that still has un-accepted booking requests behind it (null when there is none) — drives the backoffice header countdown",
})
async getDocReviewAlert() {
return this.bookingWindowService.getDocReviewAlert();
}
@Post("schedules/:id/doc-review-complete")
@TrainSchedulingUpdate()
@ApiOperation({