kaui 3.0.9 → 4.0.0

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 (259) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/kaui/account/authorize.svg +4 -0
  3. data/app/assets/images/kaui/account/credit.svg +4 -0
  4. data/app/assets/images/kaui/account/down-arrow.svg +3 -0
  5. data/app/assets/images/kaui/account/edit.svg +4 -0
  6. data/app/assets/images/kaui/account/pay-all.svg +5 -0
  7. data/app/assets/images/kaui/account/plus.svg +3 -0
  8. data/app/assets/images/kaui/account/purchase.svg +5 -0
  9. data/app/assets/images/kaui/account/refresh.svg +5 -0
  10. data/app/assets/images/kaui/arrow.svg +3 -0
  11. data/app/assets/images/kaui/card.svg +5 -0
  12. data/app/assets/images/kaui/copy.svg +12 -0
  13. data/app/assets/images/kaui/dashboard/aviate.svg +6 -0
  14. data/app/assets/images/kaui/dashboard/custom-field.svg +5 -0
  15. data/app/assets/images/kaui/dashboard/kaui-doc-img.png +0 -0
  16. data/app/assets/images/kaui/dashboard/plugins.svg +7 -0
  17. data/app/assets/images/kaui/dashboard/tags.svg +4 -0
  18. data/app/assets/images/kaui/dashboard/users.svg +6 -0
  19. data/app/assets/images/kaui/delete.svg +6 -0
  20. data/app/assets/images/kaui/dots.svg +5 -0
  21. data/app/assets/images/kaui/download-csv.svg +5 -0
  22. data/app/assets/images/kaui/download.svg +4 -0
  23. data/app/assets/images/kaui/eye-off.svg +9 -0
  24. data/app/assets/images/kaui/eye.svg +7 -0
  25. data/app/assets/images/kaui/file-upload.svg +34 -0
  26. data/app/assets/images/kaui/generate.svg +5 -0
  27. data/app/assets/images/kaui/header/account.svg +4 -0
  28. data/app/assets/images/kaui/header/cog_icon.svg +4 -0
  29. data/app/assets/images/kaui/header/invoice.svg +5 -0
  30. data/app/assets/images/kaui/header/payment.svg +5 -0
  31. data/app/assets/images/kaui/header/search_icon.svg +4 -0
  32. data/app/assets/images/kaui/header/subscription.svg +6 -0
  33. data/app/assets/images/kaui/logout.svg +4 -0
  34. data/app/assets/images/kaui/modal/close.svg +3 -0
  35. data/app/assets/images/kaui/modal/plus.svg +3 -0
  36. data/app/assets/images/kaui/modal/red-close.svg +10 -0
  37. data/app/assets/images/kaui/modal/search.svg +4 -0
  38. data/app/assets/images/kaui/payment/payment.svg +4 -0
  39. data/app/assets/images/kaui/payment/refund.svg +4 -0
  40. data/app/assets/images/kaui/plus.svg +3 -0
  41. data/app/assets/images/kaui/search.svg +4 -0
  42. data/app/assets/images/kaui/setting/account.svg +10 -0
  43. data/app/assets/images/kaui/setting/analytics.svg +7 -0
  44. data/app/assets/images/kaui/setting/custom-field.svg +5 -0
  45. data/app/assets/images/kaui/setting/e-notifications.svg +6 -0
  46. data/app/assets/images/kaui/setting/plugins.svg +7 -0
  47. data/app/assets/images/kaui/setting/plus.svg +3 -0
  48. data/app/assets/images/kaui/setting/reset.svg +4 -0
  49. data/app/assets/images/kaui/setting/tag-definitions.svg +5 -0
  50. data/app/assets/images/kaui/setting/tags.svg +4 -0
  51. data/app/assets/images/kaui/setting/tenants.svg +6 -0
  52. data/app/assets/images/kaui/setting/users.svg +6 -0
  53. data/app/assets/images/kaui/setting.svg +4 -0
  54. data/app/assets/images/kaui/sidebar/account.svg +4 -0
  55. data/app/assets/images/kaui/sidebar/audit.svg +5 -0
  56. data/app/assets/images/kaui/sidebar/custom-fields.svg +5 -0
  57. data/app/assets/images/kaui/sidebar/invoices.svg +5 -0
  58. data/app/assets/images/kaui/sidebar/payments.svg +5 -0
  59. data/app/assets/images/kaui/sidebar/queues.svg +5 -0
  60. data/app/assets/images/kaui/sidebar/subscriptions.svg +6 -0
  61. data/app/assets/images/kaui/sidebar/tags.svg +5 -0
  62. data/app/assets/images/kaui/sidebar/timeline.svg +5 -0
  63. data/app/assets/images/kaui/sign_in_background.svg +57 -0
  64. data/app/assets/images/kaui/sort-down.svg +3 -0
  65. data/app/assets/images/kaui/sort-up.svg +3 -0
  66. data/app/assets/images/kaui/subscription/add-on.svg +7 -0
  67. data/app/assets/images/kaui/subscription/cancel.svg +6 -0
  68. data/app/assets/images/kaui/subscription/change.svg +6 -0
  69. data/app/assets/images/kaui/subscription/date.svg +6 -0
  70. data/app/assets/images/kaui/subscription/pause.svg +4 -0
  71. data/app/assets/images/kaui/timeline/authorize.svg +5 -0
  72. data/app/assets/images/kaui/timeline/capture.svg +5 -0
  73. data/app/assets/images/kaui/timeline/chargeback.svg +3 -0
  74. data/app/assets/images/kaui/timeline/credit.svg +6 -0
  75. data/app/assets/images/kaui/timeline/invoice.svg +5 -0
  76. data/app/assets/images/kaui/timeline/purchase.svg +5 -0
  77. data/app/assets/images/kaui/timeline/refund.svg +4 -0
  78. data/app/assets/images/kaui/timeline/void.svg +4 -0
  79. data/app/assets/images/kaui/view-doc.svg +6 -0
  80. data/app/assets/images/kaui/warning.png +0 -0
  81. data/app/assets/javascripts/application.js +2 -2
  82. data/app/assets/javascripts/kaui/kaui_override.js +232 -0
  83. data/app/assets/javascripts/kaui/multi_functions_bar_utils.js +125 -24
  84. data/app/assets/stylesheets/application.css +13 -1
  85. data/app/assets/stylesheets/kaui/account.css +2028 -14
  86. data/app/assets/stylesheets/kaui/account_timeline.css +183 -0
  87. data/app/assets/stylesheets/kaui/admin_allowed_users.css +260 -0
  88. data/app/assets/stylesheets/kaui/audit.css +26 -16
  89. data/app/assets/stylesheets/kaui/audit_logs.css +443 -0
  90. data/app/assets/stylesheets/kaui/auth_pages.css +72 -0
  91. data/app/assets/stylesheets/kaui/breadcrumb.css +38 -0
  92. data/app/assets/stylesheets/kaui/chargebacks.css +118 -0
  93. data/app/assets/stylesheets/kaui/clock.css +103 -0
  94. data/app/assets/stylesheets/kaui/common.css +1744 -401
  95. data/app/assets/stylesheets/kaui/custom_fields.css +546 -0
  96. data/app/assets/stylesheets/kaui/dashboard.css +26 -0
  97. data/app/assets/stylesheets/kaui/datatable.css +114 -56
  98. data/app/assets/stylesheets/kaui/header.css +221 -114
  99. data/app/assets/stylesheets/kaui/home.css +89 -62
  100. data/app/assets/stylesheets/kaui/invoice.css +1061 -27
  101. data/app/assets/stylesheets/kaui/kaui.css +217 -145
  102. data/app/assets/stylesheets/kaui/overdue.css +5 -3
  103. data/app/assets/stylesheets/kaui/payment.css +1102 -13
  104. data/app/assets/stylesheets/kaui/queues.css +269 -0
  105. data/app/assets/stylesheets/kaui/refunds.css +185 -0
  106. data/app/assets/stylesheets/kaui/role_definitions.css +111 -0
  107. data/app/assets/stylesheets/kaui/sidebar.css +122 -0
  108. data/app/assets/stylesheets/kaui/subscription.css +677 -0
  109. data/app/assets/stylesheets/kaui/tag_definitions.css +524 -0
  110. data/app/assets/stylesheets/kaui/tags.css +592 -121
  111. data/app/assets/stylesheets/kaui/tenants.css +1478 -0
  112. data/app/assets/stylesheets/kaui/tooltip.css +9 -5
  113. data/app/assets/stylesheets/kaui/wallets.css +121 -0
  114. data/app/controllers/kaui/accounts_controller.rb +3 -2
  115. data/app/controllers/kaui/admin_tenants_controller.rb +33 -0
  116. data/app/controllers/kaui/custom_fields_controller.rb +1 -1
  117. data/app/controllers/kaui/engine_controller.rb +1 -2
  118. data/app/controllers/kaui/engine_controller_util.rb +5 -7
  119. data/app/controllers/kaui/home_controller.rb +24 -17
  120. data/app/controllers/kaui/invoices_controller.rb +4 -15
  121. data/app/controllers/kaui/payments_controller.rb +1 -1
  122. data/app/controllers/kaui/sessions_controller.rb +1 -0
  123. data/app/controllers/kaui/tag_definitions_controller.rb +1 -0
  124. data/app/helpers/kaui/account_helper.rb +13 -0
  125. data/app/helpers/kaui/plugin_helper.rb +27 -0
  126. data/app/views/kaui/account_custom_fields/index.html.erb +95 -29
  127. data/app/views/kaui/account_emails/_account_emails_table.html.erb +13 -3
  128. data/app/views/kaui/account_emails/_form.html.erb +23 -6
  129. data/app/views/kaui/account_emails/new.html.erb +12 -6
  130. data/app/views/kaui/account_tags/_form_bar.html.erb +10 -1
  131. data/app/views/kaui/account_tags/index.html.erb +103 -24
  132. data/app/views/kaui/account_timelines/_multi_functions_bar.html.erb +302 -69
  133. data/app/views/kaui/account_timelines/show.html.erb +360 -254
  134. data/app/views/kaui/accounts/_account_details.html.erb +165 -0
  135. data/app/views/kaui/accounts/_account_filterbar.html.erb +70 -80
  136. data/app/views/kaui/accounts/_add_parent.html.erb +26 -0
  137. data/app/views/kaui/accounts/_billing_details.html.erb +196 -0
  138. data/app/views/kaui/accounts/_close_account_modal.html.erb +62 -40
  139. data/app/views/kaui/accounts/_form_account.html.erb +157 -0
  140. data/app/views/kaui/accounts/_functions_bar.html.erb +606 -0
  141. data/app/views/kaui/accounts/_link_parent_modal.html.erb +1 -1
  142. data/app/views/kaui/accounts/_link_parent_to_modal.html.erb +62 -0
  143. data/app/views/kaui/accounts/_multi_functions_bar.html.erb +67 -28
  144. data/app/views/kaui/accounts/_payment_gateways.html.erb +43 -0
  145. data/app/views/kaui/accounts/_personal_details.html.erb +67 -0
  146. data/app/views/kaui/accounts/edit.html.erb +15 -9
  147. data/app/views/kaui/accounts/index.html.erb +77 -27
  148. data/app/views/kaui/accounts/new.html.erb +14 -8
  149. data/app/views/kaui/accounts/show.html.erb +17 -11
  150. data/app/views/kaui/admin/index.html.erb +44 -19
  151. data/app/views/kaui/admin_allowed_users/_form.html.erb +123 -31
  152. data/app/views/kaui/admin_allowed_users/edit.html.erb +15 -9
  153. data/app/views/kaui/admin_allowed_users/index.html.erb +150 -30
  154. data/app/views/kaui/admin_allowed_users/new.html.erb +14 -8
  155. data/app/views/kaui/admin_allowed_users/show.html.erb +137 -32
  156. data/app/views/kaui/admin_tenants/_add_allowed_user_modal.html.erb +42 -15
  157. data/app/views/kaui/admin_tenants/_clock.html.erb +72 -0
  158. data/app/views/kaui/admin_tenants/_form.html.erb +32 -20
  159. data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +21 -8
  160. data/app/views/kaui/admin_tenants/_form_invoice_template.erb +25 -9
  161. data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +36 -20
  162. data/app/views/kaui/admin_tenants/_form_plugin_config.erb +16 -20
  163. data/app/views/kaui/admin_tenants/_show_catalog.erb +13 -6
  164. data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +95 -46
  165. data/app/views/kaui/admin_tenants/_show_catalog_xml.erb +62 -37
  166. data/app/views/kaui/admin_tenants/_show_overdue.erb +91 -75
  167. data/app/views/kaui/admin_tenants/_tenant_details.html.erb +106 -17
  168. data/app/views/kaui/admin_tenants/_tenants_table.html.erb +67 -6
  169. data/app/views/kaui/admin_tenants/_useful_links.html.erb +21 -16
  170. data/app/views/kaui/admin_tenants/index.html.erb +35 -11
  171. data/app/views/kaui/admin_tenants/index.js.erb +3 -0
  172. data/app/views/kaui/admin_tenants/new.html.erb +19 -13
  173. data/app/views/kaui/admin_tenants/new_catalog.html.erb +230 -98
  174. data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +152 -80
  175. data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +44 -30
  176. data/app/views/kaui/admin_tenants/show.html.erb +211 -78
  177. data/app/views/kaui/admin_tenants/show.js.erb +3 -0
  178. data/app/views/kaui/audit_logs/_multi_functions_bar.html.erb +298 -101
  179. data/app/views/kaui/audit_logs/index.html.erb +137 -38
  180. data/app/views/kaui/bundle_tags/_form_bar.html.erb +11 -4
  181. data/app/views/kaui/bundles/_bundle_details.html.erb +24 -12
  182. data/app/views/kaui/bundles/index.html.erb +79 -104
  183. data/app/views/kaui/bundles/pause_resume.html.erb +73 -38
  184. data/app/views/kaui/chargebacks/_form.html.erb +35 -18
  185. data/app/views/kaui/chargebacks/new.html.erb +16 -9
  186. data/app/views/kaui/charges/_form.html.erb +54 -42
  187. data/app/views/kaui/charges/new.html.erb +15 -8
  188. data/app/views/kaui/components/breadcrumb/_breadcrumb.html.erb +146 -0
  189. data/app/views/kaui/components/button/_button.html.erb +16 -0
  190. data/app/views/kaui/components/dashboard/_card.html.erb +15 -0
  191. data/app/views/kaui/components/dashboard/_setting.html.erb +15 -0
  192. data/app/views/kaui/components/form_input/_form_input.html.erb +4 -0
  193. data/app/views/kaui/components/form_password/_form_password.html.erb +6 -0
  194. data/app/views/kaui/components/logo/_logo.html.erb +1 -0
  195. data/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb +59 -0
  196. data/app/views/kaui/components/search_input/_search_input.html.erb +81 -0
  197. data/app/views/kaui/credits/_form.html.erb +42 -25
  198. data/app/views/kaui/credits/new.html.erb +15 -8
  199. data/app/views/kaui/custom_fields/_form.html.erb +37 -25
  200. data/app/views/kaui/custom_fields/_list_bar.html.erb +11 -10
  201. data/app/views/kaui/custom_fields/index.html.erb +121 -27
  202. data/app/views/kaui/custom_fields/new.html.erb +19 -8
  203. data/app/views/kaui/errors/500.html.erb +1 -1
  204. data/app/views/kaui/home/index.html.erb +77 -30
  205. data/app/views/kaui/invoice_items/_edit_form.html.erb +30 -14
  206. data/app/views/kaui/invoice_items/edit.html.erb +15 -7
  207. data/app/views/kaui/invoice_tags/_form_bar.html.erb +13 -3
  208. data/app/views/kaui/invoices/_invoice_filterbar.html.erb +53 -69
  209. data/app/views/kaui/invoices/_invoice_table.html.erb +77 -92
  210. data/app/views/kaui/invoices/_multi_functions_bar.html.erb +351 -140
  211. data/app/views/kaui/invoices/index.html.erb +89 -27
  212. data/app/views/kaui/invoices/show.html.erb +392 -80
  213. data/app/views/kaui/layouts/kaui_account_sidebar.html.erb +42 -0
  214. data/app/views/kaui/layouts/kaui_application.html.erb +29 -15
  215. data/app/views/kaui/layouts/kaui_flash.html.erb +82 -31
  216. data/app/views/kaui/layouts/kaui_navbar.html.erb +109 -82
  217. data/app/views/kaui/layouts/kaui_setting_sidebar.html.erb +36 -0
  218. data/app/views/kaui/payment_methods/_form.html.erb +32 -11
  219. data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +35 -34
  220. data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +27 -29
  221. data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +116 -38
  222. data/app/views/kaui/payment_methods/_plugin_properties.html.erb +19 -9
  223. data/app/views/kaui/payment_methods/new.html.erb +14 -8
  224. data/app/views/kaui/payments/_form.html.erb +30 -13
  225. data/app/views/kaui/payments/_multi_functions_bar.html.erb +351 -141
  226. data/app/views/kaui/payments/_payment_filterbar.html.erb +63 -79
  227. data/app/views/kaui/payments/_payment_invoice_table.html.erb +105 -0
  228. data/app/views/kaui/payments/_payment_table.html.erb +4 -67
  229. data/app/views/kaui/payments/index.html.erb +90 -26
  230. data/app/views/kaui/payments/new.html.erb +15 -8
  231. data/app/views/kaui/payments/show.html.erb +222 -28
  232. data/app/views/kaui/queues/index.html.erb +329 -111
  233. data/app/views/kaui/refunds/_form.html.erb +68 -45
  234. data/app/views/kaui/refunds/new.html.erb +15 -8
  235. data/app/views/kaui/role_definitions/_form.html.erb +104 -17
  236. data/app/views/kaui/role_definitions/new.html.erb +15 -8
  237. data/app/views/kaui/sessions/_form.html.erb +9 -19
  238. data/app/views/kaui/sessions/new.html.erb +10 -9
  239. data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +65 -35
  240. data/app/views/kaui/subscriptions/_edit_form.html.erb +66 -35
  241. data/app/views/kaui/subscriptions/_form.html.erb +63 -32
  242. data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +215 -57
  243. data/app/views/kaui/subscriptions/edit.html.erb +19 -8
  244. data/app/views/kaui/subscriptions/edit_bcd.erb +46 -16
  245. data/app/views/kaui/subscriptions/new.html.erb +22 -15
  246. data/app/views/kaui/tag_definitions/_form.html.erb +51 -30
  247. data/app/views/kaui/tag_definitions/index.html.erb +151 -40
  248. data/app/views/kaui/tag_definitions/new.html.erb +15 -8
  249. data/app/views/kaui/tags/index.html.erb +136 -47
  250. data/app/views/kaui/tenants/_form.html.erb +8 -5
  251. data/app/views/kaui/tenants/index.html.erb +15 -9
  252. data/app/views/kaui/transactions/_control_plugin_names.html.erb +18 -10
  253. data/app/views/kaui/transactions/_form.html.erb +86 -25
  254. data/app/views/kaui/transactions/new.html.erb +15 -9
  255. data/config/routes.rb +1 -0
  256. data/lib/kaui/engine.rb +11 -0
  257. data/lib/kaui/version.rb +1 -1
  258. data/lib/kaui.rb +0 -1
  259. metadata +120 -2
