update promtion and dining charges
This commit is contained in:
@@ -4,15 +4,52 @@
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :item_code, :input_html => { :id => 'item_code' } %>
|
||||
<%= f.input :unit_price, :input_html => { :id => 'unit_price'} %>
|
||||
<%= f.input :taxable %>
|
||||
<%= f.input :charge_type, :collection => [:hr, :day] %>
|
||||
<%= f.input :minimum_free_time %>
|
||||
<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>
|
||||
<%= f.input :time_rounding, :collection => [:down, :up] %>
|
||||
<%= f.input :time_rounding_block, :input_html => { :id => 'time_rounding_block'} %>
|
||||
<%= f.input :time_rounding_block_price, :input_html => { :id => 'time_rounding_block_price'} %>
|
||||
<%= f.input :item_code, :input_html => { :id => 'item_code',:class=>"col-md-9" } %>
|
||||
<%= f.input :unit_price, :input_html => { :id => 'unit_price',:class=>"col-md-9"} %>
|
||||
<%= f.input :taxable, :input_html => {:class=>"col-md-9"} %>
|
||||
<%= f.input :charge_type, :collection => [:hr, :day], :input_html => {:class=>"col-md-8"} %>
|
||||
<!--<%= f.input :minimum_free_time ,:input_html => { :class => 'timepicker'} %> -->
|
||||
<label class="control-label">* Minimum Free Time</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@dining_charge.minimum_free_time.nil?%>
|
||||
<input type="text" name="minimum_free_time" value="<%= @dining_charge.minimum_free_time.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="minimum_free_time" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
<!--<%= f.input :charge_block, :input_html => { :id => 'charge_block'} %>-->
|
||||
<div class="form-group">
|
||||
<label class="control-label required"> Change Block</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@dining_charge.charge_block.nil?%>
|
||||
<input type="text" name="charge_block" value="<%= @dining_charge.charge_block.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="charge_block" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= f.input :time_rounding, :collection => [:down, :up], :input_html => { :class=>"col-md-8"} %>
|
||||
<!-- <%= f.input :time_rounding_block, :input_html => { :id => 'time_rounding_block'} %>-->
|
||||
<div class="form-group">
|
||||
<label class="control-label required"> Time Rounding Block</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@dining_charge.time_rounding_block.nil?%>
|
||||
<input type="text" name="time_rounding_block" value="<%= @dining_charge.time_rounding_block.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="time_rounding_block" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= f.input :time_rounding_block_price, :input_html => { :id => 'time_rounding_block_price',:class=>"col-md-8"} %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -1,21 +1,4 @@
|
||||
<!-- <h1>New Dining Charge</h1>
|
||||
|
||||
<%= render 'form', dining_charge: @dining_charge %> -->
|
||||
<!-- <div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_path(@zone) %>">Zone</a></li>
|
||||
<% if @table %>
|
||||
<li><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||
<% elsif @room %>
|
||||
<li><a href="<%= edit_settings_zone_room_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||
<% end %>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', dining_charge: @dining_charge %>
|
||||
</div> -->
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<% else %>
|
||||
<td><%= link_to 'Show', settings_menu_category_set_menu_item_path(@settings_menu_category, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||
<%= link_to t("views.btn.edit"), edit_settings_menu_category_set_menu_item_path(@settings_menu_category, settings_menu_item),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
<!-- <%= link_to t("views.btn.delete"), settings_menu_category_set_menu_item_path(@settings_menu_category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %> -->
|
||||
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-inputs p-l-15">
|
||||
<div class="div-border">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>*Promo Code</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
@@ -18,58 +18,58 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>* Start Date</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_start_date.nil?%>
|
||||
<input type="text" name="promotion[promo_start_date]" value="<%= @promotion.promo_start_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control" placeholder="Start Date...">
|
||||
<input type="text" name="promotion[promo_start_date]" value="<%= @promotion.promo_start_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_start_date]" class="datepicker form-control" placeholder="Start Date...">
|
||||
<input type="text" name="promotion[promo_start_date]" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>* End Date</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_end_date.nil?%>
|
||||
<input type="text" name="promotion[promo_end_date]" value="<%= @promotion.promo_end_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control" placeholder="Start Date...">
|
||||
<input type="text" name="promotion[promo_end_date]" value="<%= @promotion.promo_end_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_end_date]" class="datepicker form-control" placeholder="End Date...">
|
||||
<input type="text" name="promotion[promo_end_date]" class="datepicker form-control col-md-8" placeholder="End Date...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">* Start Hour</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_start_hour.nil?%>
|
||||
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control" placeholder="Start Time...">
|
||||
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control" placeholder="Start Time...">
|
||||
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">* End Hour</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_end_hour.nil?%>
|
||||
<input type="text" name="promotion[promo_end_hour]" value="<%= @promotion.promo_end_hour.utc.strftime('%H:%M') %>" class="timepicker form-control" placeholder="End Time...">
|
||||
<input type="text" name="promotion[promo_end_hour]" value="<%= @promotion.promo_end_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="End Time...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_end_hour]" class="timepicker form-control" placeholder="End Time...">
|
||||
<input type="text" name="promotion[promo_end_hour]" class="timepicker form-control col-md-8" placeholder="End Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- <% if !@promotion.promo_end_hour.nil?%>
|
||||
@@ -81,8 +81,10 @@
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row checkboxes">
|
||||
<div class="col-md-2"><label class="control-label"><abbr title="required">*</abbr> Promotion Day</label></div>
|
||||
<div class="row checkboxes ">
|
||||
<div class="col-md-2">
|
||||
<label class="control-label font-14"><abbr title="required">*</abbr> Promotion Day</label>
|
||||
</div>
|
||||
<%= f.hidden_field :promo_day, :class => "form-control" %>
|
||||
<div class="col-md-1"><label><input class="selectDay" type="checkbox" name="Sunday" value="0" id="0"> Sun</label></div>
|
||||
<div class="col-md-1"><label><input class="selectDay" type="checkbox" name="Monday" value="1" id="1">Mon</label></div>
|
||||
@@ -92,10 +94,9 @@
|
||||
<div class="col-md-1"><label><input class="selectDay" type="checkbox" name="Friday" value="5" id="5"> Fri</label></div>
|
||||
<div class="col-md-1"><label><input class="selectDay" type="checkbox" name="Saturday" value="6" id="6"> Sat</label></div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-5 form-group">
|
||||
<select name="promotion[promo_type]" class="form-control">
|
||||
<option>Quantity</option>
|
||||
<option>Net_off</option>
|
||||
@@ -111,7 +112,7 @@
|
||||
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3 form-group">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Item</label>
|
||||
<select class="form-control item_code_place">
|
||||
<% if !@promotion.original_product.nil? %>
|
||||
@@ -142,12 +143,12 @@
|
||||
<% sample = Product.where("item_code=?",@promotion.original_product).pluck(:name,:item_code)%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="col-md-3"><%= f.input :original_product,collection: sample %></div>
|
||||
<div class="col-md-3 form-group"><%= f.input :original_product,collection: sample %></div>
|
||||
<!-- <div class="col-md-6"><%= f.input :original_product,collection: MenuItemInstance.order("item_instance_name desc").pluck(:item_instance_name,:item_instance_code),input_html: { selected: 2 } %></div> -->
|
||||
<div class="col-md-6"><%= f.input :min_qty %></div>
|
||||
<div class="col-md-6 form-group"><%= f.input :min_qty %></div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="" style="border: 1px solid #cccccc;padding:1%">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="text-align:center">Item Code</div>
|
||||
<div class="col-md-2" style="text-align:center">Min Qty</div>
|
||||
@@ -237,18 +238,18 @@ $(document).ready(function(){
|
||||
// $('#promotion_promo_end_hour').val($('#promotion_promo_end_hour').val().split(":")[0]+":00");
|
||||
// });
|
||||
|
||||
$('.datepicker').bootstrapMaterialDatePicker({
|
||||
format: 'dddd DD MM YYYY',
|
||||
clearButton: true,
|
||||
weekStart: 1,
|
||||
time: false
|
||||
});
|
||||
// $('.datepicker').bootstrapMaterialDatePicker({
|
||||
// format: 'dddd DD MM YYYY',
|
||||
// clearButton: true,
|
||||
// weekStart: 1,
|
||||
// time: false
|
||||
// });
|
||||
|
||||
$('.timepicker').bootstrapMaterialDatePicker({
|
||||
format: 'HH:mm',
|
||||
clearButton: true,
|
||||
date: false
|
||||
});
|
||||
// $('.timepicker').bootstrapMaterialDatePicker({
|
||||
// format: 'HH:mm',
|
||||
// clearButton: true,
|
||||
// date: false
|
||||
// });
|
||||
|
||||
// var dayy = $("#promotion_promo_day").val().replace("[","").replace("]","");
|
||||
// jQuery.each( dayy.split(","), function( i, d ) {
|
||||
@@ -283,8 +284,8 @@ $(".selectDay").click(function() {
|
||||
document.getElementById("promotion_promo_day").value = day;
|
||||
});
|
||||
|
||||
$("#promotion_original_product").select2();
|
||||
$(".item_code_place").select2();
|
||||
// $("#promotion_original_product").select2();
|
||||
// $(".item_code_place").select2();
|
||||
|
||||
$(".item_code_place").on('change', function(event) {
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
@@ -300,19 +301,19 @@ $(".selectDay").click(function() {
|
||||
itemlist += "<option value ="+result[i][1]+">"+result[i][0]+"</option>"
|
||||
}
|
||||
$("#promotion_original_product").append(itemlist);
|
||||
$("#promotion_original_product").select2();
|
||||
//$("#promotion_original_product").select2();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".promotion_promotion_products_item_code select").select2();
|
||||
$(".item_code_place1").select2();
|
||||
//$(".promotion_promotion_products_item_code select").select2();
|
||||
//$(".item_code_place1").select2();
|
||||
|
||||
callforpromoproduct();
|
||||
|
||||
$(".addProduct").on('click', function(event) {
|
||||
setTimeout(function(){
|
||||
$(".promotion_promotion_products_item_code select").select2();
|
||||
// $(".promotion_promotion_products_item_code select").select2();
|
||||
callforpromoproduct();
|
||||
}, 0);
|
||||
});
|
||||
@@ -332,7 +333,7 @@ $(".selectDay").click(function() {
|
||||
$("select#"+select_id).empty();
|
||||
$("select#"+select_id).append("<option value='"+item_code+"'>"+result[0]+"</option>");
|
||||
$("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").find("option[value='"+result[1]+"']").attr("selected","true")
|
||||
$("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").select2();
|
||||
// $("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").select2();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -340,7 +341,7 @@ $(".selectDay").click(function() {
|
||||
|
||||
// promotion_promotion_products_attributes_0_item_code
|
||||
function callforpromoproduct(){
|
||||
$(".item_code_place1").select2();
|
||||
//$(".item_code_place1").select2();
|
||||
$(".item_code_place1").on('change', function(event) {
|
||||
id = $(this).parent().next().find("select").attr("id");
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
@@ -356,7 +357,7 @@ $(".selectDay").click(function() {
|
||||
itemlist += "<option value ="+result[i][1]+">"+result[i][0]+"</option>"
|
||||
}
|
||||
$("select#"+id).append(itemlist);
|
||||
$("select#"+id).select2();
|
||||
//$("select#"+id).select2();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,24 +13,44 @@
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_room.dining_charges.length == 0 %>
|
||||
<% if @settings_room.id != nil %>
|
||||
<div class="div-border">
|
||||
<div class="col-md-10">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_room_dining_charge_path(@zone,@settings_room),:class => 'btn btn-primary' %>
|
||||
<div class="">
|
||||
<div class="">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_room_dining_charge_path(@zone,@settings_room),:class => 'btn bg-deep-purple' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @settings_room.dining_charges.each do |dc| %>
|
||||
<div class="div-border">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div>
|
||||
<div class="col-md-10">item code : <%= dc.item_code %></div>
|
||||
<div class="col-md-10">Unit price : <%= dc.unit_price %></div>
|
||||
<div class="col-md-10">Charge type : <%= dc.charge_type %></div>
|
||||
<div class="col-md-10">
|
||||
<%= link_to 'Edit Charges', edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc),:class => 'btn btn-primary' %>
|
||||
|
||||
<div class="card">
|
||||
<div class="col-md-7">
|
||||
<table class="table">
|
||||
<tr><td colspan="2">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Item code :</td>
|
||||
<td><%= dc.item_code %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unit price : </td>
|
||||
<td><%= dc.unit_price %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charge type : </td>
|
||||
<td><%= dc.charge_type %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to 'Edit Charges', edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc) %>">Edit Charge</button> -->
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="p-l-20">
|
||||
<%= f.input :item_code,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :alt_name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :type,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :min_qty,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
<div class="col-md- panel">
|
||||
<div class="form-group p-l-15">
|
||||
<div class="col-md-">
|
||||
<%= f.input :item_code %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :type %>
|
||||
<%= f.input :min_qty %>
|
||||
<%= f.input :account_id, :label => "Account type", :collection => Account.collection %>
|
||||
</div>
|
||||
<div class="col-md-">
|
||||
<%= f.input :is_available, :class => "form-control" %>
|
||||
<%= f.input :is_available,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
<%= f.input :is_sub_item, :class => "form-control" %>
|
||||
<%= f.input :is_sub_item,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
<%= f.input :unit, :collection => Lookup.collection_of("unit") ,:class => "form-control" %>
|
||||
<%= f.input :unit, :collection => Lookup.collection_of("unit") ,:input_html => {:class => "col-md-9"} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.input :item_attributes, :collection => @item_attributes, :input_html => { :multiple => true }, :class => "form-control item_attributes" %>
|
||||
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true }, :class => "form-control item_options" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-md-">
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
<%= f.input :item_attributes, :collection => @item_attributes, :input_html => { :multiple => true,:class => "form-control item_attributes col-md-9" } %>
|
||||
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true,:class => "form-control item_options col-md-9" } %>
|
||||
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %>
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
|
||||
@@ -105,11 +105,11 @@
|
||||
<% if settings_menu_item.type == "SimpleMenuItem" %>
|
||||
<td><%= link_to 'Show', settings_menu_category_simple_menu_item_path(@category, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||
<%= link_to t("views.btn.edit"), edit_settings_menu_category_simple_menu_item_path(@category, settings_menu_item),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
<%= link_to t("views.btn.delete"), settings_menu_category_simple_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' } ,:class => 'btn btn-danger btn-sm waves-effect'%></td>
|
||||
<!-- <%= link_to t("views.btn.delete"), settings_menu_category_simple_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' } ,:class => 'btn btn-danger btn-sm waves-effect'%>--></td>
|
||||
<% else %>
|
||||
<td><%= link_to 'Show', settings_menu_category_set_menu_item_path(@category, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||
<%= link_to t("views.btn.edit"), edit_settings_menu_category_set_menu_item_path(@category, settings_menu_item),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
<%= link_to t("views.btn.delete"), settings_menu_category_set_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %></td>
|
||||
<!-- <%= link_to t("views.btn.delete"), settings_menu_category_set_menu_item_path(@category, settings_menu_item ), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %>--></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -1,68 +1,58 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="row">
|
||||
<div class="col-md-6 panel">
|
||||
<div class="form- p-l-20">
|
||||
<%= f.input :item_code,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :alt_name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :type,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :min_qty,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
<%= f.input :is_available,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
<div class="col-md- panel">
|
||||
<div class="form-group">
|
||||
<div class="col-md-">
|
||||
<%= f.input :item_code %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :type %>
|
||||
<%= f.input :min_qty %>
|
||||
<%= f.input :account_id, :label => "Account type", :collection => Account.collection %>
|
||||
</div>
|
||||
<div class="col-md-">
|
||||
<%= f.input :is_available, :class => "form-control" %>
|
||||
<%= f.input :is_sub_item,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
<%= f.input :is_sub_item, :class => "form-control" %>
|
||||
<%= f.input :unit, :collection => Lookup.collection_of("unit") ,:input_html => {:class => "col-md-9"} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.input :unit, :collection => Lookup.collection_of("unit") ,:class => "form-control" %>
|
||||
<div class="col-md-6">
|
||||
<%= f.input :item_attributes, :collection => @item_attributes, :input_html => { :multiple => true,:class => "col-md-9 item_attributes" } %>
|
||||
|
||||
<%= f.input :item_attributes, :collection => @item_attributes, :input_html => { :multiple => true }, :class => "form-control item_attributes" %>
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true,:class => "col-md-9" } %>
|
||||
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true }, :class => "form-control item_options" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url,:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png",:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path,:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true,:class => "form-control item_sets col-md-9" } %>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-">
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,29 +11,43 @@
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_table.dining_charges.length == 0 %>
|
||||
<% if @settings_table.id != nil %>
|
||||
<div class="div-border">
|
||||
<div class="col-md-10">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_table_dining_charge_path(@zone,@settings_table),:class => 'btn btn-primary' %>
|
||||
<div class="col-md-">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_table_dining_charge_path(@zone,@settings_table),:class => 'btn bg-deep-purple' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @settings_table.dining_charges.each do |dc| %>
|
||||
<div class="div-border">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div>
|
||||
<div class="col-md-10">item code : <%= dc.item_code %></div>
|
||||
<div class="col-md-10">Unit price : <%= dc.unit_price %></div>
|
||||
<div class="col-md-10">Charge type : <%= dc.charge_type %></div>
|
||||
<div class="col-md-10">
|
||||
<%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn btn-primary' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="">
|
||||
<table class="table">
|
||||
<tr><td colspan="2">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Item code :</td>
|
||||
<td><%= dc.item_code %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unit price : </td>
|
||||
<td><%= dc.unit_price %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charge type : </td>
|
||||
<td><%= dc.charge_type %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<label></label>
|
||||
<br><input type="submit" value="Search" class='btn btn-primary btn-md'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user