kaui 4.0.14 → 4.0.16
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/multi_functions_bar_utils.js +55 -13
- data/app/assets/stylesheets/kaui/account.css +170 -2
- data/app/assets/stylesheets/kaui/common.css +243 -0
- data/app/assets/stylesheets/kaui/invoice.css +148 -2
- data/app/assets/stylesheets/kaui/payment.css +148 -2
- data/app/assets/stylesheets/kaui/queues.css +176 -88
- data/app/assets/stylesheets/kaui/tenants.css +2 -1
- data/app/controllers/kaui/admin_tenants_controller.rb +25 -0
- data/app/controllers/kaui/engine_controller.rb +2 -1
- data/app/controllers/kaui/engine_controller_util.rb +26 -2
- data/app/controllers/kaui/invoices_controller.rb +3 -3
- data/app/controllers/kaui/payments_controller.rb +3 -3
- data/app/views/kaui/accounts/_account_filterbar.html.erb +10 -212
- data/app/views/kaui/accounts/index.html.erb +9 -2
- data/app/views/kaui/admin_tenants/_show_overdue.erb +11 -0
- data/app/views/kaui/bundles/_bundle_filterbar.html.erb +56 -39
- data/app/views/kaui/invoices/_invoice_filterbar.html.erb +15 -226
- data/app/views/kaui/invoices/index.html.erb +3 -3
- data/app/views/kaui/payments/_payment_filterbar.html.erb +15 -212
- data/app/views/kaui/queues/index.html.erb +212 -191
- data/app/views/kaui/shared/_advanced_search_filterbar.html.erb +253 -0
- data/config/locales/en.yml +32 -0
- data/config/routes.rb +2 -1
- data/lib/kaui/error_handler.rb +2 -1
- data/lib/kaui/version.rb +1 -1
- metadata +3 -2
|
@@ -3,105 +3,123 @@
|
|
|
3
3
|
<div class="d-flex w-100" style="gap: 4rem;">
|
|
4
4
|
<%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
|
|
5
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' : '') %>
|
|
21
6
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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' : '') %>
|
|
7
|
+
<div class="queues-main-header mb-4">
|
|
8
|
+
<h1 class="queues-title">Queues</h1>
|
|
9
|
+
<p class="queues-subtitle">View and monitor bus events and notifications.</p>
|
|
10
|
+
</div>
|
|
32
11
|
|
|
33
|
-
|
|
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 -%>
|
|
12
|
+
<div class="queues-card">
|
|
43
13
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
14
|
+
<% show_notifications = params[:queue_tab] == 'notifications' ||
|
|
15
|
+
(params[:queue_tab].blank? &&
|
|
16
|
+
(@queues_entries['busEvents'] || []).empty? &&
|
|
17
|
+
(@queues_entries['notifications'] || []).any?) %>
|
|
18
|
+
<ul class="nav nav-tabs queues-nav-tabs px-4" id="queuesNavTabs">
|
|
19
|
+
<li class="nav-item">
|
|
20
|
+
<a class="nav-link queues-tab-link <%= show_notifications ? '' : 'active' %>"
|
|
21
|
+
id="busEvents-tab"
|
|
22
|
+
href="#busEvents"
|
|
23
|
+
data-bs-toggle="tab">
|
|
24
|
+
<%= image_tag "kaui/sidebar/queues.svg", width: 16, height: 16, class: "me-1 tab-icon" %>
|
|
25
|
+
Bus Events
|
|
26
|
+
</a>
|
|
27
|
+
</li>
|
|
28
|
+
<li class="nav-item">
|
|
29
|
+
<a class="nav-link queues-tab-link <%= show_notifications ? 'active' : '' %>"
|
|
30
|
+
id="notifications-tab"
|
|
31
|
+
href="#notifications"
|
|
32
|
+
data-bs-toggle="tab">
|
|
33
|
+
<%= image_tag "kaui/setting/e-notifications.svg", width: 16, height: 16, class: "me-1 tab-icon" %>
|
|
34
|
+
Notifications
|
|
35
|
+
</a>
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
52
38
|
|
|
53
|
-
<div class="
|
|
39
|
+
<div class="tab-content">
|
|
54
40
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
<%# Bus Events pane %>
|
|
42
|
+
<div class="tab-pane fade <%= show_notifications ? '' : 'show active' %>" id="busEvents">
|
|
43
|
+
<div class="queues-pane-inner">
|
|
44
|
+
|
|
45
|
+
<div class="queues-controls-bar mb-4">
|
|
46
|
+
<div class="d-flex align-items-center gap-3">
|
|
47
|
+
<span class="time-scope-label">Time scope</span>
|
|
48
|
+
<div class="d-flex gap-2">
|
|
49
|
+
<%= link_to kaui_engine.queues_path(
|
|
50
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history, :queue_tab)
|
|
51
|
+
.merge(with_history: 'false', tab: 'future',
|
|
52
|
+
max_date: (@now + 1.week).utc.iso8601, queue_tab: 'busEvents')
|
|
53
|
+
),
|
|
54
|
+
class: "time-scope-btn #{params[:tab].blank? || params[:tab] == 'future' ? 'active' : ''}" do %>
|
|
55
|
+
<span class="radio-dot"></span>
|
|
56
|
+
Current / Future
|
|
57
|
+
<% end %>
|
|
58
|
+
<%= link_to kaui_engine.queues_path(
|
|
59
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history, :queue_tab)
|
|
60
|
+
.merge(with_history: 'true', tab: 'all', queue_tab: 'busEvents')
|
|
61
|
+
),
|
|
62
|
+
class: "time-scope-btn #{['week', 'month', 'all'].include?(params[:tab]) ? 'active' : ''}" do %>
|
|
63
|
+
<span class="radio-dot"></span>
|
|
64
|
+
Historical
|
|
65
|
+
<% end %>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="queues-search-bar">
|
|
69
|
+
<label class="search-label" for="bus-search">Search:</label>
|
|
70
|
+
<div class="search-input-group">
|
|
71
|
+
<input type="text" id="bus-search" class="queues-search-input" placeholder="Search events...">
|
|
72
|
+
<span class="search-icon">
|
|
73
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke="#9ca3af" stroke-width="2.5">
|
|
74
|
+
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
75
|
+
</svg>
|
|
76
|
+
</span>
|
|
77
|
+
</div>
|
|
60
78
|
</div>
|
|
61
79
|
</div>
|
|
62
80
|
|
|
63
81
|
<div class="<%= params[:account_id].present? ? 'max-width-67' : 'max-width-80' %>">
|
|
64
82
|
<table id="bus-table" class="bus-table">
|
|
65
83
|
<thead>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
84
|
+
<tr>
|
|
85
|
+
<th></th>
|
|
86
|
+
<th class="sortable-header" data-column="1">
|
|
87
|
+
<div class="header-content">
|
|
88
|
+
<span class="header-text">Created date</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>
|
|
74
93
|
</div>
|
|
75
|
-
</
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
94
|
+
</th>
|
|
95
|
+
<th class="sortable-header" data-column="2">
|
|
96
|
+
<div class="header-content">
|
|
97
|
+
<span class="header-text">Class name</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>
|
|
83
102
|
</div>
|
|
84
|
-
</
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
</th>
|
|
104
|
+
<th class="sortable-header" data-column="3">
|
|
105
|
+
<div class="header-content">
|
|
106
|
+
<span class="header-text">Event</span>
|
|
107
|
+
<div class="sort-icons">
|
|
108
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
109
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
110
|
+
</div>
|
|
92
111
|
</div>
|
|
93
|
-
</
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
</th>
|
|
113
|
+
<th class="sortable-header" data-column="4">
|
|
114
|
+
<div class="header-content">
|
|
115
|
+
<span class="header-text">User token</span>
|
|
116
|
+
<div class="sort-icons">
|
|
117
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
118
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
119
|
+
</div>
|
|
101
120
|
</div>
|
|
102
|
-
</
|
|
103
|
-
|
|
104
|
-
<% if @account_id.blank? %>
|
|
121
|
+
</th>
|
|
122
|
+
<% if @account_id.blank? %>
|
|
105
123
|
<th class="sortable-header" data-column="5">
|
|
106
124
|
<div class="header-content">
|
|
107
125
|
<span class="header-text">Account record id</span>
|
|
@@ -111,22 +129,11 @@
|
|
|
111
129
|
</div>
|
|
112
130
|
</div>
|
|
113
131
|
</th>
|
|
114
|
-
|
|
115
|
-
|
|
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>
|
|
132
|
+
<% end %>
|
|
133
|
+
</tr>
|
|
127
134
|
</thead>
|
|
128
135
|
<tbody>
|
|
129
|
-
|
|
136
|
+
<% (@queues_entries['busEvents'] || []).each do |bus_event| %>
|
|
130
137
|
<tr>
|
|
131
138
|
<td class="timeline">
|
|
132
139
|
<span class="dot"></span>
|
|
@@ -138,66 +145,97 @@
|
|
|
138
145
|
<% if @account_id.blank? %>
|
|
139
146
|
<td><%= bus_event['searchKey1'] %></td>
|
|
140
147
|
<% end %>
|
|
141
|
-
<% if @account_id.present? %>
|
|
142
|
-
<td><%= bus_event['userToken'] %></td>
|
|
143
|
-
<% end %>
|
|
144
148
|
</tr>
|
|
145
|
-
|
|
149
|
+
<% end %>
|
|
146
150
|
</tbody>
|
|
147
151
|
</table>
|
|
148
152
|
</div>
|
|
153
|
+
|
|
149
154
|
</div>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<%# Notifications pane %>
|
|
158
|
+
<div class="tab-pane fade <%= show_notifications ? 'show active' : '' %>" id="notifications">
|
|
159
|
+
<div class="queues-pane-inner">
|
|
160
|
+
|
|
161
|
+
<div class="queues-controls-bar mb-4">
|
|
162
|
+
<div class="d-flex align-items-center gap-3">
|
|
163
|
+
<span class="time-scope-label">Time scope</span>
|
|
164
|
+
<div class="d-flex gap-2">
|
|
165
|
+
<%= link_to kaui_engine.queues_path(
|
|
166
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history, :queue_tab)
|
|
167
|
+
.merge(with_history: 'false', tab: 'future',
|
|
168
|
+
max_date: (@now + 1.week).utc.iso8601, queue_tab: 'notifications')
|
|
169
|
+
),
|
|
170
|
+
class: "time-scope-btn #{params[:tab].blank? || params[:tab] == 'future' ? 'active' : ''}" do %>
|
|
171
|
+
<span class="radio-dot"></span>
|
|
172
|
+
Current / Future
|
|
173
|
+
<% end %>
|
|
174
|
+
<%= link_to kaui_engine.queues_path(
|
|
175
|
+
params.to_unsafe_h.except(:min_date, :max_date, :tab, :with_history, :queue_tab)
|
|
176
|
+
.merge(with_history: 'true', tab: 'all', queue_tab: 'notifications')
|
|
177
|
+
),
|
|
178
|
+
class: "time-scope-btn #{['week', 'month', 'all'].include?(params[:tab]) ? 'active' : ''}" do %>
|
|
179
|
+
<span class="radio-dot"></span>
|
|
180
|
+
Historical
|
|
181
|
+
<% end %>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="queues-search-bar">
|
|
185
|
+
<label class="search-label" for="notifications-search">Search:</label>
|
|
186
|
+
<div class="search-input-group">
|
|
187
|
+
<input type="text" id="notifications-search" class="queues-search-input" placeholder="Search events...">
|
|
188
|
+
<span class="search-icon">
|
|
189
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke="#9ca3af" stroke-width="2.5">
|
|
190
|
+
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
191
|
+
</svg>
|
|
192
|
+
</span>
|
|
193
|
+
</div>
|
|
156
194
|
</div>
|
|
157
195
|
</div>
|
|
158
196
|
|
|
159
197
|
<div class="<%= params[:account_id].present? ? 'max-width-67' : 'max-width-80' %>">
|
|
160
198
|
<table id="notifications-table" class="notifications-table">
|
|
161
199
|
<thead>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
200
|
+
<tr>
|
|
201
|
+
<th></th>
|
|
202
|
+
<th class="sortable-header" data-column="1">
|
|
203
|
+
<div class="header-content">
|
|
204
|
+
<span class="header-text">Effective date</span>
|
|
205
|
+
<div class="sort-icons">
|
|
206
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
207
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
208
|
+
</div>
|
|
170
209
|
</div>
|
|
171
|
-
</
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
210
|
+
</th>
|
|
211
|
+
<th class="sortable-header" data-column="2">
|
|
212
|
+
<div class="header-content">
|
|
213
|
+
<span class="header-text">Queue name</span>
|
|
214
|
+
<div class="sort-icons">
|
|
215
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
216
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
217
|
+
</div>
|
|
179
218
|
</div>
|
|
180
|
-
</
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
219
|
+
</th>
|
|
220
|
+
<th class="sortable-header" data-column="3">
|
|
221
|
+
<div class="header-content">
|
|
222
|
+
<span class="header-text">Event</span>
|
|
223
|
+
<div class="sort-icons">
|
|
224
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
225
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
226
|
+
</div>
|
|
188
227
|
</div>
|
|
189
|
-
</
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
228
|
+
</th>
|
|
229
|
+
<th class="sortable-header" data-column="4">
|
|
230
|
+
<div class="header-content">
|
|
231
|
+
<span class="header-text">User token</span>
|
|
232
|
+
<div class="sort-icons">
|
|
233
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
234
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
235
|
+
</div>
|
|
197
236
|
</div>
|
|
198
|
-
</
|
|
199
|
-
|
|
200
|
-
<% if @account_id.blank? %>
|
|
237
|
+
</th>
|
|
238
|
+
<% if @account_id.blank? %>
|
|
201
239
|
<th class="sortable-header" data-column="5">
|
|
202
240
|
<div class="header-content">
|
|
203
241
|
<span class="header-text">Account record id</span>
|
|
@@ -207,74 +245,52 @@
|
|
|
207
245
|
</div>
|
|
208
246
|
</div>
|
|
209
247
|
</th>
|
|
210
|
-
|
|
211
|
-
|
|
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>
|
|
248
|
+
<% end %>
|
|
249
|
+
</tr>
|
|
223
250
|
</thead>
|
|
224
251
|
<tbody>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<tr class="">
|
|
228
|
-
<% else %>
|
|
229
|
-
<tr>
|
|
230
|
-
<% end %>
|
|
252
|
+
<% (@queues_entries['notifications'] || []).each do |notification| %>
|
|
253
|
+
<tr>
|
|
231
254
|
<td class="timeline">
|
|
232
255
|
<div class="dot"></div>
|
|
233
256
|
</td>
|
|
234
257
|
<td><span><%= truncate_millis(notification['effectiveDate']) %></span></td>
|
|
235
|
-
<td>
|
|
236
|
-
<%= notification['queueName'] %>
|
|
237
|
-
</td>
|
|
258
|
+
<td><%= notification['queueName'] %></td>
|
|
238
259
|
<td><%= "<pre>#{JSON.pretty_generate(notification['event'])}</pre>".html_safe %></td>
|
|
239
260
|
<td><%= notification['userToken'] %></td>
|
|
240
261
|
<% if @account_id.blank? %>
|
|
241
|
-
|
|
242
|
-
<% end %>
|
|
243
|
-
<% if @account_id.present? %>
|
|
244
|
-
<td><%= notification['userToken'] %></td>
|
|
262
|
+
<td><%= notification['searchKey1'] %></td>
|
|
245
263
|
<% end %>
|
|
246
264
|
</tr>
|
|
247
|
-
|
|
265
|
+
<% end %>
|
|
248
266
|
</tbody>
|
|
249
267
|
</table>
|
|
250
268
|
</div>
|
|
269
|
+
|
|
251
270
|
</div>
|
|
252
|
-
|
|
271
|
+
</div>
|
|
253
272
|
|
|
254
273
|
</div>
|
|
255
274
|
</div>
|
|
275
|
+
|
|
256
276
|
</div>
|
|
257
277
|
</div>
|
|
258
278
|
</div>
|
|
259
279
|
|
|
260
|
-
<% nb_bus_entries = (@queues_entries['busEvents'] || []).size %>
|
|
261
|
-
<% nb_notifications_entries = (@queues_entries['notifications'] || []).size %>
|
|
262
280
|
<%= javascript_tag do %>
|
|
263
281
|
$(document).ready(function() {
|
|
264
282
|
var busTable = $('#bus-table').DataTable({
|
|
265
|
-
"dom": "<'row
|
|
283
|
+
"dom": "t<'row dt-footer-row'<'col-md-6'i><'col-md-6'p>>",
|
|
266
284
|
"paging": true,
|
|
267
285
|
"pagingType": "full_numbers",
|
|
268
286
|
"pageLength": 25,
|
|
269
287
|
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
|
|
270
288
|
"order": [],
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
],
|
|
289
|
+
<% if @account_id.blank? %>
|
|
290
|
+
"columnDefs": [{"targets": [5], "visible": false, "searchable": true}],
|
|
291
|
+
<% else %>
|
|
292
|
+
"columnDefs": [],
|
|
293
|
+
<% end %>
|
|
278
294
|
"language": {
|
|
279
295
|
"paginate": {
|
|
280
296
|
"first": "First",
|
|
@@ -286,24 +302,22 @@
|
|
|
286
302
|
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
|
|
287
303
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
|
288
304
|
"infoFiltered": "(filtered from _MAX_ total entries)",
|
|
289
|
-
"search": "Search:",
|
|
290
305
|
"zeroRecords": "No matching records found"
|
|
291
306
|
}
|
|
292
307
|
});
|
|
308
|
+
|
|
293
309
|
var notificationsTable = $('#notifications-table').DataTable({
|
|
294
|
-
"dom": "<'row
|
|
310
|
+
"dom": "t<'row dt-footer-row'<'col-md-6'i><'col-md-6'p>>",
|
|
295
311
|
"paging": true,
|
|
296
312
|
"pagingType": "full_numbers",
|
|
297
313
|
"pageLength": 25,
|
|
298
314
|
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
|
|
299
315
|
"order": [],
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
],
|
|
316
|
+
<% if @account_id.blank? %>
|
|
317
|
+
"columnDefs": [{"targets": [5], "visible": false, "searchable": true}],
|
|
318
|
+
<% else %>
|
|
319
|
+
"columnDefs": [],
|
|
320
|
+
<% end %>
|
|
307
321
|
"language": {
|
|
308
322
|
"paginate": {
|
|
309
323
|
"first": "First",
|
|
@@ -315,11 +329,18 @@
|
|
|
315
329
|
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
|
|
316
330
|
"infoEmpty": "Showing 0 to 0 of 0 entries",
|
|
317
331
|
"infoFiltered": "(filtered from _MAX_ total entries)",
|
|
318
|
-
"search": "Search:",
|
|
319
332
|
"zeroRecords": "No matching records found"
|
|
320
333
|
}
|
|
321
334
|
});
|
|
322
335
|
|
|
336
|
+
$('#bus-search').on('keyup', function() {
|
|
337
|
+
busTable.search($(this).val()).draw();
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
$('#notifications-search').on('keyup', function() {
|
|
341
|
+
notificationsTable.search($(this).val()).draw();
|
|
342
|
+
});
|
|
343
|
+
|
|
323
344
|
// Custom sorting for Bus table
|
|
324
345
|
(function() {
|
|
325
346
|
var currentSortColumn = -1;
|