kaui 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/kaui/kaui.js +118 -11
  3. data/app/assets/stylesheets/kaui/common.less +91 -6
  4. data/app/assets/stylesheets/kaui/payment.less +1 -0
  5. data/app/controllers/kaui/account_children_controller.rb +1 -4
  6. data/app/controllers/kaui/accounts_controller.rb +4 -7
  7. data/app/controllers/kaui/admin_allowed_users_controller.rb +24 -7
  8. data/app/controllers/kaui/admin_tenants_controller.rb +59 -20
  9. data/app/controllers/kaui/audit_logs_controller.rb +3 -2
  10. data/app/controllers/kaui/charges_controller.rb +1 -1
  11. data/app/controllers/kaui/credits_controller.rb +1 -1
  12. data/app/controllers/kaui/home_controller.rb +273 -10
  13. data/app/controllers/kaui/invoice_items_controller.rb +1 -1
  14. data/app/controllers/kaui/invoices_controller.rb +3 -3
  15. data/app/controllers/kaui/payments_controller.rb +5 -3
  16. data/app/controllers/kaui/refunds_controller.rb +2 -2
  17. data/app/controllers/kaui/subscriptions_controller.rb +2 -1
  18. data/app/helpers/kaui/object_helper.rb +4 -0
  19. data/app/helpers/kaui/plugin_helper.rb +36 -20
  20. data/app/helpers/kaui/uuid_helper.rb +9 -0
  21. data/app/models/kaui/admin.rb +3 -1
  22. data/app/models/kaui/admin_tenant.rb +58 -10
  23. data/app/models/kaui/allowed_user.rb +1 -0
  24. data/app/models/kaui/catalog.rb +2 -2
  25. data/app/models/kaui/credit.rb +0 -2
  26. data/app/models/kaui/overdue.rb +5 -5
  27. data/app/views/kaui/account_children/index.html.erb +3 -3
  28. data/app/views/kaui/accounts/_account_info.html.erb +45 -91
  29. data/app/views/kaui/accounts/_billing_info.html.erb +12 -8
  30. data/app/views/kaui/accounts/_parent.html.erb +1 -1
  31. data/app/views/kaui/accounts/_payment_methods.html.erb +1 -1
  32. data/app/views/kaui/accounts/_personal_info.html.erb +74 -0
  33. data/app/views/kaui/accounts/index.html.erb +4 -4
  34. data/app/views/kaui/accounts/show.html.erb +9 -3
  35. data/app/views/kaui/admin_allowed_users/_form.html.erb +38 -10
  36. data/app/views/kaui/admin_tenants/_form_plugin_config.erb +82 -17
  37. data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +11 -3
  38. data/app/views/kaui/admin_tenants/_show_overdue.erb +4 -4
  39. data/app/views/kaui/admin_tenants/_tenant_details.html.erb +7 -1
  40. data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +1 -1
  41. data/app/views/kaui/audit_logs/_show_history_modal.html.erb +1 -1
  42. data/app/views/kaui/audit_logs/index.html.erb +4 -0
  43. data/app/views/kaui/home/_advanced_search_modal.html.erb +80 -0
  44. data/app/views/kaui/home/index.html.erb +18 -5
  45. data/app/views/kaui/invoices/show.html.erb +7 -1
  46. data/app/views/kaui/layouts/kaui_flash.html.erb +14 -3
  47. data/app/views/kaui/layouts/kaui_navbar.html.erb +11 -9
  48. data/app/views/kaui/payments/_form.html.erb +8 -10
  49. data/app/views/kaui/payments/_payment_table.html.erb +40 -37
  50. data/app/views/kaui/payments/index.html.erb +1 -0
  51. data/app/views/kaui/payments/show.html.erb +5 -7
  52. data/app/views/kaui/queues/index.html.erb +22 -4
  53. data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +1 -1
  54. data/app/views/kaui/tag_definitions/index.html.erb +1 -1
  55. data/config/routes.rb +2 -0
  56. data/lib/kaui/version.rb +1 -1
  57. data/test/functional/kaui/accounts_controller_test.rb +35 -0
  58. data/test/functional/kaui/admin_allowed_users_controller_test.rb +55 -2
  59. data/test/functional/kaui/admin_tenants_controller_test.rb +67 -6
  60. data/test/functional/kaui/home_controller_test.rb +389 -15
  61. data/test/functional/kaui/subscriptions_controller_test.rb +1 -1
  62. data/test/killbill_test_helper.rb +2 -2
  63. data/test/unit/helpers/kaui/uuid_helper_test.rb +16 -0
  64. data/test/unit/kaui/admin_tenant_test.rb +49 -0
  65. metadata +6 -4
  66. data/test/unit/kaui/uuid_helper_test.rb +0 -10
