Skip to content

Support edit Subscription quantity#614

Open
tungleduyxyz wants to merge 9 commits into
masterfrom
kaui_6.17
Open

Support edit Subscription quantity#614
tungleduyxyz wants to merge 9 commits into
masterfrom
kaui_6.17

Conversation

@tungleduyxyz

Copy link
Copy Markdown
Contributor

@tungleduyxyz tungleduyxyz force-pushed the kaui_6.17 branch 2 times, most recently from ab79c47 to 8dc994d Compare June 15, 2026 14:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds new subscription UI/actions in Kaui to (1) update subscription quantity and (2) record usage for usage-based subscriptions, plus a “View JSON” modal and improved date/tooling UI to support subscription troubleshooting.

Changes:

  • Add edit_quantity / update_quantity controller actions + view and wire them into the subscriptions dropdown menu.
  • Add record_usage / create_usage controller actions + view with validation and a menu entry only for usage-based subscriptions.
  • Add show_json endpoint + modal UI to view subscription JSON, and update tooltip/popover behavior for ISO date display.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/test_helper.rb Adds minitest/mock support for new tests.
test/functional/kaui/subscriptions_controller_test.rb Adds functional coverage for quantity update, usage recording, and JSON endpoint behavior.
Gemfile Points killbill-client to a specific git branch to support new API calls.
config/routes.rb Adds routes for quantity, usage, and JSON actions.
app/views/kaui/subscriptions/record_usage.erb Adds record-usage form UI + client-side validation.
app/views/kaui/subscriptions/edit_quantity.erb Adds update-quantity form UI.
app/views/kaui/subscriptions/_view_json_modal.html.erb Adds modal + AJAX logic to fetch and display subscription JSON.
app/views/kaui/subscriptions/_subscriptions_table.html.erb Adds dropdown entries (Update Quantity / Record Usage / View JSON) and ISO popovers for dates.
app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb Allows dropdown items to pass data (and optional HTTP method).
app/models/kaui/usage.rb Introduces Kaui::Usage model wrapper for usage recording.
app/helpers/kaui/subscription_helper.rb Adds subscription_has_usage? to detect usage-based subscriptions.
app/controllers/kaui/subscriptions_controller.rb Implements quantity update, usage record flow, and JSON passthrough action.
app/assets/javascripts/kaui/kaui_override.js Deprecates old popover impl in favor of tooltip implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/controllers/kaui/subscriptions_controller.rb
Comment thread app/controllers/kaui/subscriptions_controller.rb
Comment thread app/views/kaui/subscriptions/edit_quantity.erb
tungleduyxyz and others added 4 commits June 15, 2026 23:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants