kaui 1.0.0 → 1.1.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.
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
@@ -1,4 +1,4 @@
1
- <div class="col-md-6">
1
+ <div class="col-md-6 col-xs-12">
2
2
 
3
3
  <div class="column-block">
4
4
 
@@ -0,0 +1,74 @@
1
+ <div class="col-md-6 col-xs-12">
2
+
3
+ <div class="column-block">
4
+
5
+ <h1>Personal Information</h1>
6
+
7
+ <div class="info-wrapper">
8
+
9
+ <div class="toggler">
10
+ <div class="first-line">
11
+ <b>Show/Hide Content</b>
12
+ <i class="fa fa-caret-down"></i>
13
+ <i class="fa fa-caret-up"></i>
14
+ </div>
15
+
16
+ <div class="toggle">
17
+ <div class="row">
18
+ <div class="col-md-12">
19
+ <div class="fix-position">
20
+ <table class="transparent">
21
+ <tr>
22
+ <th>Name</th>
23
+ <td><%= @account.name %></td>
24
+ </tr>
25
+ <tr>
26
+ <th>Address1</th>
27
+ <td><%= @account.address1 %></td>
28
+ </tr>
29
+ <tr>
30
+ <th>Address2</th>
31
+ <td><%= @account.address2 %></td>
32
+ </tr>
33
+ <tr>
34
+ <th>City</th>
35
+ <td><%= @account.city %></td>
36
+ </tr>
37
+ <tr>
38
+ <th>State</th>
39
+ <td><%= @account.state %></td>
40
+ </tr>
41
+ <tr>
42
+ <th>Country</th>
43
+ <td><%= @account.country %></td>
44
+ </tr>
45
+ <tr>
46
+ <th>Postal Code</th>
47
+ <td><%= @account.postal_code %></td>
48
+ </tr>
49
+ <tr>
50
+ <th>Phone</th>
51
+ <td><%= @account.phone %></td>
52
+ </tr>
53
+ <tr>
54
+ <th>Company</th>
55
+ <td><%= @account.company %></td>
56
+ </tr>
57
+ <tr>
58
+ <th>Primary email</th>
59
+ <td><%= @account.email %></td>
60
+ </tr>
61
+ <%= render :partial => 'kaui/account_emails/account_emails_table',
62
+ :locals => {:account_emails => @account_emails} %>
63
+ </table>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+ </div>
71
+
72
+ </div>
73
+
74
+ </div>
@@ -12,12 +12,9 @@
12
12
  <thead>
13
13
  <tr>
14
14
  <th></th>
15
- <th>Name</th>
16
15
  <th>ID</th>
17
16
  <th>External key</th>
18
17
  <th>Balance</th>
19
- <th>City</th>
20
- <th>Country</th>
21
18
  </tr>
22
19
  </thead>
23
20
  <tbody>
@@ -55,7 +52,10 @@ $(document).ready(function() {
55
52
  $(td).css('width', '60px');
56
53
 
57
54
  } }
58
- ]
55
+ ],
56
+ drawCallback: function() {
57
+ setObjectIdPopover();
58
+ }
59
59
  });
60
60
 
61
61
  <!-- When we don't know the total number of pages, we need to hide the legend and next button manually -->
@@ -1,8 +1,14 @@
1
- <%= render :partial => 'account_info' %>
1
+ <div class="row">
2
+ <%= render :partial => 'account_info' %>
2
3
 
3
- <%= render :partial => 'billing_info' %>
4
+ <%= render :partial => 'billing_info' %>
5
+ </div>
6
+ <div class="row">
7
+ <%= render :partial => 'personal_info' %>
8
+
9
+ <%= render :partial => 'payment_methods' %>
10
+ </div>
4
11
 
5
- <%= render :partial => 'payment_methods' %>
6
12
 
7
13
  <%= render :partial => 'link_parent_modal' %>
8
14
 
@@ -1,10 +1,11 @@
1
1
  <% # Unclear why this url/method hack is needed %>
2
2
  <%= form_for @allowed_user, :url => @allowed_user.persisted? ? admin_allowed_user_path(@allowed_user.id) : admin_allowed_users_path, :method => @allowed_user.persisted? ? :put : :post, :html => {:class => 'form-horizontal'} do |f| %>
