Add override modal wired to UpsertUserBudgetCapOverrides mutation

What does this MR do and why?

Integrate user credit cap overrides modal addition with the UpsertUserBudgetCapOverrides mutation.

MR series

# MR Status
1 Add UserOverridesList component with data fetching and pagination ✅ Merged
2 Replace JSON output with GlTableLite in UserOverridesList ✅ Merged
3 Add Save and Remove mutation wiring to UserOverridesList ✅ Merged
4 Add override modal UI ✅ Merged
5 Add override modal wired to UpsertUserBudgetCapOverrides mutation ➡️ This MR

References

Screenshots or screen recordings

note: the recording uses this patch to submit a negative number:

diff --git a/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue b/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue
index f684d6ea565e..93d61c0f8b12 100644
--- a/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue
+++ b/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue
@@ -160,7 +160,7 @@ export default {
             id="add-cap-override-cap-input"
             v-model.number="cap"
             type="number"
-            min="0"
+            min="-100"
             step="1"
             required
             :disabled="isSaving"

How to set up and validate locally

Prerequisites: self-managed GitLab instance with the Credits Dashboard enabled.

  1. Enable SM instance.
  2. Open http://localhost:3000/admin/gitlab_credits_dashboard/credit_caps.
  3. Click the Add override button in the "Per-user cap overrides" card header.
  4. Verify the modal opens with a user input field and a cap/enabled inputs.
  5. Enter a user GID, cap value, and toggle status.
  6. Click Add override — verify the override is created via the UpsertUserBudgetCapOverrides mutation and the list refreshes.
  7. Ensure that:
    • On save the modal closes
    • On cancel the modal closes
    • On open the form is cleared

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

-

Edited by Kos Palchyk

Merge request reports

Loading
Loading