kaui 4.0.24 → 4.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/images/kaui/blocking-states/shield-white.svg +3 -0
  4. data/app/assets/images/kaui/timeline/block.svg +4 -0
  5. data/app/assets/stylesheets/kaui/auth_pages.css +9 -0
  6. data/app/assets/stylesheets/kaui/kaui.css +0 -206
  7. data/app/assets/stylesheets/kaui/subscription.css +38 -0
  8. data/app/assets/stylesheets/kaui/tags.css +7 -7
  9. data/app/controllers/kaui/account_timelines_controller.rb +24 -6
  10. data/app/controllers/kaui/accounts_controller.rb +24 -1
  11. data/app/controllers/kaui/bundles_controller.rb +14 -0
  12. data/app/controllers/kaui/subscriptions_controller.rb +14 -0
  13. data/app/helpers/kaui/date_helper.rb +12 -0
  14. data/app/helpers/kaui/exception_helper.rb +1 -1
  15. data/app/services/dependencies/aviate.rb +7 -4
  16. data/app/views/kaui/account_timelines/show.html.erb +247 -88
  17. data/app/views/kaui/accounts/_billing_details.html.erb +13 -1
  18. data/app/views/kaui/accounts/_billing_info.html.erb +5 -1
  19. data/app/views/kaui/accounts/block.html.erb +16 -0
  20. data/app/views/kaui/admin_allowed_users/_form.html.erb +5 -1
  21. data/app/views/kaui/bundles/block.html.erb +16 -0
  22. data/app/views/kaui/components/blocking_state_form/_about_panel.html.erb +9 -0
  23. data/app/views/kaui/components/blocking_state_form/_fields.html.erb +79 -0
  24. data/app/views/kaui/layouts/kaui_account_navbar.html.erb +1 -0
  25. data/app/views/kaui/layouts/kaui_account_sidebar.html.erb +1 -0
  26. data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +24 -0
  27. data/app/views/kaui/subscriptions/block.html.erb +16 -0
  28. data/config/locales/en.yml +4 -0
  29. data/config/routes.rb +6 -0
  30. data/lib/kaui/version.rb +1 -1
  31. metadata +26 -5
@@ -6,6 +6,7 @@
6
6
  <%= link_to 'Account', kaui_engine.account_path(params[:account_id]), :class => (params[:controller].ends_with?('accounts') ? 'current' : 'non-current') %>
7
7
  <% if aviate_plugin_installed %>
8
8
  <%= link_to 'Wallets', aviate_engine.account_wallets_path(params[:account_id]), :class => (params[:controller].ends_with?('wallets') ? 'current' : 'non-current') %>
9
+ <%= link_to 'Usage', aviate_engine.account_usage_index_path(params[:account_id]), :class => (params[:controller].ends_with?('usage') ? 'current' : 'non-current') %>
9
10
  <% end %>
10
11
  <%= link_to 'Subscriptions', kaui_engine.account_bundles_path(params[:account_id]), :class => (params[:controller].ends_with?('bundles') ? 'current' : 'non-current') %>
11
12
  <%= link_to 'Invoices', kaui_engine.account_invoices_path(params[:account_id]), :class => (params[:controller].ends_with?('invoices') ? 'current' : 'non-current') %>
@@ -15,6 +15,7 @@
15
15
 
16
16
  <% if aviate_plugin_installed %>
17
17
  <% menu_items << { label: 'Wallets', path: aviate_engine.account_wallets_path(params[:account_id]), controller_suffix: 'wallets', icon_path: 'kaui/sidebar/invoices.svg' } %>
18
+ <% menu_items << { label: 'Usage', path: aviate_engine.account_usage_index_path(params[:account_id]), controller_suffix: 'usage', icon_path: 'kaui/sidebar/subscriptions.svg' } %>
18
19
  <% end %>
19
20
 
20
21
  <% if current_user.root? %>
@@ -215,6 +215,14 @@
215
215
  path: kaui_engine.record_usage_path(id: sub.subscription_id),
216
216
  icon: "kaui/subscription/change.svg"
217
217
  } %>
218
+
219
+ <% if aviate_plugin_installed %>
220
+ <% menu_items << {
221
+ label: "View Usage",
222
+ path: aviate_engine.usage_subscription_path(id: sub.subscription_id),
223
+ icon: "kaui/subscription/change.svg"
224
+ } %>
225
+ <% end %>
218
226
  <% end %>
219
227
 
220
228
  <% if can?(:transfer, Kaui::Bundle) && sub.product_category != 'ADD_ON' %>
@@ -235,6 +243,22 @@
235
243
  } %>
236
244
  <% end %>
237
245
 
