Problem/Motivation

The dashboard's inline "Save" buttons for monthly budget and alert threshold do nothing when clicked — AiMeteringController::dashboard() never attaches the ai_metering_htmx library, so the hx-post attributes are inert. The two inputs also share a CSS class, making the budget button's value selector ambiguous.

Steps to reproduce

  1. Visit /admin/reports/ai-metering.
  2. Change an editor's budget or threshold and click Save.
  3. Nothing happens.

Proposed resolution

  • Add ai_metering_htmx as a dependency of ai_metering_dashboard.
  • Give the budget input its own class for an unambiguous selector.
  • Add test coverage for both endpoints.

AI assistance

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

codeitwisely created an issue. See original summary.

codeitwisely’s picture

Title: **"Monthly budget and alert threshold Save buttons don't persist changes"** » Monthly budget and alert threshold Save buttons don't persist changes

  • codeitwisely committed 828bf4b3 on 1.0.x
    Issue #3611735 by codeitwisely: Fix inert budget/threshold Save buttons...
codeitwisely’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.