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.
- checksums.yaml +4 -4
- data/app/assets/images/kaui/account/authorize.svg +4 -0
- data/app/assets/images/kaui/account/credit.svg +4 -0
- data/app/assets/images/kaui/account/down-arrow.svg +3 -0
- data/app/assets/images/kaui/account/edit.svg +4 -0
- data/app/assets/images/kaui/account/pay-all.svg +5 -0
- data/app/assets/images/kaui/account/plus.svg +3 -0
- data/app/assets/images/kaui/account/purchase.svg +5 -0
- data/app/assets/images/kaui/account/refresh.svg +5 -0
- data/app/assets/images/kaui/arrow.svg +3 -0
- data/app/assets/images/kaui/card.svg +5 -0
- data/app/assets/images/kaui/copy.svg +12 -0
- data/app/assets/images/kaui/dashboard/aviate.svg +6 -0
- data/app/assets/images/kaui/dashboard/custom-field.svg +5 -0
- data/app/assets/images/kaui/dashboard/kaui-doc-img.png +0 -0
- data/app/assets/images/kaui/dashboard/plugins.svg +7 -0
- data/app/assets/images/kaui/dashboard/tags.svg +4 -0
- data/app/assets/images/kaui/dashboard/users.svg +6 -0
- data/app/assets/images/kaui/delete.svg +6 -0
- data/app/assets/images/kaui/dots.svg +5 -0
- data/app/assets/images/kaui/download-csv.svg +5 -0
- data/app/assets/images/kaui/download.svg +4 -0
- data/app/assets/images/kaui/eye-off.svg +9 -0
- data/app/assets/images/kaui/eye.svg +7 -0
- data/app/assets/images/kaui/file-upload.svg +34 -0
- data/app/assets/images/kaui/generate.svg +5 -0
- data/app/assets/images/kaui/header/account.svg +4 -0
- data/app/assets/images/kaui/header/cog_icon.svg +4 -0
- data/app/assets/images/kaui/header/invoice.svg +5 -0
- data/app/assets/images/kaui/header/payment.svg +5 -0
- data/app/assets/images/kaui/header/search_icon.svg +4 -0
- data/app/assets/images/kaui/header/subscription.svg +6 -0
- data/app/assets/images/kaui/logout.svg +4 -0
- data/app/assets/images/kaui/modal/close.svg +3 -0
- data/app/assets/images/kaui/modal/plus.svg +3 -0
- data/app/assets/images/kaui/modal/red-close.svg +10 -0
- data/app/assets/images/kaui/modal/search.svg +4 -0
- data/app/assets/images/kaui/payment/payment.svg +4 -0
- data/app/assets/images/kaui/payment/refund.svg +4 -0
- data/app/assets/images/kaui/plus.svg +3 -0
- data/app/assets/images/kaui/search.svg +4 -0
- data/app/assets/images/kaui/setting/account.svg +10 -0
- data/app/assets/images/kaui/setting/analytics.svg +7 -0
- data/app/assets/images/kaui/setting/custom-field.svg +5 -0
- data/app/assets/images/kaui/setting/e-notifications.svg +6 -0
- data/app/assets/images/kaui/setting/plugins.svg +7 -0
- data/app/assets/images/kaui/setting/plus.svg +3 -0
- data/app/assets/images/kaui/setting/reset.svg +4 -0
- data/app/assets/images/kaui/setting/tag-definitions.svg +5 -0
- data/app/assets/images/kaui/setting/tags.svg +4 -0
- data/app/assets/images/kaui/setting/tenants.svg +6 -0
- data/app/assets/images/kaui/setting/users.svg +6 -0
- data/app/assets/images/kaui/setting.svg +4 -0
- data/app/assets/images/kaui/sidebar/account.svg +4 -0
- data/app/assets/images/kaui/sidebar/audit.svg +5 -0
- data/app/assets/images/kaui/sidebar/custom-fields.svg +5 -0
- data/app/assets/images/kaui/sidebar/invoices.svg +5 -0
- data/app/assets/images/kaui/sidebar/payments.svg +5 -0
- data/app/assets/images/kaui/sidebar/queues.svg +5 -0
- data/app/assets/images/kaui/sidebar/subscriptions.svg +6 -0
- data/app/assets/images/kaui/sidebar/tags.svg +5 -0
- data/app/assets/images/kaui/sidebar/timeline.svg +5 -0
- data/app/assets/images/kaui/sign_in_background.svg +57 -0
- data/app/assets/images/kaui/sort-down.svg +3 -0
- data/app/assets/images/kaui/sort-up.svg +3 -0
- data/app/assets/images/kaui/subscription/add-on.svg +7 -0
- data/app/assets/images/kaui/subscription/cancel.svg +6 -0
- data/app/assets/images/kaui/subscription/change.svg +6 -0
- data/app/assets/images/kaui/subscription/date.svg +6 -0
- data/app/assets/images/kaui/subscription/pause.svg +4 -0
- data/app/assets/images/kaui/timeline/authorize.svg +5 -0
- data/app/assets/images/kaui/timeline/capture.svg +5 -0
- data/app/assets/images/kaui/timeline/chargeback.svg +3 -0
- data/app/assets/images/kaui/timeline/credit.svg +6 -0
- data/app/assets/images/kaui/timeline/invoice.svg +5 -0
- data/app/assets/images/kaui/timeline/purchase.svg +5 -0
- data/app/assets/images/kaui/timeline/refund.svg +4 -0
- data/app/assets/images/kaui/timeline/void.svg +4 -0
- data/app/assets/images/kaui/view-doc.svg +6 -0
- data/app/assets/images/kaui/warning.png +0 -0
- data/app/assets/javascripts/application.js +2 -2
- data/app/assets/javascripts/kaui/kaui_override.js +232 -0
- data/app/assets/javascripts/kaui/multi_functions_bar_utils.js +125 -24
- data/app/assets/stylesheets/application.css +13 -1
- data/app/assets/stylesheets/kaui/account.css +2028 -14
- data/app/assets/stylesheets/kaui/account_timeline.css +183 -0
- data/app/assets/stylesheets/kaui/admin_allowed_users.css +260 -0
- data/app/assets/stylesheets/kaui/audit.css +26 -16
- data/app/assets/stylesheets/kaui/audit_logs.css +443 -0
- data/app/assets/stylesheets/kaui/auth_pages.css +72 -0
- data/app/assets/stylesheets/kaui/breadcrumb.css +38 -0
- data/app/assets/stylesheets/kaui/chargebacks.css +118 -0
- data/app/assets/stylesheets/kaui/clock.css +103 -0
- data/app/assets/stylesheets/kaui/common.css +1744 -401
- data/app/assets/stylesheets/kaui/custom_fields.css +546 -0
- data/app/assets/stylesheets/kaui/dashboard.css +26 -0
- data/app/assets/stylesheets/kaui/datatable.css +114 -56
- data/app/assets/stylesheets/kaui/header.css +221 -114
- data/app/assets/stylesheets/kaui/home.css +89 -62
- data/app/assets/stylesheets/kaui/invoice.css +1061 -27
- data/app/assets/stylesheets/kaui/kaui.css +217 -145
- data/app/assets/stylesheets/kaui/overdue.css +5 -3
- data/app/assets/stylesheets/kaui/payment.css +1102 -13
- data/app/assets/stylesheets/kaui/queues.css +269 -0
- data/app/assets/stylesheets/kaui/refunds.css +185 -0
- data/app/assets/stylesheets/kaui/role_definitions.css +111 -0
- data/app/assets/stylesheets/kaui/sidebar.css +122 -0
- data/app/assets/stylesheets/kaui/subscription.css +677 -0
- data/app/assets/stylesheets/kaui/tag_definitions.css +524 -0
- data/app/assets/stylesheets/kaui/tags.css +592 -121
- data/app/assets/stylesheets/kaui/tenants.css +1478 -0
- data/app/assets/stylesheets/kaui/tooltip.css +9 -5
- data/app/assets/stylesheets/kaui/wallets.css +121 -0
- data/app/controllers/kaui/accounts_controller.rb +3 -2
- data/app/controllers/kaui/admin_tenants_controller.rb +33 -0
- data/app/controllers/kaui/custom_fields_controller.rb +1 -1
- data/app/controllers/kaui/engine_controller.rb +1 -2
- data/app/controllers/kaui/engine_controller_util.rb +5 -7
- data/app/controllers/kaui/home_controller.rb +24 -17
- data/app/controllers/kaui/invoices_controller.rb +4 -15
- data/app/controllers/kaui/payments_controller.rb +1 -1
- data/app/controllers/kaui/sessions_controller.rb +1 -0
- data/app/controllers/kaui/tag_definitions_controller.rb +1 -0
- data/app/helpers/kaui/account_helper.rb +13 -0
- data/app/helpers/kaui/plugin_helper.rb +27 -0
- data/app/views/kaui/account_custom_fields/index.html.erb +95 -29
- data/app/views/kaui/account_emails/_account_emails_table.html.erb +13 -3
- data/app/views/kaui/account_emails/_form.html.erb +23 -6
- data/app/views/kaui/account_emails/new.html.erb +12 -6
- data/app/views/kaui/account_tags/_form_bar.html.erb +10 -1
- data/app/views/kaui/account_tags/index.html.erb +103 -24
- data/app/views/kaui/account_timelines/_multi_functions_bar.html.erb +302 -69
- data/app/views/kaui/account_timelines/show.html.erb +360 -254
- data/app/views/kaui/accounts/_account_details.html.erb +165 -0
- data/app/views/kaui/accounts/_account_filterbar.html.erb +70 -80
- data/app/views/kaui/accounts/_add_parent.html.erb +26 -0
- data/app/views/kaui/accounts/_billing_details.html.erb +196 -0
- data/app/views/kaui/accounts/_close_account_modal.html.erb +62 -40
- data/app/views/kaui/accounts/_form_account.html.erb +157 -0
- data/app/views/kaui/accounts/_functions_bar.html.erb +606 -0
- data/app/views/kaui/accounts/_link_parent_modal.html.erb +1 -1
- data/app/views/kaui/accounts/_link_parent_to_modal.html.erb +62 -0
- data/app/views/kaui/accounts/_multi_functions_bar.html.erb +67 -28
- data/app/views/kaui/accounts/_payment_gateways.html.erb +43 -0
- data/app/views/kaui/accounts/_personal_details.html.erb +67 -0
- data/app/views/kaui/accounts/edit.html.erb +15 -9
- data/app/views/kaui/accounts/index.html.erb +77 -27
- data/app/views/kaui/accounts/new.html.erb +14 -8
- data/app/views/kaui/accounts/show.html.erb +17 -11
- data/app/views/kaui/admin/index.html.erb +44 -19
- data/app/views/kaui/admin_allowed_users/_form.html.erb +123 -31
- data/app/views/kaui/admin_allowed_users/edit.html.erb +15 -9
- data/app/views/kaui/admin_allowed_users/index.html.erb +150 -30
- data/app/views/kaui/admin_allowed_users/new.html.erb +14 -8
- data/app/views/kaui/admin_allowed_users/show.html.erb +137 -32
- data/app/views/kaui/admin_tenants/_add_allowed_user_modal.html.erb +42 -15
- data/app/views/kaui/admin_tenants/_clock.html.erb +72 -0
- data/app/views/kaui/admin_tenants/_form.html.erb +32 -20
- data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +21 -8
- data/app/views/kaui/admin_tenants/_form_invoice_template.erb +25 -9
- data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +36 -20
- data/app/views/kaui/admin_tenants/_form_plugin_config.erb +16 -20
- data/app/views/kaui/admin_tenants/_show_catalog.erb +13 -6
- data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +95 -46
- data/app/views/kaui/admin_tenants/_show_catalog_xml.erb +62 -37
- data/app/views/kaui/admin_tenants/_show_overdue.erb +91 -75
- data/app/views/kaui/admin_tenants/_tenant_details.html.erb +106 -17
- data/app/views/kaui/admin_tenants/_tenants_table.html.erb +67 -6
- data/app/views/kaui/admin_tenants/_useful_links.html.erb +21 -16
- data/app/views/kaui/admin_tenants/index.html.erb +35 -11
- data/app/views/kaui/admin_tenants/index.js.erb +3 -0
- data/app/views/kaui/admin_tenants/new.html.erb +19 -13
- data/app/views/kaui/admin_tenants/new_catalog.html.erb +230 -98
- data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +152 -80
- data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +44 -30
- data/app/views/kaui/admin_tenants/show.html.erb +211 -78
- data/app/views/kaui/admin_tenants/show.js.erb +3 -0
- data/app/views/kaui/audit_logs/_multi_functions_bar.html.erb +298 -101
- data/app/views/kaui/audit_logs/index.html.erb +137 -38
- data/app/views/kaui/bundle_tags/_form_bar.html.erb +11 -4
- data/app/views/kaui/bundles/_bundle_details.html.erb +24 -12
- data/app/views/kaui/bundles/index.html.erb +79 -104
- data/app/views/kaui/bundles/pause_resume.html.erb +73 -38
- data/app/views/kaui/chargebacks/_form.html.erb +35 -18
- data/app/views/kaui/chargebacks/new.html.erb +16 -9
- data/app/views/kaui/charges/_form.html.erb +54 -42
- data/app/views/kaui/charges/new.html.erb +15 -8
- data/app/views/kaui/components/breadcrumb/_breadcrumb.html.erb +146 -0
- data/app/views/kaui/components/button/_button.html.erb +16 -0
- data/app/views/kaui/components/dashboard/_card.html.erb +15 -0
- data/app/views/kaui/components/dashboard/_setting.html.erb +15 -0
- data/app/views/kaui/components/form_input/_form_input.html.erb +4 -0
- data/app/views/kaui/components/form_password/_form_password.html.erb +6 -0
- data/app/views/kaui/components/logo/_logo.html.erb +1 -0
- data/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb +59 -0
- data/app/views/kaui/components/search_input/_search_input.html.erb +81 -0
- data/app/views/kaui/credits/_form.html.erb +42 -25
- data/app/views/kaui/credits/new.html.erb +15 -8
- data/app/views/kaui/custom_fields/_form.html.erb +37 -25
- data/app/views/kaui/custom_fields/_list_bar.html.erb +11 -10
- data/app/views/kaui/custom_fields/index.html.erb +121 -27
- data/app/views/kaui/custom_fields/new.html.erb +19 -8
- data/app/views/kaui/errors/500.html.erb +1 -1
- data/app/views/kaui/home/index.html.erb +77 -30
- data/app/views/kaui/invoice_items/_edit_form.html.erb +30 -14
- data/app/views/kaui/invoice_items/edit.html.erb +15 -7
- data/app/views/kaui/invoice_tags/_form_bar.html.erb +13 -3
- data/app/views/kaui/invoices/_invoice_filterbar.html.erb +53 -69
- data/app/views/kaui/invoices/_invoice_table.html.erb +77 -92
- data/app/views/kaui/invoices/_multi_functions_bar.html.erb +351 -140
- data/app/views/kaui/invoices/index.html.erb +89 -27
- data/app/views/kaui/invoices/show.html.erb +392 -80
- data/app/views/kaui/layouts/kaui_account_sidebar.html.erb +42 -0
- data/app/views/kaui/layouts/kaui_application.html.erb +29 -15
- data/app/views/kaui/layouts/kaui_flash.html.erb +82 -31
- data/app/views/kaui/layouts/kaui_navbar.html.erb +109 -82
- data/app/views/kaui/layouts/kaui_setting_sidebar.html.erb +36 -0
- data/app/views/kaui/payment_methods/_form.html.erb +32 -11
- data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +35 -34
- data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +27 -29
- data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +116 -38
- data/app/views/kaui/payment_methods/_plugin_properties.html.erb +19 -9
- data/app/views/kaui/payment_methods/new.html.erb +14 -8
- data/app/views/kaui/payments/_form.html.erb +30 -13
- data/app/views/kaui/payments/_multi_functions_bar.html.erb +351 -141
- data/app/views/kaui/payments/_payment_filterbar.html.erb +63 -79
- data/app/views/kaui/payments/_payment_invoice_table.html.erb +105 -0
- data/app/views/kaui/payments/_payment_table.html.erb +4 -67
- data/app/views/kaui/payments/index.html.erb +90 -26
- data/app/views/kaui/payments/new.html.erb +15 -8
- data/app/views/kaui/payments/show.html.erb +222 -28
- data/app/views/kaui/queues/index.html.erb +329 -111
- data/app/views/kaui/refunds/_form.html.erb +68 -45
- data/app/views/kaui/refunds/new.html.erb +15 -8
- data/app/views/kaui/role_definitions/_form.html.erb +104 -17
- data/app/views/kaui/role_definitions/new.html.erb +15 -8
- data/app/views/kaui/sessions/_form.html.erb +9 -19
- data/app/views/kaui/sessions/new.html.erb +10 -9
- data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +65 -35
- data/app/views/kaui/subscriptions/_edit_form.html.erb +66 -35
- data/app/views/kaui/subscriptions/_form.html.erb +63 -32
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +215 -57
- data/app/views/kaui/subscriptions/edit.html.erb +19 -8
- data/app/views/kaui/subscriptions/edit_bcd.erb +46 -16
- data/app/views/kaui/subscriptions/new.html.erb +22 -15
- data/app/views/kaui/tag_definitions/_form.html.erb +51 -30
- data/app/views/kaui/tag_definitions/index.html.erb +151 -40
- data/app/views/kaui/tag_definitions/new.html.erb +15 -8
- data/app/views/kaui/tags/index.html.erb +136 -47
- data/app/views/kaui/tenants/_form.html.erb +8 -5
- data/app/views/kaui/tenants/index.html.erb +15 -9
- data/app/views/kaui/transactions/_control_plugin_names.html.erb +18 -10
- data/app/views/kaui/transactions/_form.html.erb +86 -25
- data/app/views/kaui/transactions/new.html.erb +15 -9
- data/config/routes.rb +1 -0
- data/lib/kaui/engine.rb +11 -0
- data/lib/kaui/version.rb +1 -1
- data/lib/kaui.rb +0 -1
- metadata +120 -2
|
@@ -1,117 +1,272 @@
|
|
|
1
|
-
<
|
|
2
|
-
<%=
|
|
3
|
-
|
|
4
|
-
<%=
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<div class="kaui-container kaui-queues-index">
|
|
2
|
+
<%= render "kaui/components/breadcrumb/breadcrumb" %>
|
|
3
|
+
<div class="d-flex w-100" style="gap: 4rem;">
|
|
4
|
+
<%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
|
|
5
|
+
<div class="queues w-100">
|
|
6
|
+
<div class="d-flex flex-column ">
|
|
7
|
+
<div class="queues-header mb-4">
|
|
8
|
+
<div class="d-flex align-items-center">
|
|
9
|
+
<h2>Queues</h2>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="text-center filter-tabs">
|
|
13
|
+
<%= link_to 'Current or future entries',
|
|
14
|
+
kaui_engine.queues_path(
|
|
15
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history)
|
|
16
|
+
.merge(with_history: 'false',
|
|
17
|
+
tab: 'future',
|
|
18
|
+
max_date: (@now + 1.week).utc.iso8601)
|
|
19
|
+
),
|
|
20
|
+
class: (params[:tab] == 'future' ? 'activelink' : '') %>
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
<% unless params[:account_id].present? -%>
|
|
23
|
+
<%= link_to 'Historical entries (last week)',
|
|
24
|
+
kaui_engine.queues_path(
|
|
25
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history)
|
|
26
|
+
.merge(with_history: 'true',
|
|
27
|
+
tab: 'week',
|
|
28
|
+
min_date: (@now - 1.week).utc.iso8601,
|
|
29
|
+
max_date: (@now + 1.week).utc.iso8601)
|
|
30
|
+
),
|
|
31
|
+
class: (params[:tab] == 'week' ? 'activelink' : '') %>
|
|
14
32
|
|
|
15
|
-
|
|
33
|
+
<%= link_to 'Historical entries (last month)',
|
|
34
|
+
kaui_engine.queues_path(
|
|
35
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history)
|
|
36
|
+
.merge(with_history: 'true',
|
|
37
|
+
tab: 'month',
|
|
38
|
+
min_date: (@now - 1.month).utc.iso8601,
|
|
39
|
+
max_date: (@now + 1.week).utc.iso8601)
|
|
40
|
+
),
|
|
41
|
+
class: (params[:tab] == 'month' ? 'activelink' : '') %>
|
|
42
|
+
<% end -%>
|
|
16
43
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<th>User token</th>
|
|
25
|
-
<% if @account_id.blank? %>
|
|
26
|
-
<th>Account record id</th>
|
|
27
|
-
<% end %>
|
|
28
|
-
<th></th>
|
|
29
|
-
</tr>
|
|
30
|
-
</thead>
|
|
31
|
-
<tbody>
|
|
32
|
-
<% @queues_entries['busEvents'].each do |bus_event| %>
|
|
33
|
-
<% if bus_event['createdDate'].to_datetime < @now %>
|
|
34
|
-
<tr class="disabled">
|
|
35
|
-
<% else %>
|
|
36
|
-
<tr>
|
|
37
|
-
<% end %>
|
|
38
|
-
<td><%= truncate_millis(bus_event['createdDate']) %></td>
|
|
39
|
-
<td><%= truncate_class_name(bus_event['className'], false) %></td>
|
|
40
|
-
<td><%= "<pre>#{JSON.pretty_generate(bus_event['event'])}</pre>".html_safe %></td>
|
|
41
|
-
<td><%= object_id_popover(bus_event['userToken'], 'left') %></td>
|
|
42
|
-
<% if @account_id.blank? %>
|
|
43
|
-
<td><%= bus_event['searchKey1'] %></td>
|
|
44
|
-
<% end %>
|
|
45
|
-
<td><%= bus_event['userToken'] %></td>
|
|
46
|
-
</tr>
|
|
47
|
-
<% end %>
|
|
48
|
-
</tbody>
|
|
49
|
-
</table>
|
|
44
|
+
<%= link_to 'All historical entries',
|
|
45
|
+
kaui_engine.queues_path(
|
|
46
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history)
|
|
47
|
+
.merge(with_history: 'true',
|
|
48
|
+
tab: 'all')
|
|
49
|
+
),
|
|
50
|
+
class: (params[:tab] == 'all' ? 'activelink' : '') %>
|
|
50
51
|
</div>
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
<% end %>
|
|
54
|
-
<% unless (@queues_entries['notifications'] || []).empty? %>
|
|
55
|
-
<div class="column-block">
|
|
53
|
+
<div class="search">
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
<% unless (@queues_entries['busEvents'] || []).empty? %>
|
|
56
|
+
<div class="d-flex flex-column ">
|
|
57
|
+
<div class="queues-header mb-4">
|
|
58
|
+
<div class="d-flex align-items-center">
|
|
59
|
+
<h2>Bus events</h2>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
63
|
+
<div class="<%= params[:account_id].present? ? 'max-width-67' : 'max-width-80' %>">
|
|
64
|
+
<table id="bus-table" class="bus-table">
|
|
65
|
+
<thead>
|
|
66
|
+
<tr>
|
|
67
|
+
<th></th>
|
|
68
|
+
<th class="sortable-header" data-column="1">
|
|
69
|
+
<div class="header-content">
|
|
70
|
+
<span class="header-text">Created date</span>
|
|
71
|
+
<div class="sort-icons">
|
|
72
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
73
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</th>
|
|
77
|
+
<th class="sortable-header" data-column="2">
|
|
78
|
+
<div class="header-content">
|
|
79
|
+
<span class="header-text">Class name</span>
|
|
80
|
+
<div class="sort-icons">
|
|
81
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
82
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</th>
|
|
86
|
+
<th class="sortable-header" data-column="3">
|
|
87
|
+
<div class="header-content">
|
|
88
|
+
<span class="header-text">Event</span>
|
|
89
|
+
<div class="sort-icons">
|
|
90
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
91
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</th>
|
|
95
|
+
<th class="sortable-header" data-column="4">
|
|
96
|
+
<div class="header-content">
|
|
97
|
+
<span class="header-text">User token</span>
|
|
98
|
+
<div class="sort-icons">
|
|
99
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
100
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</th>
|
|
104
|
+
<% if @account_id.blank? %>
|
|
105
|
+
<th class="sortable-header" data-column="5">
|
|
106
|
+
<div class="header-content">
|
|
107
|
+
<span class="header-text">Account record id</span>
|
|
108
|
+
<div class="sort-icons">
|
|
109
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
110
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</th>
|
|
114
|
+
<% end %>
|
|
115
|
+
<% if @account_id.present? %>
|
|
116
|
+
<th class="sortable-header" data-column="5">
|
|
117
|
+
<div class="header-content">
|
|
118
|
+
<span class="header-text">User token</span>
|
|
119
|
+
<div class="sort-icons">
|
|
120
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
121
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</th>
|
|
125
|
+
<% end %>
|
|
126
|
+
</tr>
|
|
127
|
+
</thead>
|
|
128
|
+
<tbody>
|
|
129
|
+
<% @queues_entries['busEvents'].each do |bus_event| %>
|
|
130
|
+
<tr>
|
|
131
|
+
<td class="timeline">
|
|
132
|
+
<span class="dot"></span>
|
|
133
|
+
</td>
|
|
134
|
+
<td><span><%= truncate_millis(bus_event['createdDate']) %></span></td>
|
|
135
|
+
<td><%= truncate_class_name(bus_event['className'], false) %></td>
|
|
136
|
+
<td><%= "<pre>#{JSON.pretty_generate(bus_event['event'])}</pre>".html_safe %></td>
|
|
137
|
+
<td><%= bus_event['userToken'] %></td>
|
|
138
|
+
<% if @account_id.blank? %>
|
|
139
|
+
<td><%= bus_event['searchKey1'] %></td>
|
|
140
|
+
<% end %>
|
|
141
|
+
<% if @account_id.present? %>
|
|
142
|
+
<td><%= bus_event['userToken'] %></td>
|
|
143
|
+
<% end %>
|
|
144
|
+
</tr>
|
|
88
145
|
<% end %>
|
|
89
|
-
|
|
90
|
-
</
|
|
91
|
-
|
|
92
|
-
</
|
|
93
|
-
|
|
94
|
-
|
|
146
|
+
</tbody>
|
|
147
|
+
</table>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<% end %>
|
|
151
|
+
<% unless (@queues_entries['notifications'] || []).empty? %>
|
|
152
|
+
<div class="d-flex flex-column ">
|
|
153
|
+
<div class="queues-header mb-4">
|
|
154
|
+
<div class="d-flex align-items-center">
|
|
155
|
+
<h2>Notifications</h2>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
95
158
|
|
|
96
|
-
|
|
97
|
-
|
|
159
|
+
<div class="<%= params[:account_id].present? ? 'max-width-67' : 'max-width-80' %>">
|
|
160
|
+
<table id="notifications-table" class="notifications-table">
|
|
161
|
+
<thead>
|
|
162
|
+
<tr>
|
|
163
|
+
<th></th>
|
|
164
|
+
<th class="sortable-header" data-column="1">
|
|
165
|
+
<div class="header-content">
|
|
166
|
+
<span class="header-text">Effective date</span>
|
|
167
|
+
<div class="sort-icons">
|
|
168
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
169
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</th>
|
|
173
|
+
<th class="sortable-header" data-column="2">
|
|
174
|
+
<div class="header-content">
|
|
175
|
+
<span class="header-text">Queue name</span>
|
|
176
|
+
<div class="sort-icons">
|
|
177
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
178
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</th>
|
|
182
|
+
<th class="sortable-header" data-column="3">
|
|
183
|
+
<div class="header-content">
|
|
184
|
+
<span class="header-text">Event</span>
|
|
185
|
+
<div class="sort-icons">
|
|
186
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
187
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
</th>
|
|
191
|
+
<th class="sortable-header" data-column="4">
|
|
192
|
+
<div class="header-content">
|
|
193
|
+
<span class="header-text">User token</span>
|
|
194
|
+
<div class="sort-icons">
|
|
195
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
196
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</th>
|
|
200
|
+
<% if @account_id.blank? %>
|
|
201
|
+
<th class="sortable-header" data-column="5">
|
|
202
|
+
<div class="header-content">
|
|
203
|
+
<span class="header-text">Account record id</span>
|
|
204
|
+
<div class="sort-icons">
|
|
205
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
206
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</th>
|
|
210
|
+
<% end %>
|
|
211
|
+
<% if @account_id.present? %>
|
|
212
|
+
<th class="sortable-header" data-column="5">
|
|
213
|
+
<div class="header-content">
|
|
214
|
+
<span class="header-text">User token</span>
|
|
215
|
+
<div class="sort-icons">
|
|
216
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
217
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</th>
|
|
221
|
+
<% end %>
|
|
222
|
+
</tr>
|
|
223
|
+
</thead>
|
|
224
|
+
<tbody>
|
|
225
|
+
<% @queues_entries['notifications'].each do |notification| %>
|
|
226
|
+
<% if notification['effectiveDate'].to_datetime < @now %>
|
|
227
|
+
<tr class="">
|
|
228
|
+
<% else %>
|
|
229
|
+
<tr>
|
|
230
|
+
<% end %>
|
|
231
|
+
<td class="timeline">
|
|
232
|
+
<div class="dot"></div>
|
|
233
|
+
</td>
|
|
234
|
+
<td><span><%= truncate_millis(notification['effectiveDate']) %></span></td>
|
|
235
|
+
<td>
|
|
236
|
+
<%= notification['queueName'] %>
|
|
237
|
+
</td>
|
|
238
|
+
<td><%= "<pre>#{JSON.pretty_generate(notification['event'])}</pre>".html_safe %></td>
|
|
239
|
+
<td><%= notification['userToken'] %></td>
|
|
240
|
+
<% if @account_id.blank? %>
|
|
241
|
+
<td><%= notification['searchKey1'] %></td>
|
|
242
|
+
<% end %>
|
|
243
|
+
<% if @account_id.present? %>
|
|
244
|
+
<td><%= notification['userToken'] %></td>
|
|
245
|
+
<% end %>
|
|
246
|
+
</tr>
|
|
247
|
+
<% end %>
|
|
248
|
+
</tbody>
|
|
249
|
+
</table>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
<% end %>
|
|
98
253
|
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
99
258
|
</div>
|
|
100
259
|
|
|
101
260
|
<% nb_bus_entries = (@queues_entries['busEvents'] || []).size %>
|
|
102
261
|
<% nb_notifications_entries = (@queues_entries['notifications'] || []).size %>
|
|
103
262
|
<%= javascript_tag do %>
|
|
104
263
|
$(document).ready(function() {
|
|
105
|
-
$('#bus-table').
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"pagingType": "full_numbers",
|
|
112
|
-
"displayStart": <%= [0, nb_bus_entries - 50].max %>,
|
|
113
|
-
<% end %>
|
|
114
|
-
"pageLength": 50,
|
|
264
|
+
var busTable = $('#bus-table').DataTable({
|
|
265
|
+
"dom": "<'row'<'col-md-6'><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
|
266
|
+
"paging": true,
|
|
267
|
+
"pagingType": "full_numbers",
|
|
268
|
+
"pageLength": 25,
|
|
269
|
+
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
|
|
115
270
|
"order": [],
|
|
116
271
|
"columnDefs": [
|
|
117
272
|
{
|
|
@@ -119,18 +274,28 @@
|
|
|
119
274
|
"visible": false,
|
|
120
275
|
"searchable": true
|
|
121
276
|
}
|
|
122
|
-
]
|
|
277
|
+
],
|
|
278
|
+
"language": {
|
|
279
|
+
"paginate": {
|
|
280
|
+
"first": "First",
|
|
281
|
+
"last": "Last",
|
|
282
|
+
"next": "Next",
|
|
283
|
+
"previous": "Previous"
|
|
284
|
+
},
|
|
285
|
+
"lengthMenu": "Show _MENU_ entries",
|
|
286
|
+
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
|
|
287
|
+
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
|
288
|
+
"infoFiltered": "(filtered from _MAX_ total entries)",
|
|
289
|
+
"search": "Search:",
|
|
290
|
+
"zeroRecords": "No matching records found"
|
|
291
|
+
}
|
|
123
292
|
});
|
|
124
|
-
$('#notifications-table').
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"pagingType": "full_numbers",
|
|
131
|
-
"displayStart": 0,
|
|
132
|
-
<% end %>
|
|
133
|
-
"pageLength": 50,
|
|
293
|
+
var notificationsTable = $('#notifications-table').DataTable({
|
|
294
|
+
"dom": "<'row'<'col-md-6'><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
|
295
|
+
"paging": true,
|
|
296
|
+
"pagingType": "full_numbers",
|
|
297
|
+
"pageLength": 25,
|
|
298
|
+
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
|
|
134
299
|
"order": [],
|
|
135
300
|
"columnDefs": [
|
|
136
301
|
{
|
|
@@ -138,7 +303,60 @@
|
|
|
138
303
|
"visible": false,
|
|
139
304
|
"searchable": true
|
|
140
305
|
}
|
|
141
|
-
]
|
|
306
|
+
],
|
|
307
|
+
"language": {
|
|
308
|
+
"paginate": {
|
|
309
|
+
"first": "First",
|
|
310
|
+
"last": "Last",
|
|
311
|
+
"next": "Next",
|
|
312
|
+
"previous": "Previous"
|
|
313
|
+
},
|
|
314
|
+
"lengthMenu": "Show _MENU_ entries",
|
|
315
|
+
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
|
|
316
|
+
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
|
317
|
+
"infoFiltered": "(filtered from _MAX_ total entries)",
|
|
318
|
+
"search": "Search:",
|
|
319
|
+
"zeroRecords": "No matching records found"
|
|
320
|
+
}
|
|
142
321
|
});
|
|
143
|
-
|
|
322
|
+
|
|
323
|
+
// Custom sorting for Bus table
|
|
324
|
+
(function() {
|
|
325
|
+
var currentSortColumn = -1;
|
|
326
|
+
var currentSortDirection = 'asc';
|
|
327
|
+
$('#bus-table thead .sortable-header').on('click', function() {
|
|
328
|
+
var columnIndex = parseInt($(this).data('column'));
|
|
329
|
+
var newDirection = (currentSortColumn === columnIndex && currentSortDirection === 'asc') ? 'desc' : 'asc';
|
|
330
|
+
currentSortColumn = columnIndex;
|
|
331
|
+
currentSortDirection = newDirection;
|
|
332
|
+
updateSortIndicators($('#bus-table'), columnIndex, newDirection);
|
|
333
|
+
busTable.order([columnIndex, newDirection]).draw();
|
|
334
|
+
});
|
|
335
|
+
})();
|
|
336
|
+
|
|
337
|
+
// Custom sorting for Notifications table
|
|
338
|
+
(function() {
|
|
339
|
+
var currentSortColumn = -1;
|
|
340
|
+
var currentSortDirection = 'asc';
|
|
341
|
+
$('#notifications-table thead .sortable-header').on('click', function() {
|
|
342
|
+
var columnIndex = parseInt($(this).data('column'));
|
|
343
|
+
var newDirection = (currentSortColumn === columnIndex && currentSortDirection === 'asc') ? 'desc' : 'asc';
|
|
344
|
+
currentSortColumn = columnIndex;
|
|
345
|
+
currentSortDirection = newDirection;
|
|
346
|
+
updateSortIndicators($('#notifications-table'), columnIndex, newDirection);
|
|
347
|
+
notificationsTable.order([columnIndex, newDirection]).draw();
|
|
348
|
+
});
|
|
349
|
+
})();
|
|
350
|
+
|
|
351
|
+
function updateSortIndicators($table, columnIndex, direction) {
|
|
352
|
+
$table.find('.sortable-header').removeClass('sort-asc-active sort-desc-active');
|
|
353
|
+
$table.find('.sort-icon').removeClass('active');
|
|
354
|
+
var $header = $table.find('.sortable-header[data-column="' + columnIndex + '"]');
|
|
355
|
+
$header.addClass(direction + '-active');
|
|
356
|
+
$header.find('.sort-' + direction).addClass('active');
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
$('#bus-table').wrap('<div class="table-wrapper"></div>');
|
|
360
|
+
$('#notifications-table').wrap('<div class="table-wrapper"></div>');
|
|
361
|
+
});
|
|
144
362
|
<% end %>
|
|
@@ -3,72 +3,95 @@
|
|
|
3
3
|
<%= hidden_field_tag :payment_id, @payment.payment_id %>
|
|
4
4
|
<%= hidden_field_tag :invoice_id, @invoice.invoice_id %>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<% end %>
|
|
13
|
-
</div>
|
|
14
|
-
<% if can? :item_adjust, Kaui::Invoice %>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<div class="form-group d-flex pb-3">
|
|
9
|
+
<%= label_tag :adjustment_type, 'Type', :class => 'col-sm-3 control-label' %>
|
|
10
|
+
<div class="col-sm-offset-2 col-sm-9">
|
|
11
|
+
<div class="toggle-segment">
|
|
15
12
|
<div class="checkbox">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
<%= label_tag :adjustment_type, for: 'adjustment_type_noInvoiceAdjustment' do %>
|
|
14
|
+
<%= radio_button_tag :adjustment_type, 'noInvoiceAdjustment', true, id: 'adjustment_type_noInvoiceAdjustment' %>
|
|
15
|
+
No Invoice Adjustment
|
|
16
|
+
<% end %>
|
|
20
17
|
</div>
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<% if can? :item_adjust, Kaui::Invoice %>
|
|
19
|
+
<div class="checkbox">
|
|
20
|
+
<%= label_tag :adjustment_type, for: 'adjustment_type_invoiceItemAdjustment' do %>
|
|
21
|
+
<%= radio_button_tag :adjustment_type, 'invoiceItemAdjustment', false, id: 'adjustment_type_invoiceItemAdjustment' %>
|
|
22
|
+
Invoice Item Adjustment
|
|
23
|
+
<% end %>
|
|
24
|
+
</div>
|
|
25
|
+
<% end %>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
23
28
|
</div>
|
|
24
29
|
|
|
30
|
+
|
|
25
31
|
<div id="invoiceItems" style="display:none">
|
|
26
|
-
<div class="form-group">
|
|
27
|
-
<label class="col-sm-
|
|
28
|
-
<div class="col-sm-
|
|
29
|
-
<
|
|
30
|
-
|
|
32
|
+
<div class="form-group d-flex pb-3">
|
|
33
|
+
<label class="col-sm-3 control-label"></label>
|
|
34
|
+
<div class="col-sm-9 checkbox-label d-flex align-items-center gap-2">
|
|
35
|
+
<label for="selectAll" class="d-flex align-items-center gap-2 m-0">
|
|
36
|
+
<input type="checkbox" id="selectAll">
|
|
37
|
+
Select All
|
|
38
|
+
</label>
|
|
31
39
|
</div>
|
|
32
40
|
</div>
|
|
33
41
|
<% @invoice.items.each_with_index do |ii, index| %>
|
|
34
42
|
<% if ii.amount > 0 %>
|
|
35
|
-
<div id=<%= "div_#{ii.invoice_item_id}" %> class="form-group">
|
|
36
|
-
<label class="col-sm-
|
|
43
|
+
<div id=<%= "div_#{ii.invoice_item_id}" %> class="form-group d-flex pb-3">
|
|
44
|
+
<label class="col-sm-3 control-label "></label>
|
|
37
45
|
|
|
38
46
|
<% bundle_result = @bundles.find { |bundle| bundle.bundle_id == ii.bundle_id } %>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
<div class="col-sm-9 checkbox-label">
|
|
48
|
+
<label for="<%= "cb_adj_#{ii.invoice_item_id}" %>" class="d-flex align-items-center gap-2 mb-1">
|
|
49
|
+
<input type="checkbox" id="<%= "cb_adj_#{ii.invoice_item_id}" %>">
|
|
50
|
+
<%= Kaui.refund_invoice_description.call(index, ii, bundle_result) %>
|
|
51
|
+
</label>
|
|
52
|
+
<%= text_field_tag "adjustments[#{ii.invoice_item_id}]", index, id: "tf_adj_#{ii.invoice_item_id}", value: ii.amount, class: 'form-control checkbox-label' %>
|
|
53
|
+
</div>
|
|
44
54
|
</div>
|
|
45
55
|
<% end %>
|
|
46
56
|
<% end %>
|
|
47
57
|
</div>
|
|
48
58
|
|
|
49
|
-
<div
|
|
50
|
-
<%= label_tag :amount, 'Amount', :class => 'col-sm-
|
|
51
|
-
<div class="col-sm-
|
|
59
|
+
<div class="form-group d-flex pb-3">
|
|
60
|
+
<%= label_tag :amount, 'Amount', :class => 'col-sm-3 control-label' %>
|
|
61
|
+
<div class="col-sm-9 d-flex currency-group">
|
|
52
62
|
<%= number_field_tag :amount, @payment.purchased_amount, :id => 'refund_amount', :class => 'form-control' %>
|
|
53
|
-
<
|
|
63
|
+
<div class="currency"><%= @invoice.currency %></div>
|
|
54
64
|
</div>
|
|
55
65
|
</div>
|
|
56
|
-
<div class="form-group">
|
|
57
|
-
<%= label_tag :reason, 'Reason', :class => 'col-sm-
|
|
58
|
-
<div class="col-sm-
|
|
66
|
+
<div class="form-group d-flex pb-3">
|
|
67
|
+
<%= label_tag :reason, 'Reason', :class => 'col-sm-3 control-label' %>
|
|
68
|
+
<div class="col-sm-9">
|
|
59
69
|
<%= select_tag :reason, options_for_select(Kaui.refund_reason_codes), :class => 'form-control' %>
|
|
60
70
|
</div>
|
|
61
71
|
</div>
|
|
62
|
-
<div class="form-group">
|
|
63
|
-
<%= label_tag :comment, 'Comment', :class => 'col-sm-
|
|
64
|
-
<div class="col-sm-
|
|
72
|
+
<div class="form-group d-flex pb-3 border-bottom mb-3">
|
|
73
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-3 control-label' %>
|
|
74
|
+
<div class="col-sm-9">
|
|
65
75
|
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
|
66
76
|
</div>
|
|
67
77
|
</div>
|
|
68
|
-
<div class="form-group">
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
<div class="form-group d-flex justify-content-end pb-3">
|
|
79
|
+
<%= render "kaui/components/button/button", {
|
|
80
|
+
label: 'Close',
|
|
81
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
82
|
+
type: "button",
|
|
83
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
84
|
+
html_options: {
|
|
85
|
+
id: "closeButton",
|
|
86
|
+
onclick: "window.history.back();"
|
|
87
|
+
}
|
|
88
|
+
} %>
|
|
89
|
+
<%= render "kaui/components/button/button", {
|
|
90
|
+
label: 'Save Payment',
|
|
91
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
92
|
+
type: "submit",
|
|
93
|
+
html_class: "kaui-dropdown custom-hover"
|
|
94
|
+
} %>
|
|
72
95
|
</div>
|
|
73
96
|
<% end %>
|
|
74
97
|
|
|
@@ -96,19 +119,19 @@
|
|
|
96
119
|
var validateInvoiceItemAmount = function(id) {
|
|
97
120
|
var divId = textToDivId(id);
|
|
98
121
|
if (Number($("#" + id).attr('value')) > Number($("#" + id).attr('originalValue'))) {
|
|
99
|
-
setClassForElement($("#" + divId), "form-group error");
|
|
122
|
+
setClassForElement($("#" + divId), "form-group d-flex pb-3 error");
|
|
100
123
|
} else {
|
|
101
|
-
setClassForElement($("#" + divId), "form-group");
|
|
124
|
+
setClassForElement($("#" + divId), "form-group d-flex pb-3");
|
|
102
125
|
}
|
|
103
126
|
};
|
|
104
127
|
|
|
105
128
|
var validateRefundAmount = function() {
|
|
106
129
|
if (Number($("#refund_amount").attr('value')) > <%= @payment.purchased_amount %> ||
|
|
107
130
|
Number($("#refund_amount").attr('value')) <= 0) {
|
|
108
|
-
setClassForElement("#div_refund_amount", "form-group error");
|
|
131
|
+
setClassForElement("#div_refund_amount", "form-group d-flex pb-3 error");
|
|
109
132
|
$('#new_kill_bill_client_model_invoice_item :submit').prop('disabled', true);
|
|
110
133
|
} else {
|
|
111
|
-
setClassForElement("#div_refund_amount", "form-group");
|
|
134
|
+
setClassForElement("#div_refund_amount", "form-group d-flex pb-3");
|
|
112
135
|
$('#new_kill_bill_client_model_invoice_item :submit').prop('disabled', false);
|
|
113
136
|
}
|
|
114
137
|
};
|