kaui 4.0.11 → 4.0.13
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kaui/kaui_override.js +21 -0
- data/app/assets/stylesheets/kaui/subscription.css +75 -0
- data/app/assets/stylesheets/kaui/tags.css +6 -3
- data/app/controllers/kaui/account_timelines_controller.rb +3 -3
- data/app/controllers/kaui/accounts_controller.rb +52 -52
- data/app/controllers/kaui/admin_allowed_users_controller.rb +29 -29
- data/app/controllers/kaui/admin_controller.rb +2 -2
- data/app/controllers/kaui/admin_tenants_controller.rb +89 -81
- data/app/controllers/kaui/audit_logs_controller.rb +1 -1
- data/app/controllers/kaui/bundles_controller.rb +53 -5
- data/app/controllers/kaui/chargebacks_controller.rb +1 -1
- data/app/controllers/kaui/charges_controller.rb +5 -2
- data/app/controllers/kaui/credits_controller.rb +1 -1
- data/app/controllers/kaui/custom_fields_controller.rb +11 -11
- data/app/controllers/kaui/engine_controller_util.rb +5 -5
- data/app/controllers/kaui/home_controller.rb +6 -2
- data/app/controllers/kaui/invoices_controller.rb +6 -4
- data/app/controllers/kaui/payment_methods_controller.rb +5 -5
- data/app/controllers/kaui/payments_controller.rb +19 -19
- data/app/controllers/kaui/queues_controller.rb +6 -6
- data/app/controllers/kaui/registrations_controller.rb +1 -1
- data/app/controllers/kaui/role_definitions_controller.rb +2 -2
- data/app/controllers/kaui/sessions_controller.rb +1 -1
- data/app/controllers/kaui/subscriptions_controller.rb +15 -14
- data/app/controllers/kaui/tag_definitions_controller.rb +1 -1
- data/app/controllers/kaui/tenants_controller.rb +2 -2
- data/app/controllers/kaui/transactions_controller.rb +6 -6
- data/app/helpers/kaui/account_helper.rb +9 -7
- data/app/helpers/kaui/exception_helper.rb +7 -5
- data/app/helpers/kaui/payment_helper.rb +2 -9
- data/app/helpers/kaui/plugin_helper.rb +3 -5
- data/app/helpers/kaui/subscription_helper.rb +46 -30
- data/app/helpers/kaui/uuid_helper.rb +1 -1
- data/app/models/kaui/account.rb +4 -3
- data/app/models/kaui/admin_tenant.rb +2 -2
- data/app/models/kaui/allowed_user.rb +3 -1
- data/app/models/kaui/allowed_user_tenant.rb +2 -2
- data/app/models/kaui/audit_log.rb +1 -1
- data/app/models/kaui/bundle.rb +11 -5
- data/app/models/kaui/invoice.rb +1 -1
- data/app/models/kaui/invoice_payment.rb +2 -2
- data/app/models/kaui/killbill_authenticatable.rb +2 -39
- data/app/models/kaui/killbill_registerable.rb +3 -11
- data/app/models/kaui/overdue.rb +5 -2
- data/app/models/kaui/payment.rb +1 -1
- data/app/models/kaui/payment_state.rb +3 -1
- data/app/models/kaui/rails_methods.rb +2 -2
- data/app/models/kaui/tag_definition.rb +2 -2
- data/app/models/kaui/tenant.rb +2 -1
- data/app/models/kaui/transaction.rb +1 -1
- data/app/services/dependencies/kenui.rb +1 -1
- data/app/views/kaui/accounts/_account_details.html.erb +1 -1
- data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +25 -1
- data/app/views/kaui/bundles/_bundle_filterbar.html.erb +119 -0
- data/app/views/kaui/bundles/index.html.erb +28 -3
- data/app/views/kaui/components/search_input/_search_input.html.erb +39 -1
- data/app/views/kaui/invoices/index.html.erb +15 -11
- data/app/views/kaui/refunds/_form.html.erb +3 -11
- data/app/views/kaui/subscriptions/_form.html.erb +7 -1
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +12 -1
- data/config/routes.rb +79 -79
- data/lib/devise/models/killbill_authenticatable.rb +38 -0
- data/lib/devise/models/killbill_registerable.rb +9 -0
- data/lib/generators/kaui/install/install_generator.rb +1 -4
- data/lib/kaui/version.rb +1 -1
- data/lib/kaui.rb +7 -7
- metadata +5 -2
|
@@ -58,6 +58,15 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
</th>
|
|
61
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 6 : 7 %>">
|
|
62
|
+
<div class="header-content">
|
|
63
|
+
<span class="header-text">Quantity</span>
|
|
64
|
+
<div class="sort-icons">
|
|
65
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
66
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</th>
|
|
61
70
|
<th></th>
|
|
62
71
|
</tr>
|
|
63
72
|
</thead>
|
|
@@ -95,7 +104,7 @@
|
|
|
95
104
|
</div>
|
|
96
105
|
</td>
|
|
97
106
|
<% end %>
|
|
98
|
-
<td><%= humanized_subscription_plan_or_product_name(sub,
|
|
107
|
+
<td><%= humanized_subscription_plan_or_product_name(sub, catalog_for_subscription(sub, catalogs)) %></td>
|
|
99
108
|
<td>
|
|
100
109
|
<span id="<%= sub.subscription_id %>-popover" class="object-id-popover category-bedge" data-id="<%= sub.subscription_id %>">
|
|
101
110
|
<%= humanized_subscription_product_category(sub) %>
|
|
@@ -105,6 +114,7 @@
|
|
|
105
114
|
<td><%= humanized_subscription_start_date(sub, account) %></td>
|
|
106
115
|
<td><%= humanized_subscription_cancelled_information(sub, account) %></td>
|
|
107
116
|
<td><%= humanized_subscription_charged_through_date(sub, account) %></td>
|
|
117
|
+
<td><%= sub.quantity || 1 %></td>
|
|
108
118
|
<td class="text-center">
|
|
109
119
|
<% if subscription_future_cancelled?(sub, account) %>
|
|
110
120
|
<%= link_to 'Reinstate', kaui_engine.reinstate_path(:id => sub.subscription_id), :method => :put, :class => 'btn btn-xs' %>
|
|
@@ -217,6 +227,7 @@
|
|
|
217
227
|
null,
|
|
218
228
|
null,
|
|
219
229
|
null,
|
|
230
|
+
null,
|
|
220
231
|
{ "orderable": false }
|
|
221
232
|
],
|
|
222
233
|
"drawCallback": function() {
|
data/config/routes.rb
CHANGED
|
@@ -25,49 +25,49 @@ Kaui::Engine.routes.draw do
|
|
|
25
25
|
get '/500', to: 'errors#show', code: 500
|
|
26
26
|
|
|
27
27
|
scope '/accounts' do
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
get '/pagination' => 'accounts#pagination', :as => 'accounts_pagination'
|
|
29
|
+
get '/validate_external_key' => 'accounts#validate_external_key', :as => 'accounts_validate_external_key'
|
|
30
|
+
get '/download' => 'accounts#download', :as => 'download_accounts'
|
|
31
31
|
get '/export/:account_id', to: 'accounts#export_account', as: 'export_account'
|
|
32
32
|
|
|
33
33
|
scope '/email_notifications' do
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
post '/' => 'accounts#set_email_notifications_configuration', :as => 'email_notifications_configuration'
|
|
35
|
+
get '/events_to_consider' => 'accounts#events_to_consider', :as => 'email_notification_events_to_consider'
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
scope '/:account_id' do
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
get '/next_invoice_date' => 'accounts#next_invoice_date', :as => 'next_invoice_date'
|
|
40
|
+
post '/trigger_invoice' => 'accounts#trigger_invoice', :as => 'trigger_invoice'
|
|
41
|
+
put '/link_to_parent' => 'accounts#link_to_parent', :as => 'link_to_parent'
|
|
42
|
+
delete '/unlink_to_parent' => 'accounts#unlink_to_parent', :as => 'unlink_to_parent'
|
|
43
43
|
|
|
44
44
|
scope '/account_tags' do
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
get '/' => 'account_tags#index', :as => 'account_tags'
|
|
46
|
+
get '/edit' => 'account_tags#edit', :as => 'edit_account_tags'
|
|
47
|
+
post '/edit' => 'account_tags#update', :as => 'update_account_tags'
|
|
48
48
|
end
|
|
49
49
|
scope '/bundle_tags' do
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
get '/edit' => 'bundle_tags#edit', :as => 'edit_bundle_tags'
|
|
51
|
+
post '/edit' => 'bundle_tags#update', :as => 'update_bundle_tags'
|
|
52
52
|
end
|
|
53
53
|
scope '/invoice_tags' do
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
get '/edit' => 'invoice_tags#edit', :as => 'edit_invoice_tags'
|
|
55
|
+
post '/edit' => 'invoice_tags#update', :as => 'update_invoice_tags'
|
|
56
56
|
end
|
|
57
57
|
scope '/timeline' do
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
get '/' => 'account_timelines#show', :as => 'account_timeline'
|
|
59
|
+
get '/download' => 'account_timelines#download', :as => 'download_account_timeline'
|
|
60
60
|
end
|
|
61
61
|
scope '/custom_fields' do
|
|
62
|
-
|
|
62
|
+
get '/' => 'account_custom_fields#index', :as => 'account_custom_fields'
|
|
63
63
|
end
|
|
64
64
|
scope '/account_children' do
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
get '/' => 'account_children#index', :as => 'account_children'
|
|
66
|
+
get '/pagination' => 'account_children#pagination', :as => 'account_children_pagination'
|
|
67
67
|
end
|
|
68
68
|
scope '/audit_logs' do
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
get '/history' => 'audit_logs#history', :as => 'audit_logs_history'
|
|
70
|
+
get '/download' => 'audit_logs#download', :as => 'download_audit_logs'
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
end
|
|
@@ -95,38 +95,38 @@ Kaui::Engine.routes.draw do
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
scope '/payment_methods' do
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
get '/validate_external_key' => 'payment_methods#validate_external_key', :as => 'payment_methods_validate_external_key'
|
|
99
|
+
post '/refresh' => 'payment_methods#refresh', :as => 'refresh_payment_methods'
|
|
100
100
|
end
|
|
101
101
|
resources :payment_methods, only: %i[new create show destroy]
|
|
102
102
|
|
|
103
103
|
scope '/invoices' do
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
get '/pagination' => 'invoices#pagination', :as => 'invoices_pagination'
|
|
105
|
+
get '/download' => 'invoices#download', :as => 'download_invoices'
|
|
106
|
+
get '/:id/show_html' => 'invoices#show_html', :as => 'show_html_invoice'
|
|
107
|
+
get '/:number' => 'invoices#restful_show_by_number', :constraints => { number: /\d+/ }
|
|
108
|
+
get '/:id' => 'invoices#restful_show', :as => 'invoice'
|
|
109
|
+
post '/commit' => 'invoices#commit_invoice', :as => 'commit_invoice'
|
|
110
|
+
delete '/void' => 'invoices#void_invoice', :as => 'void_invoice'
|
|
111
111
|
end
|
|
112
112
|
resources :invoices, only: [:index]
|
|
113
113
|
|
|
114
114
|
scope '/invoice_items' do
|
|
115
|
-
|
|
115
|
+
post '/:id/tags' => 'invoice_items#update_tags', :as => 'update_invoice_items_tags'
|
|
116
116
|
end
|
|
117
117
|
resources :invoice_items, only: %i[update destroy]
|
|
118
118
|
|
|
119
119
|
scope '/payments' do
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
get '/pagination' => 'payments#pagination', :as => 'payments_pagination'
|
|
121
|
+
get '/download' => 'payments#download', :as => 'download_payments'
|
|
122
|
+
get '/:id' => 'payments#restful_show', :as => 'payment'
|
|
123
|
+
delete '/:id/cancel_scheduled_payment' => 'payments#cancel_scheduled_payment', :as => 'payment_cancel_scheduled_payment'
|
|
124
124
|
end
|
|
125
125
|
resources :payments, only: [:index]
|
|
126
126
|
|
|
127
127
|
scope '/transactions' do
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
get '/:id' => 'transactions#restful_show', :as => 'transaction'
|
|
129
|
+
put '/fix_transaction_state' => 'transactions#fix_transaction_state', :as => 'fix_transaction_state'
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
scope '/bundles' do
|
|
@@ -134,83 +134,83 @@ Kaui::Engine.routes.draw do
|
|
|
134
134
|
get '/:id/pause_resume', to: 'bundles#pause_resume', as: 'pause_resume_bundle'
|
|
135
135
|
put '/:id/do_transfer', to: 'bundles#do_transfer', as: 'do_transfer_bundle'
|
|
136
136
|
get '/:id/transfer', to: 'bundles#transfer', as: 'transfer_bundle'
|
|
137
|
-
|
|
137
|
+
get '/:id' => 'bundles#restful_show', :as => 'bundle'
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
scope '/subscriptions' do
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
post '/:id/tags' => 'subscriptions#update_tags', :as => 'update_subscriptions_tags'
|
|
142
|
+
get '/:id/edit_bcd' => 'subscriptions#edit_bcd', :as => 'edit_bcd'
|
|
143
|
+
put '/:id/update_bcd' => 'subscriptions#update_bcd', :as => 'update_bcd'
|
|
144
|
+
put '/:id/reinstate' => 'subscriptions#reinstate', :as => 'reinstate'
|
|
145
|
+
get '/validate_external_key' => 'subscriptions#validate_external_key', :as => 'subscriptions_validate_external_key'
|
|
146
|
+
get '/validate_bundle_external_key' => 'subscriptions#validate_bundle_external_key', :as => 'subscriptions_validate_bundle_external_key'
|
|
147
147
|
end
|
|
148
148
|
resources :subscriptions, only: %i[new create show edit update destroy]
|
|
149
149
|
|
|
150
150
|
scope '/tags' do
|
|
151
|
-
|
|
151
|
+
get '/pagination' => 'tags#pagination', :as => 'tags_pagination'
|
|
152
152
|
end
|
|
153
153
|
resources :tags, only: [:index]
|
|
154
154
|
|
|
155
155
|
resources :tag_definitions, only: %i[index new create destroy]
|
|
156
156
|
|
|
157
157
|
scope '/custom_fields' do
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
get '/pagination' => 'custom_fields#pagination', :as => 'custom_fields_pagination'
|
|
159
|
+
get '/check_object_exist' => 'custom_fields#check_object_exist', :as => 'custom_fields_check_object_exist'
|
|
160
160
|
end
|
|
161
161
|
resources :custom_fields, only: %i[index new create check_object_exist]
|
|
162
162
|
|
|
163
163
|
scope '/tenants' do
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
get '/' => 'tenants#index', :as => 'tenants'
|
|
165
|
+
post '/select_tenant' => 'tenants#select_tenant', :as => 'select_tenant'
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
scope '/login_proxy' do
|
|
169
|
-
|
|
169
|
+
get '/check_login' => 'login_proxy#check_login', :as => 'check_login'
|
|
170
170
|
end
|
|
171
171
|
|
|
172
172
|
scope '/home' do
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
get '/' => 'home#index', :as => 'home'
|
|
174
|
+
get '/search' => 'home#search', :as => 'search'
|
|
175
175
|
end
|
|
176
176
|
|
|
177
177
|
scope '/queues' do
|
|
178
|
-
|
|
178
|
+
get '/' => 'queues#index', :as => 'queues'
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
scope '/admin' do
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
get '/' => 'admin#index', :as => 'admin'
|
|
183
|
+
put '/clock' => 'admin#set_clock', :as => 'admin_set_clock'
|
|
184
184
|
end
|
|
185
185
|
|
|
186
186
|
scope '/admin_tenants' do
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
187
|
+
put '/:id/clock' => 'admin_tenants#set_clock', :as => 'admin_tenant_set_clock'
|
|
188
|
+
get '/:id/new_catalog' => 'admin_tenants#new_catalog', :as => 'admin_tenant_new_catalog'
|
|
189
|
+
delete '/:id/delete_catalog' => 'admin_tenants#delete_catalog', :as => 'admin_tenant_delete_catalog'
|
|
190
|
+
get '/:id/new_plan_currency' => 'admin_tenants#new_plan_currency', :as => 'admin_tenant_new_plan_currency'
|
|
191
|
+
get '/:id/new_overdue_config' => 'admin_tenants#new_overdue_config', :as => 'admin_tenant_new_overdue_config'
|
|
192
|
+
post '/upload_catalog' => 'admin_tenants#upload_catalog', :as => 'admin_tenant_upload_catalog'
|
|
193
|
+
post '/display_catalog_xml' => 'admin_tenants#display_catalog_xml', :as => 'admin_tenant_display_catalog_xml'
|
|
194
|
+
post '/display_overdue_xml' => 'admin_tenants#display_overdue_xml', :as => 'admin_tenant_display_overdue_xml'
|
|
195
|
+
post '/create_simple_plan' => 'admin_tenants#create_simple_plan', :as => 'admin_tenant_create_simple_plan'
|
|
196
|
+
post '/modify_overdue_config' => 'admin_tenants#modify_overdue_config', :as => 'admin_tenant_modify_overdue_config'
|
|
197
|
+
post '/upload_overdue_config' => 'admin_tenants#upload_overdue_config', :as => 'admin_tenant_upload_overdue_config'
|
|
198
|
+
post '/upload_invoice_template' => 'admin_tenants#upload_invoice_template', :as => 'admin_tenant_upload_invoice_template'
|
|
199
|
+
post '/upload_invoice_translation' => 'admin_tenants#upload_invoice_translation', :as => 'admin_tenant_upload_invoice_translation'
|
|
200
|
+
post '/upload_catalog_translation' => 'admin_tenants#upload_catalog_translation', :as => 'admin_tenant_upload_catalog_translation'
|
|
201
|
+
post '/upload_plugin_config' => 'admin_tenants#upload_plugin_config', :as => 'admin_tenant_upload_plugin_config'
|
|
202
|
+
delete '/remove_allowed_user' => 'admin_tenants#remove_allowed_user', :as => 'remove_allowed_user'
|
|
203
|
+
put '/add_allowed_user' => 'admin_tenants#add_allowed_user', :as => 'add_allowed_user'
|
|
204
|
+
get '/allowed_users' => 'admin_tenants#allowed_users', :as => 'admin_tenant_allowed_users'
|
|
205
|
+
get '/catalog_by_effective_date' => 'admin_tenants#catalog_by_effective_date', :as => 'catalog_by_effective_date'
|
|
206
|
+
get '/switch' => 'admin_tenants#switch_tenant', :as => 'switch_tenant'
|
|
207
|
+
get '/:id/download_catalog' => 'admin_tenants#download_catalog_xml', :as => 'download_catalog_xml'
|
|
208
208
|
end
|
|
209
209
|
resources :admin_tenants, only: %i[index new create show]
|
|
210
210
|
|
|
211
211
|
resources :admin_allowed_users
|
|
212
212
|
scope '/admin_allowed_users' do
|
|
213
|
-
|
|
213
|
+
post '/add_tenant' => 'admin_allowed_users#add_tenant', :as => 'add_tenant'
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
resources :role_definitions, only: %i[new create]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'killbill_client'
|
|
4
|
+
|
|
5
|
+
module Devise
|
|
6
|
+
module Models
|
|
7
|
+
module KillbillAuthenticatable
|
|
8
|
+
extend ActiveSupport::Concern
|
|
9
|
+
|
|
10
|
+
def valid_killbill_password?(creds)
|
|
11
|
+
# Simply try to look-up the permissions for that user - this will
|
|
12
|
+
# Take care of the auth part
|
|
13
|
+
response = Kaui::User.find_permissions(creds)
|
|
14
|
+
# Auth was successful, update the session id
|
|
15
|
+
self.kb_session_id = response.session_id
|
|
16
|
+
true
|
|
17
|
+
rescue KillBillClient::API::Unauthorized => _e
|
|
18
|
+
false
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def after_killbill_authentication
|
|
22
|
+
save(validate: false)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
module ClassMethods
|
|
26
|
+
# Invoked by the KillbillAuthenticatable strategy to lookup the user
|
|
27
|
+
# before attempting authentication
|
|
28
|
+
def find_for_killbill_authentication(kb_username)
|
|
29
|
+
find_for_authentication(kb_username:) ||
|
|
30
|
+
new(kb_username:)
|
|
31
|
+
rescue KillBillClient::API::Unauthorized => _e
|
|
32
|
+
# Multi-Tenancy was enabled, but the tenant_id couldn't be retrieved because of bad credentials
|
|
33
|
+
nil
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -62,10 +62,7 @@ module Kaui
|
|
|
62
62
|
def complete
|
|
63
63
|
return if options[:quiet]
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
puts "Kaui has been installed successfully. You're all ready to go!"
|
|
67
|
-
puts ' '
|
|
68
|
-
puts 'Enjoy!'
|
|
65
|
+
say "Kaui #{Kaui::VERSION} has been installed successfully! Please review the generated files and update them as needed."
|
|
69
66
|
end
|
|
70
67
|
end
|
|
71
68
|
end
|
data/lib/kaui/version.rb
CHANGED
data/lib/kaui.rb
CHANGED
|
@@ -62,7 +62,7 @@ module Kaui
|
|
|
62
62
|
self.creditcard_plugin_name = -> { '__EXTERNAL_PAYMENT__' }
|
|
63
63
|
|
|
64
64
|
self.account_search_columns = lambda do |account = nil, view_context = nil|
|
|
65
|
-
original_fields = KillBillClient::Model::AccountAttributes.instance_variable_get(
|
|
65
|
+
original_fields = KillBillClient::Model::AccountAttributes.instance_variable_get(:@json_attributes)
|
|
66
66
|
# Add additional fields if needed
|
|
67
67
|
fields = original_fields.dup
|
|
68
68
|
fields -= %w[audit_logs first_name_length]
|
|
@@ -112,7 +112,7 @@ module Kaui
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
self.account_invoices_columns = lambda do |invoice = nil, view_context = nil|
|
|
115
|
-
fields = KillBillClient::Model::InvoiceAttributes.instance_variable_get(
|
|
115
|
+
fields = KillBillClient::Model::InvoiceAttributes.instance_variable_get(:@json_attributes)
|
|
116
116
|
# Change the order if needed
|
|
117
117
|
fields -= Kaui::Invoice::TABLE_IGNORE_COLUMNS
|
|
118
118
|
fields.delete('invoice_id')
|
|
@@ -150,7 +150,7 @@ module Kaui
|
|
|
150
150
|
end
|
|
151
151
|
|
|
152
152
|
self.account_payments_columns = lambda do |account = nil, payment = nil, view_context = nil|
|
|
153
|
-
fields = KillBillClient::Model::PaymentAttributes.instance_variable_get(
|
|
153
|
+
fields = KillBillClient::Model::PaymentAttributes.instance_variable_get(:@json_attributes)
|
|
154
154
|
# Change the order if needed
|
|
155
155
|
fields = %w[payment_date] + fields
|
|
156
156
|
fields -= %w[payment_number transactions audit_logs]
|
|
@@ -202,7 +202,7 @@ module Kaui
|
|
|
202
202
|
"Item #{index + 1} : #{ii.description} #{"(bundle #{bundle_result.external_key})" unless bundle_result.nil?}"
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
self.customer_invoice_link = ->(invoice, ctx) { ctx.link_to 'View customer invoice html', ctx.kaui_engine.show_html_invoice_path(invoice.invoice_id), class: 'btn', target: '_blank' }
|
|
205
|
+
self.customer_invoice_link = ->(invoice, ctx) { ctx.link_to 'View customer invoice html', ctx.kaui_engine.show_html_invoice_path(invoice.invoice_id), class: 'btn', target: '_blank', rel: 'noopener' }
|
|
206
206
|
|
|
207
207
|
self.additional_invoice_links = ->(invoice, ctx) {}
|
|
208
208
|
|
|
@@ -283,15 +283,15 @@ module Kaui
|
|
|
283
283
|
return false if user.nil?
|
|
284
284
|
|
|
285
285
|
# If there is a kb_tenant_id in the session then we check if the user is allowed to access it
|
|
286
|
-
au = Kaui::AllowedUser.
|
|
286
|
+
au = Kaui::AllowedUser.find_by(kb_username: user.kb_username)
|
|
287
287
|
return false if au.nil?
|
|
288
288
|
|
|
289
|
-
au.kaui_tenants.
|
|
289
|
+
au.kaui_tenants.find { |t| t.kb_tenant_id == session[:kb_tenant_id] }
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
def self.current_tenant_user_options(user, session)
|
|
293
293
|
kb_tenant_id = session[:kb_tenant_id]
|
|
294
|
-
user_tenant = Kaui::Tenant.
|
|
294
|
+
user_tenant = Kaui::Tenant.find_by(kb_tenant_id: kb_tenant_id) if kb_tenant_id
|
|
295
295
|
result = {
|
|
296
296
|
username: user.kb_username,
|
|
297
297
|
password: user.password,
|
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.
|
|
4
|
+
version: 4.0.13
|
|
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-
|
|
11
|
+
date: 2026-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|
|
@@ -576,6 +576,7 @@ files:
|
|
|
576
576
|
- app/views/kaui/bundle_tags/_form_bar.html.erb
|
|
577
577
|
- app/views/kaui/bundle_tags/edit.html.erb
|
|
578
578
|
- app/views/kaui/bundles/_bundle_details.html.erb
|
|
579
|
+
- app/views/kaui/bundles/_bundle_filterbar.html.erb
|
|
579
580
|
- app/views/kaui/bundles/index.html.erb
|
|
580
581
|
- app/views/kaui/bundles/pause_resume.html.erb
|
|
581
582
|
- app/views/kaui/bundles/transfer.html.erb
|
|
@@ -676,6 +677,8 @@ files:
|
|
|
676
677
|
- db/migrate/20130812155313_devise_create_kaui_users.rb
|
|
677
678
|
- db/migrate/20150109214021_create_kaui_tenants.rb
|
|
678
679
|
- db/migrate/20150112232813_create_kaui_allowed_users.rb
|
|
680
|
+
- lib/devise/models/killbill_authenticatable.rb
|
|
681
|
+
- lib/devise/models/killbill_registerable.rb
|
|
679
682
|
- lib/generators/kaui/install/install_generator.rb
|
|
680
683
|
- lib/generators/kaui/install/templates/config/initializers/kaui.rb
|
|
681
684
|
- lib/kaui.rb
|