@@ -4,7 +4,13 @@
4
4
 
5
5
  <h1>Tenant details</h1>
6
6
 
7
- <b>Name:</b> <%= @tenant.name %>
7
+ <b>Name:</b> <%= @tenant.name %>&nbsp;
8
+ <% if session[:kb_tenant_name] == @tenant.name %>
9
+ <i class="fa fa-toggle-on switch-tenant-active" title="Currently selected"></i>
10
+ <% else %>
11
+ <%= link_to("<i class=\"fa fa-toggle-off\" aria-hidden=\"true\"></i>".html_safe,
12
+ switch_tenant_path(:kb_tenant_id => @tenant.kb_tenant_id), title: 'Click the toggle to switch tenant') %>
13
+ <% end %>
8
14
  <br/>
9
15
  <b>Tenant ID:</b> <%= @tenant.kb_tenant_id %>
10
16
  <br/>
@@ -35,7 +35,7 @@
35
35
  <%= state_form_group.fields_for "#{idx}", state do |state_form| %>
36
36
  <td><%= state_form.text_field :name %></td>
37
37
  <td><%= state_form.text_field :external_message %></td>
38
- <td><%= state_form.select :block_changes, options_for_select([true, false ], state.block_changes), :class => 'form-control' %></td>
38
+ <td><%= state_form.select :is_block_changes, options_for_select([true, false ], state.is_block_changes), :class => 'form-control' %></td>
39
39
  <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>
40
40
  <%= state_form.fields_for 'condition' do |condition| %>
41
41
  <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>
@@ -151,7 +151,7 @@
151
151
  renderHistory(data.audits);
152
152
  } else {
153
153
  $('#showHistoryModal').modal('hide')
154
- ajaxAlert(data.error);
154
+ ajaxErrorAlert(data.error);
155
155
  }
156
156
  }
157
157
  });
@@ -46,7 +46,11 @@
46
46
  } else if ( data[3] == "DELETE" ) {
47
47
  $(row).addClass( 'delete' );
48
48
  }
49
+ },
50
+ drawCallback: function() {
51
+ setObjectIdPopover();
49
52
  }
50
53
  });
51
54
  });
55
+
52
56
  <% end %>