@@ -1,16 +1,20 @@
1
1
  .tooltip-arrow,
2
2
  .kb-tooltip + .tooltip > .tooltip-inner {
3
- background-color: #C0E0E3; }
3
+ background-color: #c0e0e3;
4
+ }
4
5
 
5
6
  .kb-tooltip + .tooltip.top > .tooltip-arrow {
6
7
  background-color: #fff;
7
- border-top: #C0E0E3; }
8
+ border-top: #c0e0e3;
9
+ }
8
10
 
9
- .kb-tooltip + .bs-tooltip-auto[x-placement^=top] .arrow::before,
11
+ .kb-tooltip + .bs-tooltip-auto[x-placement^="top"] .arrow::before,
10
12
  .kb-tooltip + .bs-tooltip-top .arrow::before {
11
- border-bottom-color: #C0E0E3; }
13
+ border-bottom-color: #c0e0e3;
14
+ }
12
15
 
13
16
  .tooltip .tooltip-arrow {
14
- border-top: 5px solid #C0E0E3 !important; }
17
+ border-top: 0.3125rem solid #c0e0e3 !important;
18
+ }
15
19
 
16
20
  /*# sourceMappingURL=tooltip.css.map */
@@ -0,0 +1,121 @@
1
+ .wallets-index .wallets {
2
+ max-width: 80rem;
3
+ width: 100%;
4
+ }
5
+
6
+ .wallets-index .wallets .wallets-header {
7
+ display: flex;
8
+ align-items: start;
9
+ justify-content: space-between;
10
+ padding: 0;
11
+ border-bottom: 0.0625rem solid #e9eaeb;
12
+ }
13
+
14
+ .wallets-index .wallets-table th,
15
+ .wallets-index .wallets-table td {
16
+ white-space: nowrap;
17
+ text-align: left;
18
+ }
19
+
20
+ .wallets-index .wallets .wallets-header h2 {
21
+ font-weight: 600;
22
+ font-size: 1.125rem;
23
+ line-height: 1.75rem;
24
+ color: #414651;
25
+ margin-bottom: 1.25rem;
26
+ }
27
+
28
+ .wallets-index .wallets .wallets-table {
29
+ overflow-x: auto;
30
+ min-width: 100%;
31
+ }
32
+
33
+ .wallets-index .wallets .wallets-table th {
34
+ padding: 0.375rem 0.75rem !important;
35
+ font-weight: 500 !important;
36
+ font-size: 0.75rem !important;
37
+ line-height: 1.125rem !important;
38
+ letter-spacing: 0 !important;
39
+ color: #717680 !important;
40
+ text-transform: capitalize !important;
41
+ position: relative !important;
42
+ }
43
+
44
+ .wallets-index .wallets .wallets-table .header-content {
45
+ display: flex;
46
+ align-items: center;
47
+ }
48
+
49
+ .wallets-index .wallets .wallets-table td {
50
+ font-weight: 500 !important;
51
+ font-size: 0.875rem !important;
52
+ line-height: 1.125rem !important;
53
+ text-align: start;
54
+ color: #535862 !important;
55
+ }
56
+
57
+ .wallets-index .wallets .wallets-table table.dataTable {
58
+ overflow: auto !important;
59
+ }
60
+
61
+ #wallets-table_wrapper .dataTables_empty {
62
+ text-align: center;
63
+ }
64
+
65
+ .add-new-wallet-details .add-new-wallet-title {
66
+ display: flex;
67
+ align-items: center;
68
+ gap: 1rem;
69
+ font-weight: 600;
70
+ font-size: 1.125rem;
71
+ line-height: 1.75rem;
72
+ letter-spacing: 0;
73
+ color: #1b1c1e;
74
+ padding: 1.5rem 0;
75
+ }
76
+
77
+ .add-new-wallet-details .icon-container {
78
+ display: inline-flex;
79
+ justify-content: center;
80
+ align-items: center;
81
+ border: 0.0625rem solid #d5d7da;
82
+ border-radius: 0.375rem;
83
+ width: 2.5rem;
84
+ height: 2.5rem;
85
+ padding: 0.25rem;
86
+ }
87
+
88
+ .add-new-wallet-details .icon-container img {
89
+ width: 1rem;
90
+ height: 1rem;
91
+ }
92
+
93
+ .add-new-wallet-details .control-label {
94
+ font-size: 0.875rem !important;
95
+ font-weight: 500 !important;
96
+ line-height: 1.25rem !important;
97
+ color: #414651 !important;
98
+ }
99
+
100
+ .add-new-wallet-details .form-group select.form-control {
101
+ appearance: none;
102
+ -webkit-appearance: none;
103
+ -moz-appearance: none;
104
+ background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%23A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
105
+ background-repeat: no-repeat;
106
+ background-position: right 0.625rem center;
107
+ background-size: 1rem 1rem;
108
+ padding-right: 1.875rem;
109
+ }
110
+
111
+ .add-new-wallet-details select.form-control:focus {
112
+ box-shadow: none;
113
+ outline: none;
114
+ border-color: #1570ef;
115
+ }
116
+
117
+ .add-new-wallet-details .form-group .form-control {
118
+ margin-right: 0.25rem;
119
+ height: 2.5rem;
120
+ border-radius: 0.375rem;
121
+ }
@@ -5,8 +5,8 @@ module Kaui
5
5
  class AccountsController < Kaui::EngineController
