merge with settings

This commit is contained in:
Yan
2017-06-19 19:14:58 +06:30
18 changed files with 105 additions and 63 deletions

View File

@@ -23,6 +23,8 @@
<li><%= link_to "Payment Method", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
<li><%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %></li>
<hr>
<li><%= link_to "Accounts", settings_accounts_path, :tabindex =>"-1" %></li>
</ul>
</li>

View File

@@ -41,7 +41,7 @@
<p class="">You can rebate upto <span style="color:red;" id="food_prices"><%= @food_prices %></span></p> -->
</div>
<div class="col-lg-7 col-md-7 col-sm-7">
<div class="col-lg-6 col-md-7 col-sm-7">
<div class="row">
<div class="col-lg-6 col-md-1 col-sm-1">
@@ -84,9 +84,15 @@
<div class="pay purple" id="redeem">Pay</div>
</div>
</div>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
</div>
</div>
<div class="row">

View File

@@ -4,11 +4,14 @@
<div class="form-inputs">
<%= f.input :title %>
<%= f.input :account_type, :collection => Lookup.collection_of("account_type") %>
<%= f.input :discount %>
<%= f.input :point %>
<%= f.input :bonus %>
<%= f.input :rebate %>
</div>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>
<% end %>

View File

@@ -14,9 +14,14 @@
<table class="table table-striped">
<thead>
<tr>
<th style="width:40%">Title</th>
<th style="width:40%">Account Type</th>
<th style="width:20%">Action</th>
<th>Title</th>
<th>Account Type</th>
<th>Can get Discount</th>
<th>Can get Points</th>
<th>Can get Bonus</th>
<th>Can rebate</th>
<th style="">Action</th>
</tr>
</thead>
@@ -25,10 +30,14 @@
<tr>
<td><%= account.title %></td>
<td><%= account.account_type %></td>
<td><%= account.discount %></td>
<td><%= account.point %></td>
<td><%= account.bonus %></td>
<td><%= account.rebate %></td>
<td>
<%= link_to 'Edit', edit_settings_account_path(account) %> |
<%= link_to 'Edit', edit_settings_account_path(account) %> |
<%= link_to 'Destroy', settings_account_path(account), method: :delete, data: { confirm: 'Are you sure?' } %>
</td>
</tr>
<% end %>

View File

@@ -17,6 +17,10 @@
<tr>
<th>Title</th>
<th>Account type</th>
<th>Can get Discount</th>
<th>Can get Points</th>
<th>Can get Bonus</th>
<th>Can rebate</th>
<th>Action</th>
</tr>
</thead>
@@ -25,10 +29,14 @@
<tr>
<td><%= @settings_account.title %></td>
<td><%= @settings_account.account_type %></td>
<td><%= @settings_account.discount %></td>
<td><%= @settings_account.point %></td>
<td><%= @settings_account.bonus %></td>
<td><%= @settings_account.rebate %></td>
<td><%= link_to 'Edit', edit_settings_account_path(@settings_account, @settings_account) %></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -9,7 +9,6 @@
<%= f.input :auth_token %>
<%= f.input :merchant_account_id %>
<%= f.input :created_by %>
<%= f.input :additional_parameter %>
</div>
<div class="form-actions">

View File

@@ -1,41 +1,47 @@
<p id="notice"><%= notice %></p>
<h1>Settings Membership Actions</h1>
<table>
<thead>
<tr>
<th>Membership type</th>
<th>Is active</th>
<th>Gateway communication type</th>
<th>Gateway url</th>
<th>Auth token</th>
<th>Merchant account</th>
<th>Created by</th>
<th>Additional parameter</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @settings_membership_actions.each do |settings_membership_action| %>
<tr>
<td><%= settings_membership_action.membership_type %></td>
<td><%= settings_membership_action.is_active %></td>
<td><%= settings_membership_action.gateway_communication_type %></td>
<td><%= settings_membership_action.gateway_url %></td>
<td><%= settings_membership_action.auth_token %></td>
<td><%= settings_membership_action.merchant_account_id %></td>
<td><%= settings_membership_action.created_by %></td>
<td><%= settings_membership_action.additional_parameter %></td>
<td><%= link_to 'Show', settings_membership_action_path(settings_membership_action) %></td>
<td><%= link_to 'Edit', edit_settings_membership_action_path(settings_membership_action) %></td>
<td><%= link_to 'Destroy', settings_membership_action_path(settings_membership_action), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li>Settings Membership Actions</li>
<span style="float: right">
<%= link_to 'New Settings Membership Action', new_settings_membership_action_path,:class => 'btn btn-primary btn-sm' %>
</span>
</ul>
</div>
<br>
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th>Membership type</th>
<th>Is active</th>
<th>Gateway communication type</th>
<th>Gateway url</th>
<th>Auth token</th>
<th>Merchant account</th>
<th>Created by</th>
<th>Additional parameter</th>
<th colspan="3"></th>
</tr>
</thead>
<%= link_to 'New Settings Membership Action', new_settings_membership_action_path %>
<tbody>
<% @settings_membership_actions.each do |settings_membership_action| %>
<tr>
<td><%= settings_membership_action.membership_type %></td>
<td><%= settings_membership_action.is_active %></td>
<td><%= settings_membership_action.gateway_communication_type %></td>
<td><%= settings_membership_action.gateway_url %></td>
<td><%= settings_membership_action.auth_token %></td>
<td><%= settings_membership_action.merchant_account_id %></td>
<td><%= settings_membership_action.created_by %></td>
<td><%= settings_membership_action.additional_parameter %></td>
<td><%= link_to 'Show', settings_membership_action_path(settings_membership_action) %></td>
<td><%= link_to 'Edit', edit_settings_membership_action_path(settings_membership_action) %></td>
<td><%= link_to 'Destroy', settings_membership_action_path(settings_membership_action), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
</div>

View File

@@ -13,6 +13,7 @@ div.form-inputs span{
<%= f.input :printer_name %>
<%= f.input :font_size %>
<%= f.input :print_copy %>
<%= f.hidden_field :processing_items %>
<%= f.label "Select Zones", :class => 'control-label' %>
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'ta'%>
<%= f.input :cut_per_item %>

View File

@@ -7,7 +7,6 @@
<%= f.input :seater %>
<%= f.input :order_by %>
<%= f.input :is_active %>
<%= f.input :created_by, :collection => Employee.collection %>
</div>
<div class="form-actions">

View File

@@ -7,7 +7,6 @@
<%= f.input :seater %>
<%= f.input :order_by %>
<%= f.input :is_active %>
<%= f.input :created_by, :collection => Employee.collection %>
</div>
<div class="form-actions">

View File

@@ -4,7 +4,7 @@
<div class="form-inputs">
<%= f.input :name %>
<%= f.input :is_active %>
<%= f.input :created_by, :collection => Employee.collection %>
<!-- <%= f.input :created_by, :collection => Employee.collection %> -->
</div>
<div class="form-actions">