246
+ <% if can?(:pause_resume, Kaui::Subscription) && sub.product_category != 'ADD_ON' %>
247
+ <% menu_items << {
248
+ label: "Create blocking state (bundle)",
249
+ path: kaui_engine.block_bundle_path(account_id: bundle.account_id, id: bundle.bundle_id),
250
+ icon: "kaui/subscription/pause.svg"
251
+ } %>
252
+ <% end %>
253
+
254
+ <% if can?(:pause_resume, Kaui::Subscription) %>
255
+ <% menu_items << {
256
+ label: "Create blocking state (subscription)",
257
+ path: kaui_engine.block_subscription_path(account_id: bundle.account_id, id: sub.subscription_id),
258
+ icon: "kaui/subscription/pause.svg"
259
+ } %>
260
+ <% end %>
261
+
238
262
  <% if menu_items.any? %>
239
263
  <%= render partial: "kaui/components/menu_dropdown/menu_dropdown", locals: {
240
264
  variant: "btn-light",
@@ -0,0 +1,16 @@
1
+ <div class="register kaui-subscription-new">
2
+ <div class="d-flex justify-content-center flex-wrap" style="gap: 2rem; max-width: 60.5rem; margin: 0 auto;">
3
+ <h5 class="add-account-title border-bottom pb-3 mb-3" style="flex: 0 0 100%;">
4
+ <span class="icon-container">
5
+ <%= image_tag "kaui/timeline/block.svg", width: 20, height: 20 %>
6
+ </span>
7
+ Create blocking state
8
+ </h5>
9
+ <div style="max-width: 37.5rem; width: 100%;">
10
+ <%= form_tag do_block_subscription_path(:id => @subscription.subscription_id, :account_id => @subscription.account_id), :class => 'form-horizontal', :method => :put do %>
11
+ <%= render "kaui/components/blocking_state_form/fields", :applies_to_type => 'Subscription', :applies_to_id => @subscription.subscription_id %>
12
+ <% end %>
13
+ </div>
14
+ <%= render "kaui/components/blocking_state_form/about_panel" %>
15
+ </div>
16
+ </div>
@@ -44,6 +44,10 @@ en:
44
44
  loading_data_from_server: "Loading data from server"
45
45
  requested_amount_colon: "Requested amount: "
46
46
 
47
+ blocking_state_about_panel:
48
+ title: "About Blocking States"
49
+ description: "Blocking states restrict actions on accounts, bundles, or subscriptions. They are enforced by specific services such as entitlement, billing, or custom services."
50
+
47
51
  advanced_search:
48
52
  title: "Advanced Search"
49
53
  search_field: "Search field"
data/config/routes.rb CHANGED
@@ -40,6 +40,8 @@ Kaui::Engine.routes.draw do
40
40
  post '/trigger_invoice' => 'accounts#trigger_invoice', :as => 'trigger_invoice'
41
41
  put '/link_to_parent' => 'accounts#link_to_parent', :as => 'link_to_parent'
42
42
  delete '/unlink_to_parent' => 'accounts#unlink_to_parent', :as => 'unlink_to_parent'
43
+ get '/block' => 'accounts#block', :as => 'block_account'
44
+ put '/do_block' => 'accounts#do_block', :as => 'do_block_account'
43
45
 
44
46
  scope '/account_tags' do
45
47
  get '/' => 'account_tags#index', :as => 'account_tags'
@@ -134,6 +136,8 @@ Kaui::Engine.routes.draw do
134
136
  get '/:id/pause_resume', to: 'bundles#pause_resume', as: 'pause_resume_bundle'
135
137
  put '/:id/do_transfer', to: 'bundles#do_transfer', as: 'do_transfer_bundle'
136
138
  get '/:id/transfer', to: 'bundles#transfer', as: 'transfer_bundle'
139
+ put '/:id/do_block', to: 'bundles#do_block', as: 'do_block_bundle'
140
+ get '/:id/block', to: 'bundles#block', as: 'block_bundle'
137
141
  get '/:id' => 'bundles#restful_show', :as => 'bundle'
138
142
  end
139
143
 
@@ -141,6 +145,8 @@ Kaui::Engine.routes.draw do
141
145
  post '/:id/tags' => 'subscriptions#update_tags', :as => 'update_subscriptions_tags'
142
146
  get '/:id/edit_bcd' => 'subscriptions#edit_bcd', :as => 'edit_bcd'
143
147
  put '/:id/update_bcd' => 'subscriptions#update_bcd', :as => 'update_bcd'
148
+ get '/:id/block' => 'subscriptions#block', :as => 'block_subscription'
149
+ put '/:id/do_block' => 'subscriptions#do_block', :as => 'do_block_subscription'
144
150
  get '/:id/edit_quantity' => 'subscriptions#edit_quantity', :as => 'edit_quantity'
145
151
  put '/:id/update_quantity' => 'subscriptions#update_quantity', :as => 'update_quantity'
146
152
  get '/:id/record_usage' => 'subscriptions#record_usage', :as => 'record_usage'
data/lib/kaui/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kaui
4
- VERSION = '4.0.24'
4
+ VERSION = '4.0.26'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.24
4
+ version: 4.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-05 00:00:00.000000000 Z
11
+ date: 2026-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: csv
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: devise
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +240,14 @@ dependencies:
226
240
  requirements:
227
241
  - - "~>"
228
242
  - !ruby/object:Gem::Version
229
- version: '7.0'
243
+ version: '7.2'
230
244
  type: :runtime
231
245
  prerelease: false
232
246
  version_requirements: !ruby/object:Gem::Requirement
233
247
  requirements:
234
248
  - - "~>"
235
249
  - !ruby/object:Gem::Version
236
- version: '7.0'
250
+ version: '7.2'
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: spinjs-rails
239
253
  requirement: !ruby/object:Gem::Requirement
@@ -309,6 +323,7 @@ files:
309
323
  - app/assets/images/kaui/account/purchase.svg
310
324
  - app/assets/images/kaui/account/refresh.svg
311
325
  - app/assets/images/kaui/arrow.svg
326
+ - app/assets/images/kaui/blocking-states/shield-white.svg
312
327
  - app/assets/images/kaui/card.svg
313
328
  - app/assets/images/kaui/copy.svg
314
329
  - app/assets/images/kaui/dashboard/aviate.svg
@@ -376,6 +391,7 @@ files:
376
391
  - app/assets/images/kaui/subscription/pause.svg
377
392
  - app/assets/images/kaui/subscription/transfer.svg
378
393
  - app/assets/images/kaui/timeline/authorize.svg
394
+ - app/assets/images/kaui/timeline/block.svg
379
395
  - app/assets/images/kaui/timeline/capture.svg
380
396
  - app/assets/images/kaui/timeline/chargeback.svg
381
397
  - app/assets/images/kaui/timeline/credit.svg
@@ -541,6 +557,7 @@ files:
541
557
  - app/views/kaui/accounts/_payment_methods.html.erb
542
558
  - app/views/kaui/accounts/_personal_details.html.erb
543
559
  - app/views/kaui/accounts/_personal_info.html.erb
560
+ - app/views/kaui/accounts/block.html.erb
544
561
  - app/views/kaui/accounts/edit.html.erb
545
562
  - app/views/kaui/accounts/index.html.erb
546
563
  - app/views/kaui/accounts/new.html.erb
@@ -580,6 +597,7 @@ files:
580
597
  - app/views/kaui/bundle_tags/edit.html.erb
581
598
  - app/views/kaui/bundles/_bundle_details.html.erb
582
599
  - app/views/kaui/bundles/_bundle_filterbar.html.erb
600
+ - app/views/kaui/bundles/block.html.erb
583
601
  - app/views/kaui/bundles/index.html.erb
584
602
  - app/views/kaui/bundles/pause_resume.html.erb
585
603
  - app/views/kaui/bundles/transfer.html.erb
@@ -587,6 +605,8 @@ files:
587
605
  - app/views/kaui/chargebacks/new.html.erb
588
606
  - app/views/kaui/charges/_form.html.erb
589
607
  - app/views/kaui/charges/new.html.erb
608
+ - app/views/kaui/components/blocking_state_form/_about_panel.html.erb
609
+ - app/views/kaui/components/blocking_state_form/_fields.html.erb
590
610
  - app/views/kaui/components/breadcrumb/_breadcrumb.html.erb
591
611
  - app/views/kaui/components/button/_button.html.erb
592
612
  - app/views/kaui/components/dashboard/_card.html.erb
@@ -652,6 +672,7 @@ files:
652
672
  - app/views/kaui/subscriptions/_form.html.erb
653
673
  - app/views/kaui/subscriptions/_subscriptions_table.html.erb
654
674
  - app/views/kaui/subscriptions/_view_json_modal.html.erb
675
+ - app/views/kaui/subscriptions/block.html.erb
655
676
  - app/views/kaui/subscriptions/edit.html.erb
656
677
  - app/views/kaui/subscriptions/edit_bcd.erb
657
678
  - app/views/kaui/subscriptions/edit_quantity.erb
@@ -707,7 +728,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
707
728
  requirements:
708
729
  - - ">="
709
730
  - !ruby/object:Gem::Version
710
- version: 2.7.0
731
+ version: 3.1.0
711
732
  required_rubygems_version: !ruby/object:Gem::Requirement
712
733
  requirements:
713
734
  - - ">="