3
+ <input type="hidden" id="killbillManaged" value="<%= @is_killbill_managed %>" />
3
4
  <div class='form-group'>
4
5
  <div class="col-sm-offset-2 col-sm-9">
5
6
  <div class="checkbox">
6
7
  <%= label_tag :external do %>
7
- <%= check_box_tag :external %>Managed externally (LDAP, Okta, etc.)?
8
+ <%= check_box_tag :external, '1', false, { :disabled => !@allowed_user.id.blank? } %>Managed externally (LDAP, Okta, etc.)?
8
9
  <% end %>
9
10
  </div>
10
11
  </div>
@@ -42,15 +43,42 @@
42
43
  </div>
43
44
  <% end %>
44
45
 
46
+ <!-- is the user been edited? -->
47
+ <% if @allowed_user.persisted? %>
48
+ <div class="footer-notice managed-externally-notice">
49
+ <div class="modal-footer">
50
+ <div class="alert alert-warning">
51
+ <strong>Notice</strong>
52
+ <p id="noticeMessage">This user is managed externally (LDAP, Okta, etc.) or via Shiro configuration file.</p>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <% end %>
57
+
45
58
  <%= javascript_tag do %>
46
- $('#external').change(function() {
47
- if ($('#external').is(":checked")) {
48
- $('#password').attr('disabled', true);
49
- $('#roles').attr('disabled', true);
50
- }
51
- else {
52
- $('#password').attr('disabled', false);
53
- $('#roles').attr('disabled', false);
54
- }
59
+ $(document).ready(function() {
60
+
61
+ $('#external').change(function() {
62
+ is_killbill_managed();
63
+ });
64
+
65
+ function is_killbill_managed() {
66
+ var isKillbillManaged = isBlank($('#killbillManaged').val()) || $('#killbillManaged').val() == 'true';
67
+
68
+ if ($('#external').is(":checked") || !isKillbillManaged) {
69
+ $('#password').attr('disabled', true);
70
+ $('#roles').attr('disabled', true);
71
+ $('.help-block').hide();
72
+ $('.managed-externally-notice').show();
73
+ }
74
+ else {
75
+ $('#password').attr('disabled', false);
76
+ $('#roles').attr('disabled', false);
77
+ $('.help-block').show();
78
+ $('.managed-externally-notice').hide();
79
+ }
80
+ }
81
+
82
+ is_killbill_managed();
55
83
  });
56
84
  <% end %>
@@ -22,6 +22,7 @@
22
22
  <%= text_field_tag :entered_plugin_name, nil, :class => 'form-control', :plugin_config => @plugin_config, :tenant_plugin_config => @tenant_plugin_config %>
23
23
  <div class="text plugin-suggestion text-danger"></div>
24
24
  </div>
25
+ <div class="col-sm-1 spinner"><i class="fa fa-cog fa-2x fa-spin"></i></div>
25
26
  <label class="col-sm-1 toggle-container control-label">
26
27
  <label class="switch">
27
28
  <input id="toggle_input" type="checkbox">
@@ -31,8 +32,17 @@
31
32
  <label class="col-sm-3 control-label toggle-label text-muted">or toggle plugin name input</label>
32
33
  </div>
33
34
 
35
+ <div id="plugin_config_properties_header" class="form-group">
36
+ <label class="col-sm-2 control-label" for="plugin_name">Plugin Properties</label>
37
+ <label class="control-label switch-half-container" title="toggle raw">
38
+ <label class="switch-half">
39
+ <input id="toggle_raw" type="checkbox">
40
+ <span class="slider round"></span>
41
+ </label>
42
+ </label>
43
+ </div>
34
44
  <!-- Anchor DIV that gets thrown away when switching plugins -->
35
- <div id="plugin_config_properties" plugin_name="" class="col-sm-10">
45
+ <div id="plugin_config_properties" plugin_name="" class="row">
36
46
  </div>
37
47
 
38
48
  <div class="form-group">
@@ -45,10 +55,11 @@
45
55
  <% end %>
46
56
 
47
57
  <script id="plugin_config_properties_template" type="text/template">
58
+ <input type="hidden" id="plugin_key_values" value="{{data_json}}" />
48
59
  {{#plugin_props_with_values}}
49
60
  <div class="form-group">
50
- <label class="col-sm-2 control-label" for="{{property}}">{{property_label}}</label>
51
- <div class="col-sm-4">
61
+ <label class="col-sm-offset-1 col-sm-2 control-label" for="{{property}}">{{property_label}}</label>
62
+ <div class="col-sm-6">
52
63
  {{#is_raw_config}}
53
64
  <textarea name="plugin_properties[raw_config]" id="raw_config" rows="10" class="form-control">{{value}}</textarea>
54
65
  {{/is_raw_config}}
@@ -73,6 +84,8 @@
73
84
 
74
85
  <%= javascript_tag do %>
75
86
  $(document).ready(function() {
87
+ $(".spinner").hide();
88
+ $('#plugin_config_properties_header').hide();
76
89
 
77
90
  $('#entered_plugin_name').toggle();
78
91
  $('#toggle_input').on('change', function() {
@@ -86,18 +99,42 @@
86
99
  $('#select_plugin_name').val('');
87
100
  $('#plugin_config_properties').attr('plugin_name', '');
88
101
  $('#plugin_config_properties').empty();
102
+ $('#plugin_config_properties_header').hide();
103
+ $(".plugin-suggestion").html('');
104
+ });
89
105
 
106
+ $("#toggle_raw").on('change', function(e) {
107
+ if (isBlank($('#plugin_key_values').val())) {
108
+ return;
109
+ }
110
+
111
+ var plugin_key_values = JSON.parse($('#plugin_key_values').val());
112
+ if ($("#toggle_raw").prop("checked")) {
113
+ var raw = [];
114
+ raw.push({ is_raw_config: true, property: "raw_config", property_label: "Raw Config", value: ''});
115
+ for ( var i = 0; i < plugin_key_values.length ; i++ ) {
116
+ raw[0].value += plugin_key_values[i].property + '=' + plugin_key_values[i].value;
117
+ if (i < plugin_key_values.length - 1) {
118
+ raw[0].value += "\n";
119
+ }
120
+ }
121
+ render_plugin_key_values(raw, plugin_key_values);
122
+ } else {
123
+ render_plugin_key_values(plugin_key_values, plugin_key_values);
124
+ }
90
125
  });
91
126
 
92
- $('#select_plugin_name').on('click', function(e) {
93
- if (e.target.localName == 'option') {
94
- var plugin_name = e.target.value;
95
- var plugin_key = e.target.text;
127
+ $('#select_plugin_name').on('change', function(e) {
128
+ var selectedOption = e.target.selectedOptions;
129
+
130
+ if (selectedOption.length > 0) {
131
+ var plugin_name = selectedOption[0].value;
132
+ var plugin_key = selectedOption[0].text;
96
133
  $("#plugin_name").val(plugin_name);
97
134
  $("#plugin_key").val(plugin_key);
98
- $("#plugin_type").val(e.target.dataset['pluginType']);
135
+ $("#plugin_type").val(selectedOption[0].dataset['pluginType']);
99
136
  $('#plugin_config_properties').attr('plugin_name', '');
100
-
137
+ $('#plugin_config_properties_header').hide();
101
138
  add_properties_for_plugin(plugin_key, plugin_name);
102
139
  }
103
140
  });
@@ -131,7 +168,7 @@
131
168
  var el_props = el_parts[1];
132
169
  if (el_plugin_name === entered_plugin_name) {
133
170
  if (el_props.split('=')[0] == 'raw_config') {
134
- res['raw_config'] = el_props.substr(11);
171
+ res['raw_config'] = el_props.replace("raw_config=", "");
135
172
  } else {
136
173
  $.map(el_props.split('|'), function(el) {
137
174
  var parts = el.split('=');
@@ -145,7 +182,7 @@
145
182
  return res;
146
183
  }
147
184
 
148
- function get_selected_plugin_info(plugin_index) {
185
+ function get_selected_plugin_info(plugin_key) {
149
186
  var plugin_config_str = $('#entered_plugin_name').attr('plugin_config');
150
187
  var res = {}
151
188
  /* Deserialize plugin/properties (see AdminTenant model)*/
@@ -155,14 +192,14 @@
155
192
  var el_plugin_name = el_parts_key[0];
156
193
  var el_plugin_type = el_parts_key[1];
157
194
  var el_plugin_props = el_parts[1];
158
- if (el_plugin_name == plugin_index) {
195
+ if (el_plugin_name == plugin_key) {
159
196
  res['type'] = el_plugin_type;
160
197
  res['props'] = el_plugin_props == "" ? [] : (el_plugin_type == "" ? ['raw_config'] : el_plugin_props.split(','));
161
198
  return false;
162
199
  }
163
200
  });
164
201
 
165
- if (res['props'] == undefined) {
202
+ if (isBlank(res['props'])) {
166
203
  res['type'] = '';
167
204
  res['props'] = ['raw_config'];
168
205
  }
@@ -171,7 +208,6 @@
171
208
  }
172
209
 
173
210
  function add_properties_for_plugin(plugin_key, plugin_name) {
174
- console.log(plugin_key, plugin_name);
175
211
  var plugin_info = get_selected_plugin_info(plugin_key);
176
212
 
177
213
  if (isBlank(plugin_name)) {
@@ -188,14 +224,25 @@
188
224
  /* Retrieve existing plugin properties for this tenant */
189
225
  var existing_props = get_existing_tenant_plugin_properties(plugin_key);
190
226
 
227
+ // try by plugin name for proprietary plugins
228
+ if (isBlank(existing_props)) {
229
+ existing_props = get_existing_tenant_plugin_properties(plugin_name);
230
+ }
231
+
191
232
  var type = plugin_info['type'];
192
233
  var props = plugin_info['props']
193
234
 
235
+ if (isBlank(type)) {
236
+ $(".switch-half-container").hide();
237
+ } else {
238
+ $(".switch-half-container").show();
239
+ }
240
+
194
241
  $('#plugin_type').val(type);
195
242
  /* Prune the tree to restart from scratch */
243
+ $('#plugin_config_properties_header').show();
196
244
  $('#plugin_config_properties').empty();
197
- $('#plugin_config_properties').append('<label class="col-sm-2 control-label" for="plugin_name">Plugin Properties</label>');
198
- $('#plugin_config_properties').append('<div id="plugin_config_properties_anchor" class="col-sm-offset-2 col-sm-10">');
245
+ $('#plugin_config_properties').append('<div id="plugin_config_properties_anchor" class="col-sm-12"></div>');
199
246
 
200
247
  var merged_props_with_values = existing_props;
201
248
  if (props != undefined) {
@@ -233,8 +280,13 @@
233
280
  plugin_props_with_values.push({ property_label: format_label(p), property: p, value: v, is_raw_config: p == 'raw_config'});
234
281
  });
235
282
 
283
+ render_plugin_key_values(plugin_props_with_values, plugin_props_with_values);
284
+ }
285
+
286
+ function render_plugin_key_values(plugin_props_with_values, original) {
236
287
  var template = $("#plugin_config_properties_template").html();
237
- var plugin_props_with_values_html = Mustache.render( template , { plugin_props_with_values: plugin_props_with_values});
288
+ var plugin_props_with_values_html = Mustache.render( template ,{ plugin_props_with_values: plugin_props_with_values,
289
+ data_json: JSON.stringify(original)});
238
290
  $("#plugin_config_properties_anchor").html(plugin_props_with_values_html);
239
291
  }
240
292
 
@@ -256,6 +308,7 @@
256
308
  }
257
309
 
258
310
  function suggested_response(response) {
311
+ $(".spinner").hide();
259
312
  if (!isBlank(response.suggestion)) {
260
313
  $(".plugin-suggestion").html(response.suggestion);
261
314
 
@@ -266,6 +319,7 @@
266
319
  $("#entered_plugin_name").val(plugin_name);
267
320
  $("#plugin_key").val(plugin_key);
268
321
  $("#plugin_type").val(e.currentTarget.dataset['pluginType']);
322
+ $("#entered_plugin_name").data("last", plugin_name);
269
323
 
270
324
  $(".plugin-suggestion").html('');
271
325
  add_properties_for_plugin(isBlank(plugin_key) ? plugin_name : plugin_key, plugin_name);
@@ -284,12 +338,23 @@
284
338
 
285
339
  function suggest_plugin_name() {
286
340
  var plugin_name = $("#entered_plugin_name").val();
341
+ var last_plugin_name = $("#entered_plugin_name").data("last");
287
342
  $("#plugin_key").val(plugin_name);
288
343
 
289
344
  if (isBlank(plugin_name)) {
290
345
  return;
291
346
  }
292
347
 
348
+ // no change
349
+ if ( plugin_name == last_plugin_name) {
350
+ return;
351
+ }
352
+
353
+ $('#plugin_config_properties').attr('plugin_name', '');
354
+ $('#plugin_config_properties').empty();
355
+ $(".plugin-suggestion").html('');
356
+ $("#entered_plugin_name").data("last", plugin_name);
357
+ $(".spinner").show();
293
358
  $.ajax({
294
359
  url: '<%= suggest_plugin_name_path() %>',
295
360
  type: "GET",
@@ -4,11 +4,15 @@
4
4
  <h1>Existing Plans
5
5
  <% if can? :config_upload, Kaui::AdminTenant %>
6
6
  <%= link_to '<i class="fa fa-plus-square"></i>'.html_safe,
7
- kaui_engine.admin_tenant_new_catalog_path(:id => @tenant.id),
7
+ admin_tenant_new_catalog_path(:id => @tenant.id),
8
8
  :class => 'btn btn-xs' %>
9
9
  <% end %>
10
+ <%= link_to '<i class="fa fa-arrow-down" aria-hidden="true"></i>'.html_safe,
11
+ download_catalog_xml_path(:id => @tenant.id, :effective_date => @latest_version),
12
+ :class => 'btn btn-xs', :id => 'download_link' %>
10
13
  <% if can?(:delete, Kaui::AdminTenant) %>
11
- <%= link_to '<i class="fa fa-times"></i>'.html_safe, kaui_engine.admin_tenant_delete_catalog_path(:id => @tenant.id), :method => :delete %>
14
+ <%= link_to '<i class="fa fa-times"></i>'.html_safe,
15
+ admin_tenant_delete_catalog_path(:id => @tenant.id), :method => :delete, :class => 'btn btn-xs' %>
12
16
  <% end %>
13
17
  <a class='btn btn-xs' href="javascript:void(0);" onclick="switchXMLConfig();">Enable XML View</a>
14
18
  </h1>
@@ -153,7 +157,7 @@
153
157
  function fetchCatalog(effectiveDate) {
154
158
  if (effectiveDate == '')
155
159
  return;
156
-
160
+
157
161
  $.ajax(
158
162
  {
159
163
  url: Routes.kaui_engine_catalog_by_effective_date_path(),
@@ -166,6 +170,10 @@
166
170
  success: function(data) {
167
171
  renderCurrencySelect(data);
168
172
  renderCatalog(data);
173
+
174
+ //update the download path
175
+ var download_path = Routes.kaui_engine_download_catalog_xml_path(<%= @tenant.id %>, { 'effective_date': effectiveDate });
176
+ $('#download_link').attr('href',download_path);
169
177
  }
170
178
  });
171
179
  }
@@ -34,14 +34,14 @@
34
34
  <td><%= state.external_message %></td>
35
35
  <td>
36
36
  <ul>
37
- <% if state.block_changes %>
37
+ <% if state.is_block_changes %>
38
38
  <li>
39
- <%= 'Block changes:' %><%= state.block_changes %>
39
+ <%= 'Block changes:' %><%= state.is_block_changes %>
40
40
  </li>
41
41
  <% end %>
42
- <% if state.disable_entitlement %>
42
+ <% if state.is_disable_entitlement %>
43
43
  <li>
44
- <%= 'Cancel subscriptions:' %><%= state.disable_entitlement %>
44
+ <%= 'Cancel subscriptions:' %><%= state.is_disable_entitlement %>
45
45
  (policy:<%= state.subscription_cancellation_policy %>)
46
46
  </li>
47
47
  <% end %>