@@ -0,0 +1,80 @@
1
+ <div class="modal fade" id="advancedSearchModal" tabindex="-1" role="dialog">
2
+ <div class="modal-dialog" role="document">
3
+ <div class="modal-content column-block">
4
+ <div>
5
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
6
+ <h1 class="modal-title">Advanced search</h1>
7
+ </div>
8
+ <div class="modal-body">
9
+ <%= form_tag search_path, :method => 'get', :class => 'form-horizontal' do %>
10
+ <input type="hidden" id="advancedQuery" name="q" />
11
+ <div class="form-group">
12
+ <%= label_tag :search_for, 'Search for', :class => 'col-sm-4 control-label' %>
13
+ <div class="col-sm-8">
14
+ <%= text_field_tag :search_for, nil, :class => 'form-control' %>
15
+ </div>
16
+ </div>
17
+ <div class="form-group">
18
+ <%= label_tag :object_type, 'Object type', :class => 'col-sm-4 control-label' %>
19
+ <div class="col-sm-8">
20
+ <%= select_tag :object_type, options_for_select(object_types_for_advanced_search,:ACCOUNT), :class => 'form-control' %>
21
+ </div>
22
+ </div>
23
+ <div class="form-group">
24
+ <%= label_tag :search_by, 'Search by', :class => 'col-sm-4 control-label' %>
25
+ <div class="col-sm-8">
26
+ <%= select_tag :search_by, options_for_select(['', 'ID', 'EXTERNAL_KEY'],''), :class => 'form-control' %>
27
+ </div>
28
+ </div>
29
+ <div class="form-group">
30
+ <div class="checkbox col-sm-offset-4 col-sm-8">
31
+ <%= label_tag :fast do %>
32
+ <%= check_box_tag :fast %>Fast search (find first exact match)
33
+ <% end %>
34
+ </div>
35
+ </div>
36
+
37
+ <div class="form-group">
38
+ <div class="col-sm-offset-4 col-sm-8">
39
+ <%= submit_tag 'Search', :class => 'btn btn-danger' %>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="footer-notice">
44
+ <div class=" modal-footer">
45
+ <div class="alert alert-info">
46
+ <strong>Search query</strong>
47
+ <p id="noticeMessage"></p>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <% end %>
52
+ </div>
53
+ </div><!-- /.modal-content -->
54
+ </div><!-- /.modal-dialog -->
55
+ </div><!-- /.modal -->
56
+
57
+ <%= javascript_tag do %>
58
+ $(document).ready(function() {
59
+
60
+ function refresh_query(){
61
+ var searchFor = 'FOR:' + ($('#search_for').val() || '');
62
+ var objectType = 'FIND:' + $('#object_type').val();
63
+ var searchBy = !isBlank($('#search_by').val()) ? 'BY:' + $('#search_by').val() : '';
64
+ var fast = $('#fast').prop('checked') ? 'ONLY_FIRST:1' : '';
65
+ var query = objectType + ' ' + searchBy + ' ' + searchFor + ' ' + fast;
66
+
67
+ $('#noticeMessage').text(query);
68
+ $('#advancedQuery').val(query);
69
+ }
70
+
71
+ $('#search_for').keyup(function(){ refresh_query(); });
72
+ $('#search_for').change(function(){ refresh_query(); });
73
+ $('#object_type').change(function(){ refresh_query(); });
74
+ $('#search_by').change(function(){ refresh_query(); });
75
+ $('#fast').change(function(){ refresh_query(); });
76
+
77
+ refresh_query();
78
+
79
+ });
80
+ <% end %>
@@ -5,10 +5,9 @@
5
5
  <%= form_tag search_path, :id => 'home_searchform', :method => 'get' do %>
6
6
  <%= text_field_tag :q, @search_query, :id => 'search', :placeholder => 'What are you looking for?' %>
7
7
  <%= submit_tag 'Search' %>
8
- <div class="checkbox">
9
- <%= label_tag :fast do %>
10
- <%= check_box_tag :fast %>Fast search (find first exact match)
11
- <% end %>
8
+
9
+ <div id="advanced">
10
+ <%= link_to('Advanced search','#advancedSearchModal', data: { toggle: 'modal', target: '#advancedSearchModal' }) %>
12
11
  </div>
13
12
  <% end %>
14
13
 
@@ -21,5 +20,19 @@
21
20
  </p>
22
21
  </div>
23
22
  </div>
24
- <span class="duck_help">Accounts are searched by default. Or try the <b>invoice:</b> and <b>payment:</b> and <b>transaction:</b> operators</span>
23
+ <span class="duck_help">Accounts are searched by default. For complex searches, use <b>Advanced Search</b>.</span>
24
+
25
25
  </div>
26
+
27
+ <%= render :partial => 'advanced_search_modal' %>
28
+
29
+ <script language="javascript">
30
+ $(document).ready(function() {
31
+ function alignToSearch() {
32
+ var leftPosition = $('#search').position().left + 25;
33
+ $('#advanced').css('padding-left',leftPosition);
34
+ }
35
+
36
+ alignToSearch();
37
+ });
38
+ </script>
@@ -41,6 +41,7 @@
41
41
  </div>
42
42
 
43
43
  <% unless @payments.empty? %>
44
+ <div class="row">
44
45
  <div class="col-md-12">
45
46
 
46
47
  <div class="search">
