update adminbsbs

This commit is contained in:
Aung Myo
2017-10-30 12:14:11 +06:30
parent 5bdc8e25c8
commit a687b45193
7 changed files with 76 additions and 17 deletions

View File

@@ -18,3 +18,4 @@
//= require turbolinks //= require turbolinks
//= require node-waves/waves.js //= require node-waves/waves.js
//= require BSBMaterial/admin.js //= require BSBMaterial/admin.js
//= require bootstrap-notify/bootstrap-notify.js

View File

@@ -33,3 +33,32 @@
padding:5px; padding:5px;
} }
/*----- Order Processing Items -----*/ /*----- Order Processing Items -----*/
/* ========== Select Field ========== */
/* Remove focus */
select:focus {
outline: none}
/* Hide label */
.custom-selectfield label {display: none;}
/* Use custom arrow */
.custom-selectfield select {appearance: none}
.custom-selectfield {
position: relative;
&:after {
position: absolute;
top: 1em;
right: 0.5em;
/* Styling the down arrow */
width: 0;
height: 0;
padding: 0;
content: '';
border-left: .25em solid transparent;
border-right: .25em solid transparent;
border-top: .375em solid #111;
pointer-events: none;
}
}

View File

@@ -10,7 +10,8 @@
<% Product.order("name desc").pluck(:name, :item_code).each do |p| %> <% Product.order("name desc").pluck(:name, :item_code).each do |p| %>
<% arr.push(p) %> <% arr.push(p) %>
<% end %> <% end %>
<div class="col-md-4"> <div class="col-md-4 ">
<div class="form-group">
<label class="control-label"><abbr title="required">*</abbr>Select Item</label> <label class="control-label"><abbr title="required">*</abbr>Select Item</label>
<select class="form-control item_code_place" id="item"> <select class="form-control item_code_place" id="item">
<% if !@inventory_definition.item_code.nil? %> <% if !@inventory_definition.item_code.nil? %>
@@ -21,7 +22,7 @@
<% code = menuiteminstance.menu_item.item_code %> <% code = menuiteminstance.menu_item.item_code %>
<% end %> <% end %>
<% end %> <% end %>
<option value="">Select Item</option> <option value=""></option>
<% arr.each do |a| %> <% arr.each do |a| %>
<% if a[1] == code %> <% if a[1] == code %>
<option value="<%= a[1] %>" selected><%= a[0] %></option> <option value="<%= a[1] %>" selected><%= a[0] %></option>
@@ -31,6 +32,7 @@
<% end %> <% end %>
</select> </select>
</div> </div>
</div>
<% sample = [] %> <% sample = [] %>
<% if @inventory_definition.item_code.nil? %> <% if @inventory_definition.item_code.nil? %>

View File

@@ -52,7 +52,7 @@
color = "bg-black" color = "bg-black"
end %> end %>
<p id="noti" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center" <p id="noti" class="hidden noti" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" > data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p> </p>
<% end %> <% end %>
@@ -160,7 +160,7 @@
$(document).on('turbolinks:load', function () { $(document).on('turbolinks:load', function () {
// for Notificaiotn message // for Notificaiotn message
console.log("hi");
var placementFrom = $("#noti").attr('data-placement-from'); var placementFrom = $("#noti").attr('data-placement-from');
var placementAlign = $("#noti").attr('data-placement-align'); var placementAlign = $("#noti").attr('data-placement-align');
var animateEnter = $("#noti").attr('data-animate-enter'); var animateEnter = $("#noti").attr('data-animate-enter');

View File

@@ -8,10 +8,14 @@
<div class="form-inputs"> <div class="form-inputs">
<%= f.input :name %> <%= f.input :name %>
<%= f.label :emp_id, 'Employee' %> <%= f.label :emp_id, 'Employee' %>
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %> <%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
<br/> <br/>
<%= f.label :commission_id, 'Commission' %><br/>
<%= f.select :commission_id, Commission.all.map {|l| [l.menu_item.name, l.id]}, {prompt: 'Select a Product'}, {class: 'form-control'} %> <%= f.label :commission_id, 'Commission'%>
<%= f.select :commission_id, Commission.all.map {|l| [l.menu_item.name, l.id]}, { :include_blank => 'Choose Commission Product', :selected => ''}, {class: 'form-control'} %>
<br/> <br/>
<%= f.label :joined_date %><br/> <%= f.label :joined_date %><br/>
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/> <%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
@@ -53,7 +57,9 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(document).on('turbolinks:load', function() { $(document).on('page:load', function() {
// $(document).on('turbolinks:load', function() {
$('body').bootstrapMaterialDesign(); $('body').bootstrapMaterialDesign();
}); });
</script> </script>

View File

@@ -95,18 +95,18 @@
<div class="col-md-1"><label><input class="selectDay" type="checkbox" name="Saturday" value="6" id="6"> Sat</label></div> <div class="col-md-1"><label><input class="selectDay" type="checkbox" name="Saturday" value="6" id="6"> Sat</label></div>
</div> </div>
<div class="row"> <!-- <div class="row">
<div class="col-md-5 form-group"> <div class="col-md-5 form-group">
<select name="promotion[promo_type]" class="form-control"> <select name="promotion[promo_type]" class="form-control">
<option>Quantity</option> <option>Choose Promotion Type</option>
<option>Net_off</option> <option>Net_off</option>
<option>Net_price</option> <option>Net_price</option>
<option>Percentage</option> <option>Percentage</option>
</select> </select> -->
<!-- <%= f.input :promo_type, collection: %w{Quantity Net_off Net_price Percentage},:class => 'form-control' ,:label => "Promotion Type" %> --> <%= f.input :promo_type, collection: %w{Quantity Net_off Net_price Percentage},:input_html=>{:class => 'col-md-5 form-control select'} ,:label => "Promotion Type", :include_blank => 'Choose Promotion Type', :selected => '' %>
<!-- </div>
</div> </div>
</div> -->
<div class="row"> <div class="row">
<% arr = MenuItem.active.order("name desc").pluck(:name,:item_code) %> <% arr = MenuItem.active.order("name desc").pluck(:name,:item_code) %>
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %> <% Product.order("name desc").pluck(:name,:item_code).each do |p| %>

View File

@@ -59,6 +59,27 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<% @table.dining_charges.each do |dc| %>
<div class="card">
<h4 class="card-title">Dining Charge</h4>
<div class="">
<table class="table">
<tr>
<td class="align-right">Item code :</td>
<td class="align-left"><%= dc.item_code %></td>
<td class="align-right">Unit price : </td>
<td class="align-left"><%= dc.unit_price %></td>
<td class="align-right">Charge type : </td>
<td class="align-left"><%= dc.charge_type %></td>
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> --></td>
</tr>
</table>
</div>
</div>
<% end %>
</div> </div>
</div> </div>
</div> </div>