6
6
  def index
7
7
  @search_query = params[:q]
8
- @advance_search_query = request.query_string
9
- if params[:fast] == '1' && !@search_query.blank?
8
+ @advance_search_query = @search_query || request.query_string
9
+ if @search_query.present?
10
10
  account = Kaui::Account.list_or_search(@search_query, -1, 1, options_for_klient).first
11
11
  if account.nil?
12
12
  flash[:error] = "No account matches \"#{@search_query}\""
@@ -18,6 +18,7 @@ module Kaui
18
18
  end
19
19
  @search_fields = Kaui::Account::ADVANCED_SEARCH_COLUMNS.map { |attr| [attr, attr.split('_').join(' ').capitalize] }
20
20
  @dropdown_default = default_columns(Kaui.account_search_columns.call[2], Kaui::Account::SENSIVITE_DATA_FIELDS)
21
+ @visible_columns = @dropdown_default
21
22
 
22
23
  @ordering = params[:ordering] || (@search_query.blank? ? 'desc' : 'asc')
23
24
  @offset = params[:offset] || 0
@@ -78,6 +78,13 @@ module Kaui
78
78
 
79
79
  configure_tenant_if_nil(@tenant)
80
80
 
81
+ # Fetch clock data for the clock component
82
+ begin
83
+ @clock = Kaui::Admin.get_clock(nil, options_for_klient)
84
+ rescue KillBillClient::API::NotFound
85
+ flash[:error] = 'Failed to get current KB clock: Kill Bill server must be started with system property org.killbill.server.test.mode=true'
86
+ end
87
+
81
88
  options = tenant_options_for_client
