mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 21:08:12 +00:00
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:
@@ -81,6 +81,32 @@ export const WagonTransferFulfill = () =>
|
||||
export const WagonTransferHistoryAll = () =>
|
||||
BookingStaff(FREIGHT_PERMS.wagons.transferHistoryAll);
|
||||
|
||||
/**
|
||||
* Open the transfer-requests desk. `wagons:view` is accepted as a one-of
|
||||
* fallback so staff who could already reach the queue keep it without a
|
||||
* re-grant — same pattern the granular fleet keys use.
|
||||
*/
|
||||
export const WagonTransferView = () =>
|
||||
BookingStaff([FREIGHT_PERMS.wagons.transferView, FREIGHT_PERMS.wagons.view]);
|
||||
|
||||
/** Withdraw a request that has not moved any wagon yet. */
|
||||
export const WagonTransferCancel = () =>
|
||||
BookingStaff([
|
||||
FREIGHT_PERMS.wagons.transferCancel,
|
||||
FREIGHT_PERMS.wagons.transferRequest,
|
||||
]);
|
||||
|
||||
/**
|
||||
* End a request short of the requested count. Whoever may move wagons may also
|
||||
* declare the yard has no more to give, so fulfil is accepted alongside the
|
||||
* dedicated key.
|
||||
*/
|
||||
export const WagonTransferCloseShort = () =>
|
||||
BookingStaff([
|
||||
FREIGHT_PERMS.wagons.transferCloseShort,
|
||||
FREIGHT_PERMS.wagons.transferFulfill,
|
||||
]);
|
||||
|
||||
/** Org-administration endpoints (user mgmt, billing config, company CRUD, settings). */
|
||||
export const FreightAdmin = () => BookingStaff(FREIGHT_PERMS.admin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user