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,110 +1,187 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:title => 'xs:ID format: it must start with a letter or underscore, and can only contain letters, digits, underscores, hyphens, and periods',
|
|
25
|
-
:known_base => @available_base_products.join(","),
|
|
26
|
-
:known_ao => @available_ao_products.join(","),
|
|
27
|
-
:known_std => @available_standalone_products.join(","),
|
|
28
|
-
:ao_mappings => @ao_mapping %>
|
|
1
|
+
<div class="register kaui-new-catalog">
|
|
2
|
+
<div class="">
|
|
3
|
+
<div class="mx-auto" style="max-width: 37.5rem;">
|
|
4
|
+
<h5 class="add-account-title pb-3 mb-3 border-bottom">
|
|
5
|
+
<span class="icon-container">
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<path d="M12.9166 10.0007C12.9166 11.6115 11.6108 12.9173 9.99998 12.9173C8.38915 12.9173 7.08331 11.6115 7.08331 10.0007C7.08331 8.38982 8.38915 7.08398 9.99998 7.08398C11.6108 7.08398 12.9166 8.38982 12.9166 10.0007Z" stroke="#414651" stroke-width="1.5"/>
|
|
8
|
+
<path d="M8.14341 2.23582L7.50001 4.16602L6.20014 4.98815L4.07331 4.4619C3.71675 4.37368 3.34448 4.52931 3.15681 4.84505L2.01998 6.75762C1.81512 7.10229 1.88473 7.54398 2.18568 7.80891L3.67746 9.12218V10.8765L2.18615 12.1898C1.88527 12.4547 1.81569 12.8963 2.02053 13.2409L3.15741 15.1536C3.34508 15.4694 3.71736 15.625 4.07391 15.5368L6.20075 15.0105L7.43216 15.7011L8.01996 17.7311C8.12313 18.0874 8.44943 18.3327 8.82043 18.3327H11.1803C11.5512 18.3327 11.8775 18.0874 11.9807 17.7311L12.5685 15.7011L13.7993 15.0105L15.9261 15.5368C16.2827 15.625 16.6549 15.4694 16.8426 15.1536L18.0009 13.2048C18.196 12.8767 18.1431 12.4578 17.8726 12.1885L16.3674 10.6899L16.368 9.30877L17.8732 7.81017C18.1438 7.5408 18.1967 7.12202 18.0016 6.79384L16.8432 4.84505C16.6555 4.52931 16.2833 4.37368 15.9267 4.4619L13.7998 4.98815L12.5 4.16602L11.8566 2.23582C11.7432 1.89554 11.4248 1.66602 11.066 1.66602H8.93401C8.57526 1.66602 8.25683 1.89554 8.14341 2.23582Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</svg>
|
|
10
|
+
</span>
|
|
11
|
+
Catalog Configuration
|
|
12
|
+
</h5>
|
|
13
|
+
<div class="form-group d-flex pb-3">
|
|
14
|
+
<label class="col-sm-3 control-label">Type</label>
|
|
15
|
+
<div class="toggle-segment col-sm-9">
|
|
16
|
+
<a href="javascript:void(0);" class="toggle-option active-btn" onclick="switch_basic_config();">
|
|
17
|
+
<span class="dot"></span>
|
|
18
|
+
Simple Configuration
|
|
19
|
+
</a>
|
|
20
|
+
<a href="javascript:void(0);" class="toggle-option" onclick="switch_xml_config();">
|
|
21
|
+
<span class="dot"></span>
|
|
22
|
+
Advanced Configuration
|
|
23
|
+
</a>
|
|
29
24
|
</div>
|
|
30
25
|
</div>
|
|
31
|
-
<div
|
|
32
|
-
<%=
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
<div id="catalog_simple">
|
|
27
|
+
<%= form_for @simple_plan, :url => {:action => :create_simple_plan}, :html => {:class => 'form-horizontal'} do |f| %>
|
|
28
|
+
<%= hidden_field_tag(:id, @tenant.id) %>
|
|
29
|
+
<div class="form-group d-flex pb-3" id="form_category">
|
|
30
|
+
<%= f.label :product_category, 'Product Category', :class => 'col-sm-3 control-label' %>
|
|
31
|
+
<div class="col-sm-9">
|
|
32
|
+
<%= f.select :product_category, options_for_select(@product_categories.map {|p| [humanized_product_category(p), p] }, @simple_plan.product_category), :class => 'form-control' %>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="form-group d-flex pb-3">
|
|
36
|
+
<%= f.label :product_name, 'Product Name', :class => 'col-sm-3 control-label' %>
|
|
37
|
+
<div class="col-sm-9">
|
|
38
|
+
<%= f.text_field :product_name,
|
|
39
|
+
:class => 'form-control',
|
|
40
|
+
:required => true,
|
|
41
|
+
:pattern => "^[a-zA-Z_][\\w\\.-]*$",
|
|
42
|
+
:title => 'xs:ID format: it must start with a letter or underscore, and can only contain letters, digits, underscores, hyphens, and periods',
|
|
43
|
+
:known_base => @available_base_products.join(","),
|
|
44
|
+
:known_ao => @available_ao_products.join(","),
|
|
45
|
+
:known_std => @available_standalone_products.join(","),
|
|
46
|
+
:ao_mappings => @ao_mapping %>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="form-group d-flex pb-3">
|
|
50
|
+
<%= f.label :plan_id, 'Plan Name', :class => 'col-sm-3 control-label' %>
|
|
51
|
+
<div class="col-sm-9">
|
|
52
|
+
<%= f.text_field :plan_id,
|
|
53
|
+
:class => 'form-control',
|
|
54
|
+
:required => true,
|
|
55
|
+
:pattern => "^[a-zA-Z_][\\w\\.-]*$",
|
|
56
|
+
:title => 'xs:ID format: it must start with a letter or underscore, and can only contain letters, digits, underscores, hyphens, and periods' %>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="form-group pb-3" id="form_base_products">
|
|
60
|
+
<%= f.label :available_base_products, 'Available Base Products', :class => 'col-sm-3 control-label' %>
|
|
61
|
+
<div class="col-sm-9 additional-base-products">
|
|
62
|
+
<%= f.select :available_base_products, options_for_select(@available_base_products), {}, {:multiple => true, :class => "form-control"} %>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="form-group d-flex pb-3">
|
|
66
|
+
<%= f.label :amount, 'Amount', :class => 'col-sm-3 control-label' %>
|
|
67
|
+
<div class="col-sm-9">
|
|
68
|
+
<%= f.number_field :amount, :class => 'form-control', :step => :any %>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="form-group d-flex pb-3">
|
|
72
|
+
<%= f.label :currency, 'Currency', :class => 'col-sm-3 control-label' %>
|
|
73
|
+
<div class="col-sm-9 currency-select">
|
|
74
|
+
<%= f.select :currency, currencies, {:selected => @simple_plan.currency}, :class => 'form-control' %>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="form-group d-flex pb-3">
|
|
78
|
+
<%= f.label :billing_period, 'Billing Period', :class => 'col-sm-3 control-label' %>
|
|
79
|
+
<div class="col-sm-9">
|
|
80
|
+
<%= f.select :billing_period, options_for_select(@billing_period.map {|bp| [humanized_billing_period(bp), bp] }, @simple_plan.billing_period), :class => 'form-control' %>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="form-group d-flex pb-3">
|
|
84
|
+
<%= f.label :trial_length, 'Trial Length', :class => 'col-sm-3 control-label' %>
|
|
85
|
+
<div class="col-sm-9">
|
|
86
|
+
<%= f.number_field :trial_length, :class => 'form-control', :type => 'number', :min => 0, :step => 1 %>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="form-group d-flex pb-3 border-bottom mb-3">
|
|
90
|
+
<%= f.label :trial_time_unit, 'Trial Time Unit', :class => 'col-sm-3 control-label' %>
|
|
91
|
+
<div class="col-sm-9">
|
|
92
|
+
<%= f.select :trial_time_unit, options_for_select(@time_units.map {|tu| [humanized_time_unit(tu), tu]}, @simple_plan.trial_time_unit), :class => 'form-control' %>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="form-group d-flex justify-content-end pb-3">
|
|
96
|
+
<%= render "kaui/components/button/button", {
|
|
97
|
+
label: 'Close',
|
|
98
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
99
|
+
type: "button",
|
|
100
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
101
|
+
html_options: {
|
|
102
|
+
onclick: "window.location.href='#{kaui_engine.admin_tenant_path(session[:tenant_id])}'"
|
|
103
|
+
}
|
|
104
|
+
} %>
|
|
105
|
+
<%= render "kaui/components/button/button", {
|
|
106
|
+
label: 'Save Catalog',
|
|
107
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
108
|
+
type: "submit",
|
|
109
|
+
html_class: "kaui-dropdown custom-hover"
|
|
110
|
+
} %>
|
|
111
|
+
</div>
|
|
112
|
+
<% end %>
|
|
52
113
|
</div>
|
|
53
|
-
<div class="form-group">
|
|
54
|
-
<%= f.label :currency, 'Currency', :class => 'col-sm-3 control-label' %>
|
|
55
|
-
<div class="col-sm-4">
|
|
56
|
-
<%= f.select :currency, currencies, {:selected => @simple_plan.currency}, :class => 'form-control' %>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="form-group">
|
|
60
|
-
<%= f.label :billing_period, 'Billing Period', :class => 'col-sm-3 control-label' %>
|
|
61
|
-
<div class="col-sm-4">
|
|
62
|
-
<%= f.select :billing_period, options_for_select(@billing_period.map {|bp| [humanized_billing_period(bp), bp] }, @simple_plan.billing_period), :class => 'form-control' %>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="form-group">
|
|
66
|
-
<%= f.label :trial_length, 'Trial Length', :class => 'col-sm-3 control-label' %>
|
|
67
|
-
<div class="col-sm-4">
|
|
68
|
-
<%= f.number_field :trial_length, :class => 'form-control', :type => 'number', :min => 0, :step => 1 %>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="form-group">
|
|
72
|
-
<%= f.label :trial_time_unit, 'Trial Time Unit', :class => 'col-sm-3 control-label' %>
|
|
73
|
-
<div class="col-sm-4">
|
|
74
|
-
<%= f.select :trial_time_unit, options_for_select(@time_units.map {|tu| [humanized_time_unit(tu), tu]}, @simple_plan.trial_time_unit), :class => 'form-control' %>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="form-group">
|
|
78
|
-
<div class="col-sm-offset-3 col-sm-9">
|
|
79
|
-
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<% end %>
|
|
83
|
-
</div>
|
|
84
114
|
|
|
115
|
+
<div id="catalog_xml">
|
|
116
|
+
<%= form_tag({:action => :upload_catalog}, :method => 'post', :multipart => true, :class => 'form-horizontal') do %>
|
|
117
|
+
<%= hidden_field_tag(:id, @tenant.id) %>
|
|
118
|
+
<div class="upload-box form-group my-0" id="uploadPromptBox">
|
|
119
|
+
<div class="upload-content">
|
|
120
|
+
<%= image_tag 'kaui/file-upload.svg', alt: 'Upload Icon' %>
|
|
121
|
+
<p><span class="highlight">Click to upload</span> or drag and drop</p>
|
|
122
|
+
</div>
|
|
123
|
+
<%= file_field_tag 'catalog', class: 'form-control', id: 'fileInput', required: true %>
|
|
124
|
+
</div>
|
|
85
125
|
|
|
86
|
-
<div id="
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
126
|
+
<div class="upload-status-box form-group my-3 d-none" id="uploadStatusBox">
|
|
127
|
+
<div class="d-flex align-items-center gap-2">
|
|
128
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
129
|
+
<path d="M11 0.75H27C27.1212 0.75 27.2375 0.798088 27.3232 0.883789L38.1162 11.6768C38.2019 11.7625 38.25 11.8788 38.25 12V36C38.25 37.7949 36.7949 39.25 35 39.25H11C9.20507 39.25 7.75 37.7949 7.75 36V4C7.75 2.20507 9.20508 0.75 11 0.75Z" stroke="#D5D7DA" stroke-width="1.5"/>
|
|
130
|
+
<path d="M27 0.5V8C27 10.2091 28.7909 12 31 12H38.5" stroke="#D5D7DA" stroke-width="1.5"/>
|
|
131
|
+
<path d="M1 20C1 18.8954 1.89543 18 3 18H27C28.1046 18 29 18.8954 29 20V32C29 33.1046 28.1046 34 27 34H3C1.89543 34 1 33.1046 1 32V20Z" fill="#155EEF"/>
|
|
132
|
+
<path d="M6.08754 22.7273L7.55415 25.206H7.61097L9.08469 22.7273H10.8212L8.60174 26.3636L10.8709 30H9.10245L7.61097 27.5178H7.55415L6.06268 30H4.30131L6.57759 26.3636L4.34393 22.7273H6.08754ZM11.7942 22.7273H13.6905L15.6934 27.6136H15.7786L17.7814 22.7273H19.6777V30H18.1863V25.2663H18.1259L16.2438 29.9645H15.2282L13.3461 25.2486H13.2857V30H11.7942V22.7273ZM20.9446 30V22.7273H22.4822V28.7322H25.6001V30H20.9446Z" fill="white"/>
|
|
133
|
+
</svg>
|
|
92
134
|
|
|
135
|
+
<div class="flex-grow-1">
|
|
136
|
+
<strong id="fileName">Filename.xml</strong>
|
|
137
|
+
<div class="d-flex align-items-center">
|
|
138
|
+
<div class="text-muted small" id="fileSize">0 KB of 0 KB</div>
|
|
139
|
+
<div class="text-muted small mx-2">
|
|
140
|
+
<svg width="2" height="14" viewBox="0 0 2 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
141
|
+
<path d="M1 1V13" stroke="#D5D7DA" stroke-linecap="round"/>
|
|
142
|
+
</svg>
|
|
143
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
144
|
+
<path d="M11.6518 6.00737C11.6567 6.00735 11.6617 6.00734 11.6667 6.00734C13.3236 6.00734 14.6667 7.35293 14.6667 9.01287C14.6667 10.5599 13.5 11.8339 12 12M11.6518 6.00737C11.6616 5.89737 11.6667 5.78597 11.6667 5.67339C11.6667 3.64463 10.0251 2 8.00004 2C6.0822 2 4.50826 3.47511 4.34699 5.35461M11.6518 6.00737C11.5836 6.76507 11.2858 7.4564 10.8286 8.011M4.34699 5.35461C2.65603 5.51582 1.33337 6.9426 1.33337 8.67887C1.33337 10.2945 2.47855 11.6421 4.00004 11.9515M4.34699 5.35461C4.45221 5.34458 4.55886 5.33945 4.66671 5.33945C5.41725 5.33945 6.10987 5.58796 6.66704 6.00734" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
145
|
+
<path d="M6.33337 10.6667L8.00004 9L9.66671 10.6667M8.00004 14V9.40587" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
146
|
+
</svg>
|
|
147
|
+
Uploading...
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<svg onclick="resetUpload()" style="cursor: pointer; margin-top: -2.5rem; margin-right: -1rem;" width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
152
|
+
<path d="M18.667 9.33398L9.33362 18.6673M9.33362 9.33398L18.667 18.6673" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
153
|
+
</svg>
|
|
93
154
|
|
|
94
|
-
|
|
95
|
-
|
|
155
|
+
</div>
|
|
156
|
+
<div class="d-flex align-items-center w-100">
|
|
157
|
+
<div class="progress mt-2 w-100" style="height: 0.375rem; margin-right: 0.75rem;">
|
|
158
|
+
<div id="uploadProgress" class="progress-bar bg-primary" role="progressbar" style="width: 10%;" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="text-end small text-muted mt-2" id="uploadPercent">0%</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
96
163
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
164
|
+
<div class="form-group d-flex justify-content-end pt-3 mt-3 border-top">
|
|
165
|
+
<%= render "kaui/components/button/button", {
|
|
166
|
+
label: 'Close',
|
|
167
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
168
|
+
type: "button",
|
|
169
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
170
|
+
html_options: {
|
|
171
|
+
onclick: "window.location.href='#{kaui_engine.admin_tenant_path(session[:tenant_id])}'"
|
|
172
|
+
}
|
|
173
|
+
} %>
|
|
174
|
+
<%= render "kaui/components/button/button", {
|
|
175
|
+
label: 'Upload XML',
|
|
176
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
177
|
+
type: "submit",
|
|
178
|
+
html_class: "kaui-dropdown custom-hover"
|
|
179
|
+
} %>
|
|
180
|
+
</div>
|
|
181
|
+
<% end %>
|
|
101
182
|
</div>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<%= submit_tag 'Upload', :class => 'btn btn-default' %>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
<% end %>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
108
185
|
</div>
|
|
109
186
|
|
|
110
187
|
<%= javascript_tag do %>
|
|
@@ -153,8 +230,10 @@ function recompute_available_base_products_for_ao() {
|
|
|
153
230
|
function display_available_base_products_for_ao() {
|
|
154
231
|
if ($("#simple_plan_product_category option:selected" ).val() == 'ADD_ON') {
|
|
155
232
|
$('#form_base_products').show();
|
|
233
|
+
$('#form_base_products').css('display', 'flex');
|
|
156
234
|
} else {
|
|
157
235
|
$('#form_base_products').hide();
|
|
236
|
+
$('#form_base_products').css('display', 'none');
|
|
158
237
|
}
|
|
159
238
|
}
|
|
160
239
|
|
|
@@ -184,5 +263,58 @@ $(document).ready(function() {
|
|
|
184
263
|
});
|
|
185
264
|
});
|
|
186
265
|
|
|
266
|
+
document.querySelectorAll('.toggle-option').forEach(el => {
|
|
267
|
+
el.addEventListener('click', () => {
|
|
268
|
+
document.querySelectorAll('.toggle-option').forEach(opt => opt.classList.remove('active-btn'));
|
|
269
|
+
el.classList.add('active-btn');
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
274
|
+
const fileInput = document.getElementById("fileInput");
|
|
275
|
+
const statusBox = document.getElementById("uploadStatusBox");
|
|
276
|
+
const fileNameText = document.getElementById("fileName");
|
|
277
|
+
const fileSizeText = document.getElementById("fileSize");
|
|
278
|
+
const progressBar = document.getElementById("uploadProgress");
|
|
279
|
+
const uploadStatusText = document.querySelector("#fileSize + .text-muted.small"); // The element containing "Uploading..."
|
|
280
|
+
|
|
281
|
+
fileInput.addEventListener("change", function () {
|
|
282
|
+
const file = this.files[0];
|
|
283
|
+
if (!file) return;
|
|
284
|
+
|
|
285
|
+
// Show the upload status box
|
|
286
|
+
statusBox.classList.remove("d-none");
|
|
287
|
+
|
|
288
|
+
// Fill file info
|
|
289
|
+
fileNameText.innerText = file.name;
|
|
290
|
+
fileSizeText.innerText = `0 KB of ${(file.size / 1024).toFixed(0)} KB`;
|
|
291
|
+
document.getElementById("uploadPercent").innerText = "0%";
|
|
292
|
+
uploadStatusText.innerHTML = uploadStatusText.innerHTML.replace("Uploading...", "Uploading..."); // Reset to Uploading...
|
|
293
|
+
|
|
294
|
+
// Simulate upload progress
|
|
295
|
+
let uploaded = 0;
|
|
296
|
+
const total = file.size;
|
|
297
|
+
const interval = setInterval(() => {
|
|
298
|
+
uploaded += total / 20;
|
|
299
|
+
const percent = Math.min((uploaded / total) * 100, 100);
|
|
300
|
+
progressBar.style.width = percent.toFixed(0) + "%";
|
|
301
|
+
progressBar.setAttribute("aria-valuenow", percent.toFixed(0));
|
|
302
|
+
fileSizeText.innerText = `${Math.min((uploaded / 1024).toFixed(0), (total / 1024).toFixed(0))} KB of ${(total / 1024).toFixed(0)} KB`;
|
|
303
|
+
document.getElementById("uploadPercent").innerText = percent.toFixed(0) + "%";
|
|
304
|
+
|
|
305
|
+
if (percent >= 100) {
|
|
306
|
+
clearInterval(interval);
|
|
307
|
+
// Change "Uploading..." to "Uploaded" when complete
|
|
308
|
+
uploadStatusText.innerHTML = uploadStatusText.innerHTML.replace("Uploading...", "Uploaded");
|
|
309
|
+
}
|
|
310
|
+
}, 150);
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
function resetUpload() {
|
|
315
|
+
document.getElementById("fileInput").value = "";
|
|
316
|
+
document.getElementById("uploadStatusBox").classList.add("d-none");
|
|
317
|
+
}
|
|
318
|
+
|
|
187
319
|
<% end %>
|
|
188
320
|
|
|
@@ -1,88 +1,153 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
<div>
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
<div class="kaui-container kaui-new-overdue-config">
|
|
2
|
+
<div class="">
|
|
3
|
+
<div class="mx-auto">
|
|
4
|
+
<h5 class="add-account-title pb-3 mb-3 border-bottom">
|
|
5
|
+
<span class="icon-container">
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<path d="M12.9166 10.0007C12.9166 11.6115 11.6108 12.9173 9.99998 12.9173C8.38915 12.9173 7.08331 11.6115 7.08331 10.0007C7.08331 8.38982 8.38915 7.08398 9.99998 7.08398C11.6108 7.08398 12.9166 8.38982 12.9166 10.0007Z" stroke="#414651" stroke-width="1.5"/>
|
|
8
|
+
<path d="M8.14341 2.23582L7.50001 4.16602L6.20014 4.98815L4.07331 4.4619C3.71675 4.37368 3.34448 4.52931 3.15681 4.84505L2.01998 6.75762C1.81512 7.10229 1.88473 7.54398 2.18568 7.80891L3.67746 9.12218V10.8765L2.18615 12.1898C1.88527 12.4547 1.81569 12.8963 2.02053 13.2409L3.15741 15.1536C3.34508 15.4694 3.71736 15.625 4.07391 15.5368L6.20075 15.0105L7.43216 15.7011L8.01996 17.7311C8.12313 18.0874 8.44943 18.3327 8.82043 18.3327H11.1803C11.5512 18.3327 11.8775 18.0874 11.9807 17.7311L12.5685 15.7011L13.7993 15.0105L15.9261 15.5368C16.2827 15.625 16.6549 15.4694 16.8426 15.1536L18.0009 13.2048C18.196 12.8767 18.1431 12.4578 17.8726 12.1885L16.3674 10.6899L16.368 9.30877L17.8732 7.81017C18.1438 7.5408 18.1967 7.12202 18.0016 6.79384L16.8432 4.84505C16.6555 4.52931 16.2833 4.37368 15.9267 4.4619L13.7998 4.98815L12.5 4.16602L11.8566 2.23582C11.7432 1.89554 11.4248 1.66602 11.066 1.66602H8.93401C8.57526 1.66602 8.25683 1.89554 8.14341 2.23582Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</svg>
|
|
10
|
+
</span>
|
|
11
|
+
Overdue Configuration
|
|
12
|
+
</h5>
|
|
13
|
+
<div class="form-group d-flex pb-3">
|
|
14
|
+
<label class="col-sm-1 control-label">Type</label>
|
|
15
|
+
<div class="toggle-segment col-sm-9">
|
|
16
|
+
<a href="javascript:void(0);" class="toggle-option active-btn" onclick="switch_overdue_basic_config();">
|
|
17
|
+
<span class="dot"></span>
|
|
18
|
+
Simple Configuration
|
|
19
|
+
</a>
|
|
20
|
+
<a href="javascript:void(0);" class="toggle-option" onclick="switch_overdue_xml_config();">
|
|
21
|
+
<span class="dot"></span>
|
|
22
|
+
Advanced Configuration
|
|
23
|
+
</a>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div id="overdue_config_simple">
|
|
28
|
+
<%= form_for @overdue, :url => {:action => :modify_overdue_config}, :html => {:class => 'form-horizontal'} do |f| %>
|
|
29
|
+
<%= link_to "javascript:void(0);", onclick: "overdue_new_state();", class:"text-decoration-none", id: "new_state" do %>
|
|
30
|
+
<%= render "kaui/components/button/button", {
|
|
31
|
+
label: "New Overdue States",
|
|
32
|
+
icon: "kaui/setting/plus.svg",
|
|
33
|
+
variant: "outline-secondary d-inline-flex align-items-center",
|
|
34
|
+
type: "button",
|
|
35
|
+
html_class: "new-overdue-states-button kaui-button",
|
|
36
|
+
} %>
|
|
37
|
+
<% end %>
|
|
38
|
+
<table id="existing-overdue-config-for-tenants" class="existing-overdue-config-for-tenants">
|
|
39
|
+
<thead>
|
|
40
|
+
<tr>
|
|
41
|
+
<th>Name</th>
|
|
42
|
+
<th>External Message</th>
|
|
43
|
+
<th>Block Subscription Changes</th>
|
|
44
|
+
<th>Subscription Cancellation</th>
|
|
45
|
+
<th>Days since earliest unpaid invoice</th>
|
|
46
|
+
<th>Tag inclusion</th>
|
|
47
|
+
<th>Tag exclusion</th>
|
|
48
|
+
<th>Number of unpaid invoices</th>
|
|
49
|
+
<th>Total unpaid invoice balance</th>
|
|
50
|
+
<th></th>
|
|
51
|
+
</tr>
|
|
52
|
+
</thead>
|
|
53
|
+
<tbody>
|
|
54
|
+
<%= hidden_field_tag(:id, @tenant.id) %>
|
|
55
|
+
<% @overdue.overdue_states.reverse.each_with_index do |state, idx| %>
|
|
56
|
+
<tr class="overdue_state_<%= state %>" id="tr_state_<%= idx %>">
|
|
57
|
+
<%= f.fields 'states' do |state_form_group| %>
|
|
58
|
+
<%= state_form_group.fields_for "#{idx}", state do |state_form| %>
|
|
59
|
+
<td><%= state_form.text_field :name %></td>
|
|
60
|
+
<td><%= state_form.text_field :external_message %></td>
|
|
61
|
+
<td><%= state_form.select :is_block_changes, options_for_select([true, false ], state.is_block_changes), :class => 'form-control' %></td>
|
|
62
|
+
<td><%= state_form.select :subscription_cancellation_policy, options_for_select([:NONE, :POLICY_NONE, :POLICY_IMMEDIATE, :POLICY_END_OF_TERM], state.subscription_cancellation), :class => 'form-control' %></td>
|
|
63
|
+
<%= state_form.fields_for 'condition' do |condition| %>
|
|
64
|
+
<td><%= condition.number_field :time_since_earliest_unpaid_invoice_equals_or_exceeds, :value => state.condition.time_since_earliest_unpaid_invoice_equals_or_exceeds&.number %></td>
|
|
65
|
+
<td><%= condition.select :control_tag_inclusion, options_for_select([:NONE, :AUTO_PAY_OFF, :AUTO_INVOICING_OFF, :OVERDUE_ENFORCEMENT_OFF, :MANUAL_PAY, :TEST, :PARTNER], state.condition&.control_tag_inclusion), :class => 'form-control' %></td>
|
|
66
|
+
<td><%= condition.select :control_tag_exclusion, options_for_select([:NONE, :AUTO_PAY_OFF, :AUTO_INVOICING_OFF, :OVERDUE_ENFORCEMENT_OFF, :MANUAL_PAY, :TEST, :PARTNER], state.condition&.control_tag_exclusion), :class => 'form-control'%></td>
|
|
67
|
+
<td><%= condition.number_field :number_of_unpaid_invoices_equals_or_exceeds, :value => state.condition&.number_of_unpaid_invoices_equals_or_exceeds %></td>
|
|
68
|
+
<td><%= condition.number_field :total_unpaid_invoice_balance_equals_or_exceeds, :step => :any, :value => state.condition&.total_unpaid_invoice_balance_equals_or_exceeds %></td>
|
|
69
|
+
<% end %>
|
|
46
70
|
<% end %>
|
|
47
71
|
<% end %>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
72
|
+
<td>
|
|
73
|
+
<%= link_to "javascript:void(0);", onclick: "overdue_delete_state(this);", class: "text-decoration-none", id: "delete_state_#{idx}" do %>
|
|
74
|
+
<%= render "kaui/components/button/button", {
|
|
75
|
+
label: "",
|
|
76
|
+
icon: "kaui/modal/red-close.svg",
|
|
77
|
+
variant: "outline-secondary d-inline-flex align-items-center",
|
|
78
|
+
type: "button",
|
|
79
|
+
html_class: "close-button kaui-button"
|
|
80
|
+
} %>
|
|
81
|
+
<% end %>
|
|
82
|
+
</td>
|
|
83
|
+
</tr>
|
|
84
|
+
<% end %>
|
|
85
|
+
</tbody>
|
|
86
|
+
</table>
|
|
87
|
+
<div class="form-group d-flex justify-content-end pt-3 mt-3 border-top">
|
|
88
|
+
<%= render "kaui/components/button/button", {
|
|
89
|
+
label: 'Close',
|
|
90
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
91
|
+
type: "button",
|
|
92
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
93
|
+
html_options: {
|
|
94
|
+
onclick: "window.history.back();"
|
|
95
|
+
}
|
|
96
|
+
} %>
|
|
97
|
+
<%= render "kaui/components/button/button", {
|
|
98
|
+
label: 'Save Overdue',
|
|
99
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
100
|
+
type: "submit",
|
|
101
|
+
html_class: "kaui-dropdown custom-hover"
|
|
102
|
+
} %>
|
|
57
103
|
</div>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<%= file_field_tag 'overdue',
|
|
104
|
+
<% end %>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div id="overdue_config_xml">
|
|
108
|
+
<% if can? :config_upload, Kaui::AdminTenant %>
|
|
109
|
+
<%= form_tag({:action => :upload_overdue_config}, :method => 'post', :multipart => true, :class => 'form-horizontal') do %>
|
|
110
|
+
<%= hidden_field_tag(:id, @tenant.id) %>
|
|
111
|
+
|
|
112
|
+
<div class="upload-box form-group" data-file="">
|
|
113
|
+
<div class="upload-content">
|
|
114
|
+
<%= image_tag 'kaui/file-upload.svg', alt: 'Upload Icon' %>
|
|
115
|
+
<p>
|
|
116
|
+
<span class="highlight">Click to upload</span> or drag and drop
|
|
117
|
+
</p>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<%= file_field_tag 'overdue',
|
|
121
|
+
class: 'form-control',
|
|
122
|
+
required: true,
|
|
123
|
+
data: { file: '' },
|
|
124
|
+
onchange: "this.parentNode.setAttribute('data-file', this.files[0]?.name || '')"
|
|
125
|
+
%>
|
|
75
126
|
</div>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
127
|
+
<div class="form-group d-flex justify-content-end pt-3 mt-3 border-top">
|
|
128
|
+
<%= render "kaui/components/button/button", {
|
|
129
|
+
label: 'Close',
|
|
130
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
131
|
+
type: "button",
|
|
132
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
133
|
+
html_options: {
|
|
134
|
+
onclick: "window.history.back();"
|
|
135
|
+
}
|
|
136
|
+
} %>
|
|
137
|
+
<%= render "kaui/components/button/button", {
|
|
138
|
+
label: 'Upload',
|
|
139
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
140
|
+
type: "submit",
|
|
141
|
+
html_class: "kaui-dropdown custom-hover"
|
|
142
|
+
} %>
|
|
80
143
|
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
144
|
+
<% end %>
|
|
145
|
+
<% else %>
|
|
146
|
+
You don't have the permission to upload the XML config
|
|
147
|
+
<% end %>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
86
151
|
</div>
|
|
87
152
|
|
|
88
153
|
<%= javascript_tag do %>
|
|
@@ -153,5 +218,12 @@ $(document).ready(function() {
|
|
|
153
218
|
switch_overdue_basic_config();
|
|
154
219
|
});
|
|
155
220
|
|
|
221
|
+
document.querySelectorAll('.toggle-option').forEach(el => {
|
|
222
|
+
el.addEventListener('click', () => {
|
|
223
|
+
document.querySelectorAll('.toggle-option').forEach(opt => opt.classList.remove('active-btn'));
|
|
224
|
+
el.classList.add('active-btn');
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
156
228
|
|
|
157
229
|
<% end %>
|