82
89
  options[:api_key] = @tenant.api_key
83
90
  options[:api_secret] = @tenant.api_secret
@@ -122,6 +129,11 @@ module Kaui
122
129
 
123
130
  # When reloading page from the view, it sends the last tab that was active
124
131
  @active_tab = params[:active_tab] || 'CatalogShow'
132
+
133
+ respond_to do |format|
134
+ format.html
135
+ format.js
136
+ end
125
137
  end
126
138
 
127
139
  def upload_catalog
@@ -472,6 +484,27 @@ module Kaui
472
484
  end
473
485
  end
474
486
 
487
+ def set_clock
488
+ @tenant = safely_find_tenant_by_id(params[:id])
489
+
490
+ if params[:commit] == 'Submit'
491
+ date = Date.parse(params[:new_date]).strftime('%Y-%m-%d')
492
+ msg = I18n.translate('flashes.notices.clock_updated_successfully', new_date: date)
493
+ else
494
+ date = nil
495
+ msg = I18n.translate('flashes.notices.clock_reset_successfully')
496
+ end
497
+
498
+ begin
499
+ Kaui::Admin.set_clock(date, nil, options_for_klient)
500
+ rescue KillBillClient::API::NotFound
501
+ flash[:error] = 'Failed to set current KB clock: Kill Bill server must be started with system property org.killbill.server.test.mode=true'
502
+ redirect_to admin_tenant_path(@tenant.id) and return
503
+ end
504
+
505
+ redirect_to admin_tenant_path(@tenant.id), notice: msg
506
+ end
507
+
475
508
  def switch_tenant
