Skip to content

Commit

Permalink
Merge pull request #385 from KBbitsP/master
Browse files Browse the repository at this point in the history
User with Only Dry run permission
  • Loading branch information
pierre authored Dec 1, 2023
2 parents fc9902d + d27899a commit ebd0ee6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/views/kaui/accounts/_billing_info.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,19 @@
<% end %>
</table>

<% if can? :trigger, Kaui::Invoice %>
<% if (can? :trigger, Kaui::Invoice) || (can? :dry_run, Kaui::Invoice) %>
<div style="padding-bottom: 50px;">
<%= form_tag kaui_engine.trigger_invoice_path(params.to_h), :method => :post do %>
<div class="form-group">
<%= label_tag :target_date, 'Trigger invoice generation', :class => 'col-sm-6 control-label', :style => 'padding-left: 0;' %>
<div class="col-sm-3">
<input class="form-control" id="target_date" name="target_date" type="text" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-highlight="true">
</div>
<% if can? :dry_run, Kaui::Invoice %>
<div style="width: 14.5%; float: left; padding: 0;">
<%= label_tag :dry_run do %>
<%= check_box_tag :dry_run, '1', true %>&nbsp;<small>Dry-run</small>
<%= check_box_tag :dry_run, '1', true, :disabled => !can?(:trigger, Kaui::Invoice) %>&nbsp;<small>Dry-run</small>
<% end %>
</div>
<% end %>
<div class="col-xs-1" style="padding: 0;">
<%= button_tag '<i class="fa fa-magic"></i>'.html_safe, :class => 'btn btn-xs' %>
</div>
Expand Down

0 comments on commit ebd0ee6

Please sign in to comment.