mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 06:28:12 +00:00
feat(wagons): audited maintenance/availability toggle
This commit is contained in:
@@ -644,6 +644,13 @@ export const FLEET_RAIL_PERMISSIONS: FreightPermissionSeed[] = [
|
||||
"edr_freight_app:wagons:hard_delete",
|
||||
"Permanently delete wagon",
|
||||
),
|
||||
// Maintenance ⇄ availability flip on the wagons desk — its own key so
|
||||
// operations/OCC can flip readiness without holding full wagon edit.
|
||||
perm(
|
||||
"e1b00001-0001-4000-8000-00000000000c",
|
||||
"edr_freight_app:wagons:status_toggle",
|
||||
"Flip wagon between maintenance and available",
|
||||
),
|
||||
perm(
|
||||
"e1c00001-0001-4000-8000-000000000001",
|
||||
"edr_freight_app:trains:view",
|
||||
@@ -1511,6 +1518,8 @@ export const FREIGHT_PERMS = {
|
||||
transferView: "edr_freight_app:wagons:transfer_view",
|
||||
/** Withdraw a request that has not moved any wagon yet. */
|
||||
transferCancel: "edr_freight_app:wagons:transfer_cancel",
|
||||
/** Maintenance ⇄ availability flip on the wagons desk (audited). */
|
||||
statusToggle: "edr_freight_app:wagons:status_toggle",
|
||||
/** End a request short — anyone who can fulfil may also do this. */
|
||||
transferCloseShort: "edr_freight_app:wagons:transfer_close_short",
|
||||
// Admin: read every staffer's transfer history. Without it, a user only sees
|
||||
@@ -1777,6 +1786,7 @@ const FLEET_GRANULAR_KEYS: string[] = [
|
||||
FREIGHT_PERMS.wagons.create,
|
||||
FREIGHT_PERMS.wagons.update,
|
||||
FREIGHT_PERMS.wagons.delete,
|
||||
FREIGHT_PERMS.wagons.statusToggle,
|
||||
FREIGHT_PERMS.trains.view,
|
||||
FREIGHT_PERMS.trains.create,
|
||||
FREIGHT_PERMS.trains.update,
|
||||
|
||||
Reference in New Issue
Block a user