476
509
  tenant = Kaui::Tenant.find_by_kb_tenant_id(params.require(:kb_tenant_id))
477
510
 
@@ -4,7 +4,7 @@ module Kaui
4
4
  class CustomFieldsController < Kaui::EngineController
5
5
  def index
6
6
  @search_query = params[:q]
7
-
7
+ @advance_search_query = params[:q] || request.query_string
8
8
  @ordering = params[:ordering] || (@search_query.blank? ? 'desc' : 'asc')
9
9
  @offset = params[:offset] || 0
10
10
  @limit = params[:limit] || 50
@@ -12,11 +12,10 @@ class Kaui::EngineController < ApplicationController
12
12
  # Common options for the Kill Bill client
13
13
  def options_for_klient(options = {})
14
14
  user_tenant_options = Kaui.current_tenant_user_options(current_user, session)
15
- user_tenant_options.merge(options)
15
+ user_tenant_options.merge!(options)
16
16
  # Pass the X-Request-Id seen by Rails to Kill Bill
17
17
  # Note that this means that subsequent requests issued by a single action will share the same X-Request-Id in Kill Bill
18
18
  user_tenant_options[:request_id] ||= request.request_id
19
- user_tenant_options[:jwt_token] ||= session[:jwt_token]
20
19
  user_tenant_options
21
20
  end
22
21
 
@@ -69,13 +69,11 @@ module Kaui
69
69
  ordering_column = (ordering[:column] || 0).to_i
70
70
  ordering_column = params[:colum_order][ordering_column].to_i if params[:colum_order].present?
