mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
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:
@@ -0,0 +1,27 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Company stamp (seal) attached alongside the drawn signature, for both the
|
||||
* client and the EDR side. Stored the same way the signature image is: a
|
||||
* FileRecord on the contract (`resource: 'contracts'`, `code: 'stamp_<role>'`)
|
||||
* referenced from the signature row.
|
||||
*
|
||||
* Nullable — existing signature rows predate the stamp requirement. The
|
||||
* "both stamps recorded" gate lives in ContractTransitionService.counterSign,
|
||||
* not in a NOT NULL constraint, so historical rows stay readable.
|
||||
*/
|
||||
export class AddContractSignatureStamp2910000000000 implements MigrationInterface {
|
||||
name = 'AddContractSignatureStamp2910000000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE freight.contract_signatures ADD COLUMN IF NOT EXISTS stamp_file_id uuid;`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE freight.contract_signatures DROP COLUMN IF EXISTS stamp_file_id;`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user