feat: implement wagon transfer management modals and page

- Add TransferFulfillModal for fulfilling wagon transfer requests.
- Create TransferRequestFormModal for filing new wagon transfer requests.
- Introduce TransferCloseShortModal for closing requests that cannot be fully fulfilled.
- Develop WagonTransfersPage to manage and display wagon transfer requests.
- Implement utility functions for handling wagon transfer request data and UI components.
- Enhance UI with Mantine components for better user experience.
This commit is contained in:
Marshal
2026-07-26 15:11:50 +00:00
parent 9a1c8e5603
commit 9b13fa2ac6
40 changed files with 2584 additions and 809 deletions

View File

@@ -40,6 +40,14 @@ export class WagonTransferRequest extends BaseEntity {
@Column({ name: 'quantity', type: 'int' })
quantity!: number;
/**
* How many have actually moved so far. OCC sends what the yard can spare,
* whenever it can — the request stays open until this reaches `quantity` or
* OCC closes it short.
*/
@Column({ name: 'fulfilled_quantity', type: 'int', default: 0 })
fulfilledQuantity!: number;
@Column({
name: 'status',
type: 'varchar',
@@ -54,9 +62,17 @@ export class WagonTransferRequest extends BaseEntity {
@Column({ name: 'fulfilled_by_user_id', type: 'uuid', nullable: true })
fulfilledByUserId?: string | null;
/** When the LAST transfer against this request ran (not necessarily the full count). */
@Column({ name: 'fulfilled_at', type: 'timestamptz', nullable: true })
fulfilledAt?: Date | null;
/** Set when OCC ended the request with fewer wagons than asked for. */
@Column({ name: 'closed_short_at', type: 'timestamptz', nullable: true })
closedShortAt?: Date | null;
@Column({ name: 'closed_short_by_user_id', type: 'uuid', nullable: true })
closedShortByUserId?: string | null;
@Column({ name: 'note', type: 'text', nullable: true })
note?: string | null;