What this page does
This detail page edits one existing monthly-limit rule. Operators use it to change thresholds, matching flags, and the saved active status for a rule that already exists.
Loading behavior
The page loads the selected rule by the route ID before the form is shown. While the record is loading, the page shows a circular progress indicator. If the backend does not return a detail record, the verified page keeps the loading/progress state rather than showing a dedicated not-found message.
Important behavior
Edit mode really persists Is Active
Unlike the create page, the detail page saves Is Active as part of the update. Use this page or the list status toggle when the stored active/disabled state must be changed.
The same Do Not Use logic stays active in edit mode
- both switches off: count and amount both apply
Do Not Use By Amount: count-only ruleDo Not Use Deposit Count: amount-only rule- both on: FE guidance treats the rule as universal
Deactivation triggers backend cleanup logic
When a rule is saved inactive, the backend attempts an extra cleanup path for linked user assignments. The verified cleanup query is narrow and should not be treated as a guarantee that every linked user assignment for the limit is removed. If assignment cleanup matters operationally, verify user assignments after disabling a rule.
Validation and save flow
- The edit form pre-fills values from the saved rule.
- The verified edit form does not define a frontend validation schema.
- The backend requires the rule ID, all threshold values,
Is Active, and the twoDo Not Useflags. Saveis disabled while the frontend submit state is active.- On success, the page shows a success toast and returns through browser history.
- On failure, the page shows a generic failure toast and stays on the form.
Cancelreturns through browser history without submitting unsaved edits.- The backend detail and update actions are authenticated. The update action is audit-tracked, but the separate permission middleware is commented out in the verified route.