@@ -52,12 +53,16 @@
52
53
  <% @payments.each_with_index do |payment, idx| %>
53
54
 
54
55
  <div class="row">
55
- <div class="col-md-1">
56
+ <div class="col-md-5">
56
57
  <table class="transparent subtitle">
57
58
  <tr>
58
59
  <th>Payment</th>
59
60
  <td><%= link_to payment.payment_number, account_payment_path(@account.account_id, payment.payment_id) %></td>
60
61
  </tr>
62
+ <tr>
63
+ <th>External key</th>
64
+ <td><%= payment.payment_external_key %></td>
65
+ </tr>
61
66
  </table>
62
67
  </div>
63
68
  </div>
@@ -78,6 +83,7 @@
78
83
  </div>
79
84
 
80
85
  </div>
86
+ </div>
81
87
  <% end %>
82
88
 
83
89
  <%= javascript_tag do %>
@@ -15,14 +15,25 @@
15
15
  </div>
16
16
  </div>
17
17
  <% end %>
18
- <!--This is for ajax calls that need to notify for error, to trigger this alert use ajaxAlert(message)-->
19
- <div id="ajaxAlert" class="row" style="display: none">
18
+ <!--This is for ajax calls that need to notify for error, to trigger this alert use ajaxAlert(message, timeout)-->
19
+ <div id="ajaxErrorAlert" class="row ajaxAlert" style="display: none">
20
20
  <div class="col-md-12">
21
21
  <div class="alert alert-danger">
22
22
  <button type="button" class="close" aria-label="Close">
23
23
  <span aria-hidden="true">&times;</span>
24
24
  </button>
25
- <span id="ajaxErrorMessage"></span>
25
+ <span id="ajaxErrorAlertMessage" class="ajaxAlertMessage"></span>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ <!--This is for ajax calls that need to notify information, to trigger this alert use ajaxInfo(message, timeout)-->
30
+ <div id="ajaxInfoAlert" class="row ajaxAlert" style="display: none">
31
+ <div class="col-md-12">
32
+ <div class="alert alert-info">
33
+ <button type="button" class="close" aria-label="Close">
34
+ <span aria-hidden="true">&times;</span>
35
+ </button>
36
+ <span id="ajaxInfoAlertMessage" class="ajaxAlertMessage"></span>
26
37
  </div>
27
38
  </div>
28
39
  </div>
@@ -39,16 +39,15 @@
39
39
  </div>
40
40
  <% end %>
41
41
 
42
- <% if current_user.root? || can?(:view, Kaui::AdminTenant) %>
42
+ <% if (current_user.root? && tenant_selected?) %>
43
43
  <div class="tag-select" onclick="void(0)">
44
44
  <span><i class="fa fa-cogs"></i><i class="fa fa-caret-down"></i></span>
45
45
 
46
46
  <div class="tag-select-box">
47
- <% if can? :view, Kaui::AdminTenant %>
48
- <%= link_to 'Users', kaui_engine.admin_allowed_users_path %>
49
- <%= link_to 'Tenants', kaui_engine.admin_tenants_path %>
50
- <% end %>
51
- <% if current_user.root? %>
47
+ <%= link_to 'Users', kaui_engine.admin_allowed_users_path %>
48
+ <%= link_to 'Tenants', kaui_engine.admin_tenants_path %>
49
+
50
+ <% if current_user.root? && tenant_selected? %>
52
51
  <%= link_to 'Admin', kaui_engine.admin_path %>
53
52
  <% end %>
54
53
  </div>
@@ -77,10 +76,13 @@
77
76
  </li>
78
77
  <li><%= link_to 'Sign Out', kaui_engine.destroy_user_session_path, :method => :delete %></li>
79
78
  <% else %>
80
- <li><%= link_to 'Login'.html_safe, kaui_engine.new_user_session_path %></li>
81
-
82
79
  <% unless Kaui.disable_sign_up_link %>
