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

@@ -411,7 +411,7 @@ The governing law shall be the laws of the Federal Democratic Republic of Ethiop
a(
"effectiveness",
"Contract Effectiveness",
`The contract shall come into full force and effect on the date when the contract is signed by the parties and witnesses.`,
`The contract shall come into full force and effect on the date when the contract is signed by both parties.`,
),
],
};
@@ -550,7 +550,7 @@ Notwithstanding the above, the Service Provider may revise transport tariffs due
a(
"effectiveness",
"Contract Effectiveness",
`The contract is valid once signed by both parties and witnesses.`,
`The contract is valid once signed by both parties.`,
),
a(
"duration",
@@ -698,7 +698,7 @@ If terminated for cause, the terminating party must issue a 15-day written notic
a(
"effectiveness",
"Contract Effectiveness",
`The contract is valid once signed by both parties and witnesses.`,
`The contract is valid once signed by both parties.`,
),
a(
"duration",
@@ -838,7 +838,7 @@ Notwithstanding the above, the Service Provider may revise transport tariffs due
a(
"effectiveness",
"Contract Effectiveness",
`The contract is valid once signed by both parties and witnesses.`,
`The contract is valid once signed by both parties.`,
),
a(
"duration",

View File

@@ -64,6 +64,9 @@ export const BOOKING_PERMISSIONS: FreightPermissionSeed[] = [
perm('a1000001-0001-4000-8000-000000000012', 'edr_freight_app:fleet:manage', 'Manage fleet'),
perm('a1000001-0001-4000-8000-000000000013', 'edr_freight_app:admin', 'Freight administration'),
perm('a1000001-0001-4000-8000-000000000024', 'edr_freight_app:bookings:create', 'Create booking'),
// Header alarm for the document-review deadline: its own key so only the
// position types that actually decide operation requests are alerted.
perm('a1000001-0001-4000-8000-000000000025', 'edr_freight_app:bookings:doc_review_alert', 'See document-review deadline alarm'),
];
/**
@@ -401,6 +404,7 @@ export const FREIGHT_PERMS = {
reviewDocuments: 'edr_freight_app:bookings:review_documents',
uploadClearanceOutput: 'edr_freight_app:bookings:upload_clearance_output',
finalizeClearance: 'edr_freight_app:bookings:finalize_clearance',
docReviewAlert: 'edr_freight_app:bookings:doc_review_alert',
},
contracts: {
view: 'edr_freight_app:contracts:view',
@@ -781,6 +785,9 @@ export const ROLE_PERMISSION_PRESETS = {
operationsOfficer: [
FREIGHT_PERMS.bookings.view,
FREIGHT_PERMS.bookings.operations,
// They are the ones who accept/reject operation requests, so they are the
// ones the doc-review countdown is for.
FREIGHT_PERMS.bookings.docReviewAlert,
FREIGHT_PERMS.trainScheduling.view,
FREIGHT_PERMS.trainScheduling.create,
FREIGHT_PERMS.trainScheduling.update,