71
71
  ordering_dir = ordering[:dir] || 'asc'
72
- unless search_key.nil?
73
- pages.sort! do |a, b|
74
- a = data_extractor.call(a, ordering_column)
75
- b = data_extractor.call(b, ordering_column)
76
- sort = a <=> b
77
- sort.nil? ? -1 : sort
78
- end
72
+ pages.sort! do |a, b|
73
+ a = data_extractor.call(a, ordering_column)
74
+ b = data_extractor.call(b, ordering_column)
75
+ sort = a <=> b
76
+ sort.nil? ? -1 : sort
79
77
  end
80
78
  pages.reverse! if (ordering_dir == 'desc' && limit >= 0) || (ordering_dir == 'asc' && limit.negative?)
81
79
 
@@ -11,19 +11,26 @@ module Kaui
11
11
 
12
12
  def index
13
13
  @search_query = params[:q]
14
+ @max_records = {}
15
+ %w[account payment invoice].each do |type|
16
+ model = "Kaui::#{type.capitalize}".constantize
17
+ @max_records[type.to_sym] = model.list_or_search(nil, 0, 0, options_for_klient).pagination_max_nb_records || 0
18
+ end
14
19
  end
15
20
 
16
21
  def search
17
- object_type, search_query, search_by, fast = parse_query(params[:q])
18
-
19
- return if object_type.nil?
20
-
22
+ object_type, search_query = splitting_new_search(params[:q])
23
+ object_type = object_type.tr(' ', '_').downcase
21
24
  cached_options_for_klient = options_for_klient
22
- send("#{object_type}_search", search_query, search_by, fast, cached_options_for_klient)
25
+ send("#{object_type}_search", search_query, nil, 0, cached_options_for_klient)
23
26
  end
24
27
 
25
28
  private
26
29
 
30
+ def splitting_new_search(search_query)
31
+ (search_query || '').split(':').map(&:strip)
32
+ end
33
+
27
34
  def account_search(search_query, search_by = nil, fast = 0, options = {})
28
35
  if search_by == 'ID'
29
36
  begin
@@ -46,7 +53,7 @@ module Kaui
46
53
  elsif true?(fast)
47
54
  redirect_to account_path(account.account_id) and return
48
55
  else
49
- redirect_to accounts_path(q: search_query, fast:) and return
56
+ redirect_to accounts_path(q: search_query) and return
50
57
  end
51
58
  end
52
59
  end
@@ -74,14 +81,14 @@ module Kaui
74
81
  if invoice.blank?
75
82
  begin
76
83
  invoice = Kaui::Invoice.find_by_invoice_item_id(search_query, false, 'NONE', options)
77
- redirect_to account_invoice_path(invoice.account_id, invoice.invoice_id) and return
84
+ redirect_to account_invoices_path(invoice.account_id, q: search_query) and return
78
85
  rescue KillBillClient::API::NotFound => _e
79
86
  search_error("No invoice matches \"#{search_query}\"")
80
87
  end
81
88
  elsif true?(fast)
82
89
  redirect_to account_invoice_path(invoice.account_id, invoice.invoice_id) and return
83
90
  else
84
- redirect_to account_invoices_path(account_id: invoice.account_id, q: search_query, fast:) and return
91
+ redirect_to account_invoices_path(account_id: invoice.account_id, q: search_query) and return
85
92
  end
86
93
  end
87
94
  end
@@ -108,7 +115,7 @@ module Kaui
108
115
  elsif true?(fast)
109
116
  redirect_to account_payment_path(payment.account_id, payment.payment_id) and return
110
117
  else
111
- redirect_to account_payments_path(account_id: payment.account_id, q: search_query, fast:) and return
118
+ redirect_to account_payments_path(account_id: payment.account_id, q: search_query) and return
112
119
  end
113
120
  end
114
121
  end
@@ -169,13 +176,13 @@ module Kaui
169
176
  end
170
177
  end
171
178
 
172
- def custom_field_search(search_query, search_by = nil, fast = 0, options = {})
179
+ def custom_field_search(search_query, search_by = nil, _fast = 0, options = {})
173
180
  if search_by.blank? || search_by == 'ID'
174
181
  custom_field = Kaui::CustomField.list_or_search(search_query, 0, 1, options)
175
182
  if custom_field.blank?
176
183
  search_error("No custom field matches \"#{search_query}\"")
177
184
  else
178
- redirect_to custom_fields_path(q: search_query, fast:)
185
+ redirect_to custom_fields_path(q: search_query)
179
186
  end
180
187
  else
181
188
  unsupported_search_field('CUSTOM FIELD', search_by)
@@ -208,24 +215,24 @@ module Kaui
208
215
  end
209
216
  end
210
217
 
211
- def tag_search(search_query, search_by = nil, fast = 0, options = {})
218
+ def tag_search(search_query, search_by = nil, _fast = 0, options = {})
212
219
  if search_by.blank? || search_by == 'ID'
213
220
  tag = Kaui::Tag.list_or_search(search_query, 0, 1, options)
214
221
  if tag.blank?
215
222
  search_error("No tag matches \"#{search_query}\"")
216
223
  else
217
- redirect_to tags_path(q: search_query, fast:)
224
+ redirect_to tags_path(q: search_query)
218
225
  end
219
226
  else
220
227
  unsupported_search_field('TAG', search_by)
221
228
  end
222
229
  end
223
230
 
224
- def tag_definition_search(search_query, search_by = nil, fast = 0, options = {})
231
+ def tag_definition_search(search_query, search_by = nil, _fast = 0, options = {})
225
232
  if search_by == 'ID'
226
233
  begin
227
234
  Kaui::TagDefinition.find_by_id(search_query, 'NONE', options)
228
- redirect_to tag_definitions_path(q: search_query, fast:)
235
+ redirect_to tag_definitions_path(q: search_query)
229
236
  rescue KillBillClient::API::NotFound => _e
230
237
  search_error("No tag definition matches \"#{search_query}\"")