83
- <li><%= link_to 'Sign-up'.html_safe, kaui_engine.new_user_registration_path %></li>
80
+ <% unless current_page?(new_user_session_path)%>
81
+ <li><%= link_to 'Login'.html_safe, kaui_engine.new_user_session_path %></li>
82
+ <% end %>
83
+ <% unless current_page?(new_user_registration_path)%>
84
+ <li><%= link_to 'Sign-up'.html_safe, kaui_engine.new_user_registration_path %></li>
85
+ <% end %>
84
86
  <% end %>
85
87
  <% end %>
86
88
  </ul>
@@ -2,17 +2,15 @@
2
2
  <%= f.hidden_field :account_id %>
3
3
  <%= f.hidden_field :target_invoice_id %>
4
4
 
5
- <% if can? :external_payment, Kaui::Payment %>
6
- <div class='form-group'>
7
- <div class="col-sm-offset-3 col-sm-9">
8
- <div class="checkbox">
9
- <%= label_tag :external do %>
10
- <%= check_box_tag :external %>External?
11
- <% end %>
12
- </div>
13
- </div>
5
+ <div class='form-group'>
6
+ <div class="col-sm-offset-3 col-sm-9">
7
+ <div class="checkbox">
8
+ <%= label_tag :external do %>
9
+ <%= check_box_tag :external %>External?
10
+ <% end %>
14
11
  </div>
15
- <% end %>
12
+ </div>
13
+ </div>
16
14
  <div class="form-group">
17
15
  <%= f.label :purchased_amount, 'Amount', :class => 'col-sm-3 control-label' %>
18
16
  <div class="col-sm-9">
@@ -11,60 +11,61 @@
11
11
  <%= render :partial => 'kaui/custom_fields/list_bar',
12
12
  :locals => {:custom_fields => custom_fields} %>
13
13
 
14
- <div class="tag-select" onclick="void(0)">
15
- <span><i class="fa fa-credit-card"></i><i class="fa fa-caret-down"></i></span>
14
+ <% if payment.capturable? || payment.voidable? || (payment.refundable? && (can?(:refund, Kaui::Payment) || can?(:chargeback, Kaui::Payment))) %>
16
15
 
17
- <div class="tag-select-box">
16
+ <div class="tag-select" onclick="void(0)">
17
+ <span><i class="fa fa-credit-card"></i><i class="fa fa-caret-down"></i></span>
18
18
 
19
- <% if payment.capturable? || payment.voidable? || (payment.refundable? && (can?(:refund, Kaui::Payment) || can?(:chargeback, Kaui::Payment))) %>
20
- <% if payment.refundable? %>
21
- <% if can? :refund, Kaui::Payment %>
22
- <% if payment.target_invoice_id.present? %>
23
- <%= link_to '<i class="fa fa-money"></i>&nbsp;Refund'.html_safe, kaui_engine.new_account_refund_path(payment.account_id, :params => {:payment_id => payment.payment_id,
24
- :invoice_id => payment.target_invoice_id}) %>
25
- <% else %>
26
- <%= link_to '<i class="fa fa-money"></i>&nbsp;Refund'.html_safe, kaui_engine.new_account_transaction_path(payment.account_id,
27
- :payment_id => payment.payment_id,
28
- :payment_method_id => payment.payment_method_id,
29
- :amount => payment.amount_refundable,
30
- :currency => payment.currency,
31
- :transaction_type => 'REFUND') %>
32
- <% end %>
19
+ <div class="tag-select-box">
20
+
21
+ <% if payment.refundable? %>
22
+ <% if can? :refund, Kaui::Payment %>
23
+ <% if payment.target_invoice_id.present? %>
24
+ <%= link_to '<i class="fa fa-money"></i>&nbsp;Refund'.html_safe, kaui_engine.new_account_refund_path(payment.account_id, :params => {:payment_id => payment.payment_id,
25
+ :invoice_id => payment.target_invoice_id}) %>
26
+ <% else %>
27
+ <%= link_to '<i class="fa fa-money"></i>&nbsp;Refund'.html_safe, kaui_engine.new_account_transaction_path(payment.account_id,
28
+ :payment_id => payment.payment_id,
29
+ :payment_method_id => payment.payment_method_id,
30
+ :amount => payment.amount_refundable,
31
+ :currency => payment.currency,
32
+ :transaction_type => 'REFUND') %>
33
33
  <% end %>
