kaui 4.0.2 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kaui/kaui_override.js +1 -1
- data/app/controllers/kaui/account_timelines_controller.rb +3 -3
- data/app/controllers/kaui/payments_controller.rb +1 -1
- data/app/helpers/kaui/plugin_helper.rb +1 -1
- data/app/views/kaui/account_timelines/_multi_functions_bar.html.erb +1 -1
- data/app/views/kaui/accounts/_billing_details.html.erb +3 -2
- data/app/views/kaui/accounts/_billing_info.html.erb +4 -1
- data/app/views/kaui/accounts/index.html.erb +3 -3
- data/app/views/kaui/admin_tenants/_clock.html.erb +20 -13
- data/app/views/kaui/admin_tenants/show.html.erb +5 -7
- data/app/views/kaui/audit_logs/_multi_functions_bar.html.erb +1 -1
- data/app/views/kaui/invoices/_multi_functions_bar.html.erb +1 -1
- data/app/views/kaui/invoices/show.html.erb +31 -28
- data/app/views/kaui/payments/_multi_functions_bar.html.erb +1 -1
- data/app/views/kaui/payments/show.html.erb +29 -26
- data/config/locales/en.yml +3 -0
- data/lib/kaui/version.rb +1 -1
- data/lib/kaui.rb +1 -1
- metadata +2 -4
- data/app/views/kaui/admin/index.html.erb +0 -64
- data/app/views/kaui/admin/index.js.erb +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44468e809ef2b1ffd8115e0b54664822a212fc2ec26ae6513d8b64135f6de48f
|
|
4
|
+
data.tar.gz: 7ceff36da85b32040813f3101246588d5c9cf07a7893297ac1df44d0462b25b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0949ac7f3c9054757e5b7d5ea33867aba33738d185071917127032ac10293fc845b2da1dec911ca7d02ce0a8500ee7c95309264b3b05936e0eaf59e7e84d5c8
|
|
7
|
+
data.tar.gz: 5d6fcb261e749b7cc6d7c97782b3a78cf917acca0369c055515c18f34f514d739e04062755e669f859be2538d09da2a65d3f5fa1b6ab5a4f8c3e10b39f77a308
|
|
@@ -556,7 +556,7 @@ function showCustomTooltip(element, objectId) {
|
|
|
556
556
|
// Set 5-second auto-hide timer
|
|
557
557
|
window.tooltipAutoHideTimeout = setTimeout(function () {
|
|
558
558
|
hideCustomTooltip();
|
|
559
|
-
},
|
|
559
|
+
}, 3000); // 3 seconds
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
function showObjectIdTooltip(element, objectId) {
|
|
@@ -72,7 +72,7 @@ module Kaui
|
|
|
72
72
|
@selected_bundle = params.key?(:external_key) ? @bundle_names[params[:external_key]] : nil
|
|
73
73
|
|
|
74
74
|
csv_string = CSV.generate(headers: true) do |csv|
|
|
75
|
-
csv << ['Effective Date', 'Bundles', '
|
|
75
|
+
csv << ['Effective Date', 'Bundles', 'Event Type', 'Details', 'Reason Code/ Comments']
|
|
76
76
|
if %w[INVOICE ALL].include?(event_type)
|
|
77
77
|
@invoices.each do |invoice_stub|
|
|
78
78
|
invoice = invoice_stub.invoice_id.present? && @invoices_by_id.key?(invoice_stub.invoice_id) ? @invoices_by_id[invoice_stub.invoice_id] : invoice_stub
|
|
@@ -97,7 +97,7 @@ module Kaui
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
payment.transactions.each do |transaction|
|
|
100
|
-
effective_date = transaction.effective_date.present? ? transaction.effective_date : '[unknown]'
|
|
100
|
+
effective_date = transaction.effective_date.present? ? Date.parse(transaction.effective_date).to_s : '[unknown]'
|
|
101
101
|
bundle_keys = @bundle_keys_by_invoice_id[payment.target_invoice_id].present? ? @bundle_keys_by_invoice_id[payment.target_invoice_id].map { |bundle_key| @bundle_names[bundle_key] }.join(', ') : ''
|
|
102
102
|
transaction_type = transaction.transaction_type
|
|
103
103
|
details = []
|
|
@@ -120,7 +120,7 @@ module Kaui
|
|
|
120
120
|
# Skip SERVICE_STATE_CHANGE events
|
|
121
121
|
next if event.event_type == 'SERVICE_STATE_CHANGE'
|
|
122
122
|
|
|
123
|
-
effective_date = event.effective_date.present? ? event.effective_date : '[unknown]'
|
|
123
|
+
effective_date = event.effective_date.present? ? Date.parse(event.effective_date).to_s : '[unknown]'
|
|
124
124
|
bundle_keys = @bundle_names[bundle.external_key]
|
|
125
125
|
event_type = event.event_type
|
|
126
126
|
phase = event.phase
|
|
@@ -44,7 +44,7 @@ module Kaui
|
|
|
44
44
|
account = account_id.present? ? Kaui::Account.find_by_id_or_key(account_id, false, false, options_for_klient) : nil
|
|
45
45
|
|
|
46
46
|
payments = if account_id.present? && query_string.blank?
|
|
47
|
-
Kaui::
|
|
47
|
+
Kaui::Payment.list_or_search(account_id, 0, MAXIMUM_NUMBER_OF_RECORDS_DOWNLOAD, options_for_klient.merge(params: kb_params))
|
|
48
48
|
else
|
|
49
49
|
Kaui::Payment.list_or_search(query_string, 0, MAXIMUM_NUMBER_OF_RECORDS_DOWNLOAD, options_for_klient.merge(params: kb_params))
|
|
50
50
|
end
|
|
@@ -27,7 +27,7 @@ module Kaui
|
|
|
27
27
|
else
|
|
28
28
|
"/#{plugin_key}"
|
|
29
29
|
end
|
|
30
|
-
plugin_path = nil unless CONFIGABLE_PLUGINS.include?(
|
|
30
|
+
plugin_path = nil unless CONFIGABLE_PLUGINS.map { |key| plugin_key.include?(key) }.any?
|
|
31
31
|
plugins << { name: plugin_name, path: plugin_path } if plugin_path
|
|
32
32
|
end
|
|
33
33
|
plugins
|
|
@@ -161,8 +161,9 @@
|
|
|
161
161
|
} %>
|
|
162
162
|
</div>
|
|
163
163
|
<div class="form-check">
|
|
164
|
-
<%=
|
|
165
|
-
<%=
|
|
164
|
+
<%= hidden_field_tag :dry_run, '1' %>
|
|
165
|
+
<%= check_box_tag :dry_run_checkbox, '1', true, :disabled => !can?(:trigger, Kaui::Invoice), class: 'form-check-input', id: 'dry_run_checkbox', onchange: "document.getElementById('dry_run').value = this.checked ? '1' : '0';" %>
|
|
166
|
+
<%= label_tag :dry_run_checkbox, 'Dry-run', class: 'form-check-label' %>
|
|
166
167
|
</div>
|
|
167
168
|
<% end %>
|
|
168
169
|
</div>
|
|
@@ -120,7 +120,10 @@
|
|
|
120
120
|
</div>
|
|
121
121
|
<div style="width: 14.5%; float: left; padding: 0;">
|
|
122
122
|
<%= label_tag :dry_run do %>
|
|
123
|
-
|
|
123
|
+
<% dry_run_checked = true %>
|
|
124
|
+
<% dry_run_disabled = !can?(:trigger, Kaui::Invoice) %>
|
|
125
|
+
<%= hidden_field_tag :dry_run, '1' %>
|
|
126
|
+
<%= check_box_tag :dry_run_checkbox, '1', dry_run_checked, :disabled => dry_run_disabled, :onchange => "document.getElementById('dry_run').value = this.checked ? '1' : '0';" %> <small>Dry-run</small>
|
|
124
127
|
<% end %>
|
|
125
128
|
</div>
|
|
126
129
|
<div class="col-xs-1" style="padding: 0;">
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
variant: "outline-secondary",
|
|
36
36
|
id: "dropdownMenu1"
|
|
37
37
|
},
|
|
38
|
-
{
|
|
38
|
+
(can?(:create, Kaui::Account) ? {
|
|
39
39
|
label: "Create Account",
|
|
40
40
|
icon: 'kaui/plus.svg',
|
|
41
41
|
path: kaui_engine.new_account_path,
|
|
42
42
|
html_class: "kaui-dropdown custom-hover",
|
|
43
43
|
variant: "outline-secondary"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
44
|
+
} : nil)
|
|
45
|
+
].compact
|
|
46
46
|
} %>
|
|
47
47
|
|
|
48
48
|
<div id="search-labels-container" class="ml-2">
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<%= form_tag admin_tenant_set_clock_path(@tenant.id), method: :put, class: 'form-horizontal' do %>
|
|
16
16
|
<div class="trigger-invoice-box form-group">
|
|
17
17
|
<b>Set new date</b>
|
|
18
|
+
<p id="clock_warning" class="text-danger mb-2" style="display: none;"><%= t('admin_tenants.clock_warning') %></p>
|
|
18
19
|
<div class="d-flex align-items-center">
|
|
19
20
|
<div class="custom-date-input-wrapper kaui-button custom-hover">
|
|
20
21
|
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -25,9 +26,11 @@
|
|
|
25
26
|
</svg>
|
|
26
27
|
|
|
27
28
|
<input class="form-control" name="new_date" type="text"
|
|
29
|
+
id="clock_datepicker"
|
|
28
30
|
data-provide="datepicker"
|
|
29
31
|
data-date-format="yyyy-mm-dd"
|
|
30
|
-
data-date-today-highlight="true"
|
|
32
|
+
data-date-today-highlight="true"
|
|
33
|
+
data-date-autoclose="true"
|
|
31
34
|
value="<%= @clock&.[]('localDate') || '' %>">
|
|
32
35
|
</div>
|
|
33
36
|
|
|
@@ -56,17 +59,21 @@
|
|
|
56
59
|
|
|
57
60
|
<%= javascript_tag do %>
|
|
58
61
|
$(document).ready(function() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
var clockElement = $('#kb_clock');
|
|
63
|
+
var initialTime = clockElement.text();
|
|
64
|
+
|
|
65
|
+
// Parse the initial time
|
|
66
|
+
var currentTime = new Date(initialTime);
|
|
67
|
+
|
|
68
|
+
// Update clock every second
|
|
69
|
+
setInterval(function() {
|
|
70
|
+
currentTime.setSeconds(currentTime.getSeconds() + 1);
|
|
71
|
+
clockElement.text(currentTime.toISOString());
|
|
72
|
+
}, 1000);
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
// Show warning when date is selected
|
|
75
|
+
$('#clock_datepicker').on('changeDate', function() {
|
|
76
|
+
$('#clock_warning').show();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
69
79
|
<% end %>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
@@ -11,15 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
<div class="w-100">
|
|
13
13
|
<div class="row gap-4 m-0 gap-container pb-2">
|
|
14
|
-
|
|
15
|
-
=begin%>
|
|
16
|
-
<div class="p-4 card w-100 col">
|
|
14
|
+
<div class="p-4 card col">
|
|
17
15
|
<%= render :partial => 'clock' %>
|
|
18
|
-
</div>
|
|
19
|
-
<%
|
|
20
|
-
=end%>
|
|
16
|
+
</div>
|
|
21
17
|
|
|
22
|
-
<div class="p-4 card
|
|
18
|
+
<div class="p-4 card col">
|
|
23
19
|
<%= render :partial => 'useful_links' %>
|
|
24
20
|
</div>
|
|
25
21
|
</div>
|
|
@@ -239,6 +235,8 @@
|
|
|
239
235
|
$header.find('.sort-' + direction).addClass('active');
|
|
240
236
|
}
|
|
241
237
|
|
|
238
|
+
} catch (e) {
|
|
239
|
+
console.error('Error initializing DataTable:', e);
|
|
242
240
|
}
|
|
243
241
|
}, 100);
|
|
244
242
|
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
<div class="fake-select-dropdown">
|
|
116
116
|
<label class="fake-select-option">
|
|
117
117
|
<input type="radio" name="download_option" id="allData" />
|
|
118
|
-
<span>All
|
|
118
|
+
<span>All invoices</span>
|
|
119
119
|
</label>
|
|
120
120
|
|
|
121
121
|
<label class="fake-select-option">
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
<div class="kaui-container invoice-show">
|
|
2
2
|
|
|
3
3
|
<%= render "kaui/components/breadcrumb/breadcrumb" %>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
|
|
5
|
+
<div class="d-flex" style="gap: 4rem;">
|
|
6
|
+
<%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
|
|
7
|
+
|
|
8
|
+
<div class="w-100">
|
|
9
|
+
<div class="invoice">
|
|
10
|
+
<div class="d-flex flex-column ">
|
|
11
|
+
<div class="invoice-header mb-4">
|
|
12
|
+
<div class="d-flex align-items-center">
|
|
13
|
+
<h2>
|
|
14
|
+
Invoice
|
|
15
|
+
<%= @invoice.invoice_number %>
|
|
16
|
+
|
|
17
|
+
</h2>
|
|
18
|
+
</div>
|
|
14
19
|
<% dry_run = @invoice.invoice_number.blank? %>
|
|
15
20
|
<% if dry_run %>
|
|
16
21
|
<div class="alert alert-warning">
|
|
@@ -176,21 +181,17 @@
|
|
|
176
181
|
</div>
|
|
177
182
|
|
|
178
183
|
<%= render :partial => 'kaui/invoices/invoice_table', :locals => {:dry_run => dry_run} %>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<h2>Payment Details</h2>
|
|
191
|
-
</div>
|
|
192
|
-
<span>
|
|
193
|
-
<% if payment.capturable? || payment.voidable? || (payment.refundable? && (can?(:refund, Kaui::Payment) || can?(:chargeback, Kaui::Payment))) %>
|
|
184
|
+
|
|
185
|
+
<% unless @payments.empty? %>
|
|
186
|
+
<% @payments.each_with_index do |payment, idx| %>
|
|
187
|
+
<div class="mt-4">
|
|
188
|
+
<div class="d-flex flex-column ">
|
|
189
|
+
<div class="invoice-header mb-4">
|
|
190
|
+
<div class="d-flex align-items-center">
|
|
191
|
+
<h2>Payment Details</h2>
|
|
192
|
+
</div>
|
|
193
|
+
<span>
|
|
194
|
+
<% if payment.capturable? || payment.voidable? || (payment.refundable? && (can?(:refund, Kaui::Payment) || can?(:chargeback, Kaui::Payment))) %>
|
|
194
195
|
|
|
195
196
|
|
|
196
197
|
<div class="tag-select-box">
|
|
@@ -383,11 +384,13 @@
|
|
|
383
384
|
<hr class="breathe"/>
|
|
384
385
|
<% end %>
|
|
385
386
|
|
|
386
|
-
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
<% end %>
|
|
390
|
+
<% end %>
|
|
387
391
|
</div>
|
|
388
|
-
<% end %>
|
|
389
392
|
</div>
|
|
390
|
-
|
|
393
|
+
</div>
|
|
391
394
|
|
|
392
395
|
<%= javascript_tag do %>
|
|
393
396
|
function disableLinks() {
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<div class="fake-select-dropdown">
|
|
115
115
|
<label class="fake-select-option">
|
|
116
116
|
<input type="radio" name="download_option" id="allData" />
|
|
117
|
-
<span>All
|
|
117
|
+
<span>All payments</span>
|
|
118
118
|
</label>
|
|
119
119
|
|
|
120
120
|
<label class="fake-select-option">
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
<div class="kaui-container payments-show">
|
|
4
4
|
<%= render "kaui/components/breadcrumb/breadcrumb" %>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
5
|
+
|
|
6
|
+
<div class="d-flex" style="gap: 4rem;">
|
|
7
|
+
<%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
|
|
8
|
+
|
|
9
|
+
<div class="w-100">
|
|
10
|
+
<div class="payments">
|
|
11
|
+
<div class="d-flex flex-column ">
|
|
12
|
+
<div class="payments-header mb-4">
|
|
13
|
+
<div class="d-flex align-items-center">
|
|
14
|
+
<h2>Payment <%= @payment.payment_number %></h2>
|
|
15
|
+
</div>
|
|
16
|
+
<span>
|
|
12
17
|
<% if @payment.capturable? || @payment.voidable? || (@payment.refundable? && (can?(:refund, Kaui::Payment) || can?(:chargeback, Kaui::Payment))) %>
|
|
13
18
|
|
|
14
19
|
|
|
@@ -212,29 +217,27 @@
|
|
|
212
217
|
:payment => @payment,
|
|
213
218
|
:account => @account,
|
|
214
219
|
:custom_fields => @custom_fields} %>
|
|
220
|
+
|
|
221
|
+
<div class="mt-4">
|
|
222
|
+
<div class="d-flex flex-column ">
|
|
223
|
+
<div class="payments-header mb-4">
|
|
224
|
+
<div class="d-flex align-items-center">
|
|
225
|
+
<h2>Payment Method Details</h2>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="payment-details">
|
|
229
|
+
<% if @payment_method.nil? %>
|
|
230
|
+
The Payment method has been deleted.
|
|
231
|
+
<% else %>
|
|
232
|
+
<%= render :partial => 'kaui/payment_methods/payment_methods_details_table', :locals => {:payment_method => @payment_method} %>
|
|
233
|
+
<% end %>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
215
237
|
|
|
216
238
|
</div>
|
|
217
239
|
</div>
|
|
218
240
|
</div>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<div class="kaui-container py-5 payments-show">
|
|
222
|
-
<div class="d-flex " style="gap: 4rem;">
|
|
223
|
-
<div class="payments">
|
|
224
|
-
<div class="d-flex flex-column ">
|
|
225
|
-
<div class="payments-header mb-4">
|
|
226
|
-
<div class="d-flex align-items-center">
|
|
227
|
-
<h2>Payment Method Details</h2>
|
|
228
|
-
</div>
|
|
229
|
-
</div>
|
|
230
|
-
<div class="payment-details">
|
|
231
|
-
<% if @payment_method.nil? %>
|
|
232
|
-
The Payment method has been deleted.
|
|
233
|
-
<% else %>
|
|
234
|
-
<%= render :partial => 'kaui/payment_methods/payment_methods_details_table', :locals => {:payment_method => @payment_method} %>
|
|
235
|
-
<% end %>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
241
|
</div>
|
|
239
242
|
</div>
|
|
240
243
|
</div>
|
data/config/locales/en.yml
CHANGED
data/lib/kaui/version.rb
CHANGED
data/lib/kaui.rb
CHANGED
|
@@ -82,7 +82,7 @@ module Kaui
|
|
|
82
82
|
when 'account_id'
|
|
83
83
|
view_context.link_to(account.account_id, view_context.url_for(action: :show, account_id: account.account_id))
|
|
84
84
|
when 'parent_account_id'
|
|
85
|
-
account.parent_account_id.nil? ? nil : view_context.link_to(account.
|
|
85
|
+
account.parent_account_id.nil? ? nil : view_context.link_to(account.parent_account_id, view_context.url_for(action: :show, account_id: account.parent_account_id))
|
|
86
86
|
when 'account_balance'
|
|
87
87
|
view_context.humanized_money_with_symbol(account.balance_to_money)
|
|
88
88
|
else
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kaui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kill Bill core team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|
|
@@ -540,8 +540,6 @@ files:
|
|
|
540
540
|
- app/views/kaui/accounts/index.html.erb
|
|
541
541
|
- app/views/kaui/accounts/new.html.erb
|
|
542
542
|
- app/views/kaui/accounts/show.html.erb
|
|
543
|
-
- app/views/kaui/admin/index.html.erb
|
|
544
|
-
- app/views/kaui/admin/index.js.erb
|
|
545
543
|
- app/views/kaui/admin_allowed_users/_form.html.erb
|
|
546
544
|
- app/views/kaui/admin_allowed_users/edit.html.erb
|
|
547
545
|
- app/views/kaui/admin_allowed_users/index.html.erb
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<div class="kaui-container ">
|
|
2
|
-
<div class="clock-container">
|
|
3
|
-
<div class="d-flex flex-column">
|
|
4
|
-
<div class="clock-header mb-3">
|
|
5
|
-
<div class="d-flex align-items-start flex-column">
|
|
6
|
-
<h2>Clock</h2>
|
|
7
|
-
<p>Current date/time: <span id="kb_clock"><%= @clock['currentUtcTime'] %></span></p>
|
|
8
|
-
</div>
|
|
9
|
-
<span>
|
|
10
|
-
</span>
|
|
11
|
-
</div>
|
|
12
|
-
<div>
|
|
13
|
-
<%= form_tag kaui_engine.admin_set_clock_path(params.to_h), :method => :put, :class => 'form-horizontal' do %>
|
|
14
|
-
|
|
15
|
-
<div class="trigger-invoice-box form-group">
|
|
16
|
-
<b>Set new date</b>
|
|
17
|
-
<div class="d-flex align-items-center">
|
|
18
|
-
<div class="custom-date-input-wrapper kaui-button custom-hover">
|
|
19
|
-
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
20
|
-
<path d="M14.9167 12.5V18.3333M17.8333 15.4167H12" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
21
|
-
<path d="M14.0833 1.66675V5.00008M6.58325 1.66675V5.00008" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
22
|
-
<path d="M17.8333 10.8333V4.99992C17.8333 4.07944 17.0871 3.33325 16.1666 3.33325H4.49992C3.57944 3.33325 2.83325 4.07944 2.83325 4.99992V16.6666C2.83325 17.5871 3.57944 18.3333 4.49992 18.3333H10.3333" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
23
|
-
<path d="M2.83325 8.33325H17.8333" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
24
|
-
</svg>
|
|
25
|
-
<input class="form-control" name="new_date" type="text" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-highlight="true" value="<%= @clock['localDate'] %>">
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<%= render "kaui/components/button/button", {
|
|
29
|
-
label: "Submit",
|
|
30
|
-
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
31
|
-
type: "submit",
|
|
32
|
-
html_class: "btn btn-xs kaui-dropdown custom-hover py-2 px-3",
|
|
33
|
-
html_options: { name: "commit", value: "Submit" }
|
|
34
|
-
} %>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<%= button_tag type: 'submit', name: 'commit', value: 'Reset', class: 'kaui-button dots-menu custom-hover' do %>
|
|
38
|
-
<%= image_tag('kaui/setting/reset.svg', alt: 'Reset Icon', class: 'me-2', size: '16x16') %>
|
|
39
|
-
Reset
|
|
40
|
-
<% end %>
|
|
41
|
-
|
|
42
|
-
</div>
|
|
43
|
-
<% end %>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<%= javascript_tag do %>
|
|
50
|
-
$(document).ready(function() {
|
|
51
|
-
scheduleRefresh();
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
function scheduleRefresh() {
|
|
55
|
-
setTimeout(refreshClock, 1000);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function refreshClock() {
|
|
59
|
-
$.ajax({url: "<%= admin_path(:format => :js) %>"});
|
|
60
|
-
}
|
|
61
|
-
<% end %>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|