231
238
  end
@@ -236,12 +243,12 @@ module Kaui
236
243
  if tag_definition.blank?
237
244
  begin
238
245
  Kaui::TagDefinition.find_by_id(search_query, 'NONE', options)
239
- redirect_to tag_definitions_path(q: search_query, fast:) and return
246
+ redirect_to tag_definitions_path(q: search_query) and return
240
247
  rescue KillBillClient::API::NotFound => _e
241
248
  search_error("No tag definition matches \"#{search_query}\"")
242
249
  end
243
250
  else
244
- redirect_to tag_definitions_path(q: search_query, fast:)
251
+ redirect_to tag_definitions_path(q: search_query)
245
252
  end
246
253
  end
247
254
  end
@@ -5,7 +5,7 @@ module Kaui
5
5
  class InvoicesController < Kaui::EngineController
6
6
  def index
7
7
  @search_query = params[:account_id]
8
- @advance_search_query = request.query_string
8
+ @advance_search_query = params[:q] || request.query_string
9
9
  @ordering = params[:ordering] || (@search_query.blank? ? 'desc' : 'asc')
10
10
  @offset = params[:offset] || 0
11
11
  @limit = params[:limit] || 50
@@ -63,20 +63,9 @@ module Kaui
63
63
  end
64
64
  end
65
65
 
66
- account_id = (params[:search] || {})[:value]
67
- data_extractor = if account_id.blank?
68
- lambda do |invoice, column|
69
- [
70
- invoice.invoice_number.to_i,
71
- invoice.invoice_date
72
- ][column]
73
- end
74
- else
75
- lambda do |invoice, column|
76
- Kaui.account_invoices_columns.call(invoice, view_context)[2][column]
77
- end
78
- end
79
-
66
+ data_extractor = lambda do |invoice, column|
67
+ Kaui.account_invoices_columns.call(invoice, view_context)[2][column]
68
+ end
80
69
  formatter = lambda do |invoice|
81
70
  Kaui.account_invoices_columns.call(invoice, view_context)[1]
82
71
  end
@@ -6,7 +6,7 @@ module Kaui
6
6
  class PaymentsController < Kaui::EngineController
7
7
  def index
8
8
  @search_query = params[:q] || params[:account_id]
9
- @advance_search_query = request.query_string
9
+ @advance_search_query = params[:q] || request.query_string
10
10
  @ordering = params[:ordering] || (@search_query.blank? ? 'desc' : 'asc')
11
11
  @offset = params[:offset] || 0
12
12
  @limit = params[:limit] || 50
@@ -28,6 +28,7 @@ module Kaui
28
28
  end
29
29
 
30
30
  def after_sign_out_path_for(_resource)
31
+ cookies.delete(:jwt_token)
31
32
  kaui_path
32
33
  end
33
34
 
@@ -34,6 +34,7 @@ module Kaui
34
34
  redirect_to kaui_engine.tag_definitions_path, notice: 'Tag definition successfully deleted'
35
35
  rescue StandardError => e
36
36
  flash.now[:error] = "Error while deleting tag definition: #{as_string(e)}"
37
+ @tag_definitions = Kaui::TagDefinition.all('NONE', options_for_klient)
37
38
  render action: :index
38
39
  end
39
40
  end
@@ -26,6 +26,19 @@ module Kaui
26
26
  false
27
27
  end
28
28
 
29
+ def kpm_plugin_installed
30
+ nodes_info = KillBillClient::Model::NodesInfo.nodes_info(Kaui.current_tenant_user_options(current_user, session)) || []
31
+ return false if nodes_info.empty?
32
+
33
+ nodes_info.each do |node_info|
34
+ next if (node_info.plugins_info || []).empty?
35
+
36
+ node_info.plugins_info.each do |plugin_info|
37
+ return true if plugin_info.plugin_name == 'org.kill-bill.billing.killbill-platform-osgi-bundles-kpm'
38
+ end
39
+ end
40
+ end
41
+
29
42
  def account_closed?
30
43
  return false if @account.nil?
31
44
 
@@ -2,10 +2,37 @@
2
2
 
3
3
  module Kaui
4
4
  module PluginHelper
5
+ CONFIGABLE_PLUGINS = %w[analytics avatax email-notifications deposit payment-test aviate].freeze
6
+
5
7
  def plugin_repository
6
8
  installed_plugins
7
9
  end
8
10
 
11
+ def installed_plugin_names
12
+ plugins = []
13
+ nodes_info = KillBillClient::Model::NodesInfo.nodes_info(Kaui.current_tenant_user_options(current_user, session)) || []
14
+ plugins_info = nodes_info.empty? ? [] : (nodes_info.first.plugins_info || [])
15
+ plugins_info.each do |plugin|
16
+ next unless plugin.state == 'RUNNING'
17
+
18
+ plugin_name = plugin.plugin_name
19
+ plugin_key = plugin_name.gsub('-plugin', '')
20
+
21
+ # Handle special cases
22
+ plugin_path = case plugin_name
23
+ when /email-notifications/
24
+ '/kenui'
25
+ when /payment-test/
26
+ '/payment_test'
27
+ else
28
+ "/#{plugin_key}"
29
+ end
30
+ plugin_path = nil unless CONFIGABLE_PLUGINS.include?(plugin_key)
31
+ plugins << { name: plugin_name, path: plugin_path } if plugin_path
32
+ end
33
+ plugins
34
+ end
35
+
9
36
  private
10
37
 
11
38
  def installed_plugins