34
- <% if can? :chargeback, Kaui::Payment %>
35
- <% if payment.target_invoice_id.present? %>
36
- <%= link_to '<i class="fa fa-undo"></i>&nbsp;Chargeback'.html_safe, kaui_engine.new_account_chargeback_path(payment.account_id,
37
- :payment_id => payment.payment_id,
38
- :invoice_id => payment.target_invoice_id) %>
39
- <% else %>
40
- <%= link_to '<i class="fa fa-undo"></i>&nbsp;Chargeback'.html_safe, kaui_engine.new_account_transaction_path(payment.account_id,
41
- :payment_id => payment.payment_id,
42
- :payment_method_id => payment.payment_method_id,
43
- :amount => payment.amount_refundable,
44
- :currency => payment.currency,
45
- :transaction_type => 'CHARGEBACK') %>
46
- <% end %>
34
+ <% end %>
35
+ <% if can? :chargeback, Kaui::Payment %>
36
+ <% if payment.target_invoice_id.present? %>
37
+ <%= link_to '<i class="fa fa-undo"></i>&nbsp;Chargeback'.html_safe, kaui_engine.new_account_chargeback_path(payment.account_id,
38
+ :payment_id => payment.payment_id,
39
+ :invoice_id => payment.target_invoice_id) %>
40
+ <% else %>
41
+ <%= link_to '<i class="fa fa-undo"></i>&nbsp;Chargeback'.html_safe, kaui_engine.new_account_transaction_path(payment.account_id,
42
+ :payment_id => payment.payment_id,
43
+ :payment_method_id => payment.payment_method_id,
44
+ :amount => payment.amount_refundable,
45
+ :currency => payment.currency,
46
+ :transaction_type => 'CHARGEBACK') %>
47
47
  <% end %>
48
48
  <% end %>
49
- <% if payment.capturable? %>
49
+ <% end %>
50
+ <% if payment.capturable? %>
50
51
  <%= link_to '<i class="fa fa-credit-card"></i>&nbsp;Capture'.html_safe, kaui_engine.new_account_transaction_path(payment.account_id,
51
52
  :payment_id => payment.payment_id,
52
53
  :payment_method_id => payment.payment_method_id,
53
54
  :amount => payment.amount_capturable,
54
55
  :currency => payment.currency,
55
56
  :transaction_type => 'CAPTURE') %>
56
- <% end %>
57
- <% if payment.voidable? %>
57
+ <% end %>
58
+ <% if payment.voidable? %>
58
59
  <%= link_to '<i class="fa fa-times-circle-o"></i>&nbsp;Void'.html_safe, kaui_engine.new_account_transaction_path(payment.account_id,
59
60
  :payment_id => payment.payment_id,
60
61
  :payment_method_id => payment.payment_method_id,
61
62
  :transaction_type => 'VOID') %>
62
- <% end %>
63
- <% end %>
64
- </div>
63
+ <% end %>
65
64
 
66
- </div>
65
+ </div>
67
66
 
67
+ </div>
68
+ <% end %>
68
69
  <% gateway_url = gateway_url(payment_method, payment) %>
69
70
  <% unless gateway_url.nil? %>
70
71
  <div class="gateway-link">
@@ -80,6 +81,7 @@
80
81
  <th>Date</th>
81
82
  <th>Type</th>
82
83
  <th>Amount</th>
84
+ <th>Transaction external key</th>
83
85
  <th>First id</th>
84
86
  <th>Second id</th>
85
87
  <th>Gateway code</th>
@@ -98,6 +100,7 @@
98
100
  (<%= transaction.currency %>)
99
101
  <% end %>
100
102
  </td>
103
+ <td><%= transaction.transaction_external_key %></td>
101
104
  <td><%= transaction.first_payment_reference_id %></td>
102
105
  <td><%= transaction.second_payment_reference_id %></td>
103
106
  <td><%= transaction.gateway_error_code %></td>
@@ -13,6 +13,7 @@
13
13
  <th>Capture amount</th>
14
14
  <th>Refund amount</th>
15
15
  <th>Last transaction status</th>