@@ -1,35 +1,101 @@
1
- <div class="search">
2
-
3
- <div class="column-block">
4
-
5
- <h1>Custom Fields</h1>
6
- <input type="hidden" id="custom-fields" value="<%= @custom_fields_json %>">
7
- <table id="custom_fields-table" class="table table-condensed mobile-data">
8
- <thead>
9
- <tr>
10
- <th>Object ID</th>
11
- <th>Object type</th>
12
- <th>Name</th>
13
- <th>Value</th>
14
- </tr>
15
- </thead>
16
- <tbody>
17
- <tr>
18
- <td colspan="1" class="dataTables_empty">Loading data from server</td>
19
- </tr>
20
- </tbody>
21
- </table>
22
-
1
+ <div class="kaui-container kaui-account-custom-fields-index">
2
+ <%= render "kaui/components/breadcrumb/breadcrumb" %>
3
+ <div class="d-flex " style="gap: 4rem;">
4
+ <%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
5
+ <div class="custom-fields">
6
+ <div class="d-flex flex-column ">
7
+ <div class="custom-fields-header mb-4">
8
+ <div class="d-flex align-items-center">
9
+ <h2>Custom Fields</h2>
10
+ </div>
11
+ <input type="hidden" id="custom-fields" value="<%= @custom_fields_json %>">
12
+ </div>
13
+ <table id="custom_fields-table" class="custom-fields-table">
14
+ <thead>
15
+ <tr>
16
+ <th class="sortable-header" data-column="0">
17
+ <div class="header-content">
18
+ <span class="header-text">Object ID</span>
19
+ <div class="sort-icons">
20
+ <%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
21
+ <%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
22
+ </div>
23
+ </div>
24
+ </th>
25
+ <th class="sortable-header" data-column="1">
26
+ <div class="header-content">
27
+ <span class="header-text">Object type</span>
28
+ <div class="sort-icons">
29
+ <%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
30
+ <%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
31
+ </div>
32
+ </div>
33
+ </th>
34
+ <th class="sortable-header" data-column="2">
35
+ <div class="header-content">
36
+ <span class="header-text">Name</span>
37
+ <div class="sort-icons">
38
+ <%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
39
+ <%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
40
+ </div>
41
+ </div>
42
+ </th>
43
+ <th class="sortable-header" data-column="3">
44
+ <div class="header-content">
45
+ <span class="header-text">Value</span>
46
+ <div class="sort-icons">
47
+ <%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
48
+ <%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
49
+ </div>
50
+ </div>
51
+ </th>
52
+ </tr>
53
+ </thead>
54
+ <tbody>
55
+ </tbody>
56
+ </table>
57
+ </div>
58
+ </div>
23
59
  </div>
24
-
25
60
  </div>
26
61
 
62
+
27
63
  <%= javascript_tag do %>
28
- $(document).ready(function() {
29
- var customFields = JSON.parse($("#custom-fields").val());
30
- $('#custom_fields-table').DataTable({
31
- "dom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
32
- data: customFields
33
- });
64
+ $(document).ready(function() {
65
+ var customFields = JSON.parse($("#custom-fields").val());
66
+ var table = $('#custom_fields-table').DataTable({
67
+ "dom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
68
+ data: customFields
34
69
  });
70
+
71
+ setTimeout(() => {
72
+ $('#custom_fields-table tbody tr').each(function () {
73
+ const $td = $(this).find('td:nth-of-type(2)');
74
+ const content = $td.text().trim();
75
+ $td.html(`<span>${content}</span>`);
76
+ });
77
+ }, 50);
78
+
79
+ // Custom sorting functionality
80
+ (function() {
81
+ var currentSortColumn = -1;
82
+ var currentSortDirection = 'asc';
83
+ $('#custom_fields-table thead .sortable-header').on('click', function() {
84
+ var columnIndex = parseInt($(this).data('column'));
85
+ var newDirection = (currentSortColumn === columnIndex && currentSortDirection === 'asc') ? 'desc' : 'asc';
86
+ currentSortColumn = columnIndex;
87
+ currentSortDirection = newDirection;
88
+ updateSortIndicators($('#custom_fields-table'), columnIndex, newDirection);
89
+ table.order([columnIndex, newDirection]).draw();
90
+ });
91
+ })();
92
+
93
+ function updateSortIndicators($table, columnIndex, direction) {
94
+ $table.find('.sortable-header').removeClass('sort-asc-active sort-desc-active');
95
+ $table.find('.sort-icon').removeClass('active');
96
+ var $header = $table.find('.sortable-header[data-column="' + columnIndex + '"]');
97
+ $header.addClass(direction + '-active');
98
+ $header.find('.sort-' + direction).addClass('active');
99
+ }
100
+ });
35
101
  <% end %>
@@ -1,13 +1,23 @@
1
1
  <tr>
2
- <th>Contact emails</th>
3
2
  <td>
4
3
  <% if account_emails.present? %>
4
+ <div class="account-emails-list">
5
5
  <% account_emails.each_with_index do |account_email, idx| %>
6
- <%= account_email.email %><% if can? :delete_emails, Kaui::Account -%><%= link_to '&nbsp;<i class="fa fa-times"></i>'.html_safe, kaui_engine.account_account_email_path(account_email.account_id, account_email.email), :method => :delete -%><% end -%>&nbsp;
6
+ <div>
7
+ <%= account_email.email %><% if can? :delete_emails, Kaui::Account -%><%= link_to '<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg" style="vertical-align: middle;">
8
+ <path d="M9.8335 2.5L2.8335 9.50001M2.8335 2.5L9.8335 9.50001" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
9
+ </svg>'.html_safe, kaui_engine.account_account_email_path(account_email.account_id, account_email.email), :method => :delete -%><% end -%>
10
+ </div>
7
11
  <% end %>
12
+ </div>
8
13
  <% end %>
9
14
  <% if can? :add_emails, Kaui::Account %>
10
- <%= link_to '&nbsp<i class="fa fa-plus"></i>'.html_safe, kaui_engine.new_account_account_email_path(@account.account_id) %>
15
+ <%= link_to kaui_engine.new_account_account_email_path(@account.account_id), class: 'add-link' do %>
16
+ <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
17
+ <path d="M8.33333 2.66675V13.3334M13.6667 8.00008H3" stroke="#1570EF" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
18
+ </svg>
19
+ Add
20
+ <% end %>
11
21
  <% end %>
12
22
  </td>
13
23
  </tr>