16
+ <th>External key</th>
16
17
  </tr>
17
18
  </thead>
18
19
  <tbody>
@@ -12,12 +12,10 @@
12
12
  <th>Invoice ID</th>
13
13
  <td><%= link_to @payment.target_invoice_id, account_invoice_path(@account.account_id, @payment.target_invoice_id) %></td>
14
14
  </tr>
15
- <% if @payment.payment_external_key != @payment.payment_id %>
16
- <tr>
17
- <th>External key</th>
18
- <td><%= @payment.payment_external_key %></td>
19
- </tr>
20
- <% end %>
15
+ <tr>
16
+ <th>External key</th>
17
+ <td><%= @payment.payment_external_key %></td>
18
+ </tr>
21
19
  </table>
22
20
  </div>
23
21
  </div>
@@ -37,7 +35,7 @@
37
35
 
38
36
  <h1>Payment Method Details</h1>
39
37
 
40
- <div class="fix-position payment-details">
38
+ <div class="payment-details">
41
39
  <% if @payment_method.nil? %>
42
40
  The Payment method has been deleted.
43
41
  <% else %>
@@ -25,6 +25,7 @@
25
25
  <% if @account_id.blank? %>
26
26
  <th>Account record id</th>
27
27
  <% end %>
28
+ <th></th>
28
29
  </tr>
29
30
  </thead>
30
31
  <tbody>
@@ -37,10 +38,11 @@
37
38
  <td><%= truncate_millis(bus_event['createdDate']) %></td>
38
39
  <td><%= truncate_class_name(bus_event['className']) %></td>
39
40
  <td><%= "<pre>#{JSON.pretty_generate(bus_event['event'])}</pre>".html_safe %></td>
40
- <td><%= truncate_uuid(bus_event['userToken']) %></td>
41
+ <td><%= object_id_popover(bus_event['userToken'], 'left') %></td>
41
42
  <% if @account_id.blank? %>
42
43
  <td><%= bus_event['searchKey1'] %></td>
43
44
  <% end %>
45
+ <td><%= bus_event['userToken'] %></td>
44
46
  </tr>
45
47
  <% end %>
46
48
  </tbody>
@@ -65,6 +67,7 @@
65
67
  <% if @account_id.blank? %>
66
68
  <th>Account record id</th>
67
69
  <% end %>
70
+ <th></th>
68
71
  </tr>
69
72
  </thead>
70
73
  <tbody>
@@ -79,10 +82,11 @@
79
82
  <%= notification['queueName'] %>
80
83
  </td>
81
84
  <td><%= "<pre>#{JSON.pretty_generate(notification['event'])}</pre>".html_safe %></td>
82
- <td><%= truncate_uuid(notification['userToken']) %></td>
85
+ <td><%= object_id_popover(notification['userToken'], 'left') %></td>
83
86
  <% if @account_id.blank? %>
84
87
  <td><%= notification['searchKey1'] %></td>
85
88
  <% end %>
89
+ <td><%= notification['userToken'] %></td>
86
90
  </tr>
87
91
  <% end %>
88
92
  </tbody>
@@ -108,7 +112,14 @@
108
112
  "displayStart": <%= [0, nb_bus_entries - 50].max %>,
109
113
  <% end %>
110
114
  "pageLength": 50,
111
- "order": []
115
+ "order": [],
116
+ "columnDefs": [
117
+ {
118
+ "targets": [ <%= @account_id.blank? ? 5 : 4 %> ],
119
+ "visible": false,
120
+ "searchable": true
121
+ }
122
+ ]
112
123
  });
113
124
  $('#notifications-table').dataTable({
114
125
  <% if nb_notifications_entries <= 50 %>
@@ -120,7 +131,14 @@
120
131
  "displayStart": 0,
121
132
  <% end %>
122
133
  "pageLength": 50,
123
- "order": []
134
+ "order": [],
135
+ "columnDefs": [
136
+ {
137
+ "targets": [ <%= @account_id.blank? ? 5 : 4 %> ],
138
+ "visible": false,
139
+ "searchable": true
140
+ }
141
+ ]
124
142
  });
125
143
  });
126
144
  <% end %>