Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into crm
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<li><%= link_to "Menu Item Options",settings_menu_item_options_path, :tabindex =>"-1" %></li>
|
||||
<hr>
|
||||
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Zones", settings_zones_path, :tabindex =>"-1" %></li>
|
||||
<hr>
|
||||
<li><%= link_to "Cashier Terminals ", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
</span>
|
||||
</small>
|
||||
</p>
|
||||
<p class="hidden order-status">completed</p>
|
||||
<p class="hidden order-customer"><%= qid.customer_name %></p>
|
||||
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
|
||||
</div>
|
||||
@@ -133,7 +134,7 @@
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<div class="card" >
|
||||
<div class="card-header">
|
||||
<div><strong id="order-title">ORDER DETAILS -</strong></div>
|
||||
<div><strong id="order-title">ORDER DETAILS - Table</strong></div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-title">
|
||||
@@ -159,7 +160,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-text" style="min-height:400px; max-height:400px; overflow:auto">
|
||||
<table class="table">
|
||||
<table class="table" id="oqs-order-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:80%; text-align:left">Items</th>
|
||||
@@ -167,17 +168,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td id="order-items" style="width:80%; text-align:left">
|
||||
<!-- Menu Items Name <br/>
|
||||
Less Sweet, No MSG -->
|
||||
</td>
|
||||
<td id="order-qty" style="width:20%; text-align:right">
|
||||
<!-- 5 -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Bind With JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -82,10 +82,10 @@
|
||||
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="tab-pane active" id="tables" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<%
|
||||
@booking_orders.each do |bko|
|
||||
# No Show completed
|
||||
# No Show completed
|
||||
if bko.sale_status == 'completed'
|
||||
next
|
||||
end
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<%
|
||||
@booking_rooms.each do |rmo|
|
||||
# No Show completed
|
||||
# No Show completed
|
||||
if rmo.sale_status == 'completed'
|
||||
next
|
||||
end
|
||||
@@ -207,8 +207,8 @@
|
||||
<div class="tab-pane" id="orders" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<%
|
||||
@orders.each do |odr|
|
||||
# No Show completed
|
||||
@orders.each do |odr|
|
||||
# No Show completed
|
||||
if odr.sale_status == 'completed'
|
||||
next
|
||||
end
|
||||
@@ -289,7 +289,7 @@
|
||||
<p>Customer : <span id="customer_name"></span></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<table class="table table-striped" id="order-items-table">
|
||||
@@ -300,14 +300,14 @@
|
||||
<th class="item-attr">Price</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
<%
|
||||
# For Sale Items
|
||||
sub_total = 0
|
||||
if @selected_item_type == "Sale"
|
||||
@selected_item.sale_items.each do |sale_item|
|
||||
sub_total += (sale_item.qty*sale_item.unit_price)
|
||||
%>
|
||||
%>
|
||||
<tr>
|
||||
<td class='item-name'><%= sale_item.product_name %></td>
|
||||
<td class='item-attr'><%= sale_item.qty %></td>
|
||||
@@ -319,7 +319,7 @@
|
||||
%>
|
||||
|
||||
<%
|
||||
# For Order Items
|
||||
# For Order Items
|
||||
if @selected_item_type == "Order"
|
||||
@selected_item.order_items.each do |order_item|
|
||||
sub_total += (order_item.qty*order_item.unit_price)
|
||||
@@ -354,17 +354,17 @@
|
||||
<td class="charges-name"><strong>Discount:</strong></td>
|
||||
<td class="item-attr"><strong id="order-discount">(<%=@selected_item.total_discount rescue 0%>)</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<!-- <tr>
|
||||
<td class="charges-name"><strong>Tax:</strong></td>
|
||||
<td class="item-attr"><strong id="order-Tax"><%=@selected_item.total_tax rescue 0%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Grand Total:</strong></td>
|
||||
<td class="item-attr"><strong id="order-grand-total"><%=@selected_item.grand_total rescue 0%></strong></td>
|
||||
</tr>
|
||||
<tr class="rebate_amount">
|
||||
|
||||
</tr>
|
||||
</tr> -->
|
||||
|
||||
<tr class="rebate_amount"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Available Redeem Amount</label>
|
||||
<label class="col-lg-4 col-md-4 col-sm-4"> Rebat Balance </label>
|
||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@membership_rebate_balance%>" data-value="<%=@sale_id %>" data-member-value="<%= @membership_id %>">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class=" cashier_number left" data-value="00" data-type="num">00</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class=" cashier_number del_cashier_number" data-type="nett" disable>Nett</div>
|
||||
<div class=" cashier_number " data-type="nett">Nett</div>
|
||||
<div class=" cashier_number red left" data-type="del">Del</div>
|
||||
<div class=" cashier_number green left" data-type="clr">Clr</div>
|
||||
</div>
|
||||
@@ -123,6 +123,9 @@ $(document).on('click', '.cashier_number', function(event){
|
||||
case 'del' :
|
||||
var cash=$('#used_amount').text();
|
||||
$('#used_amount').text(cash.substr(0,cash.length-1));
|
||||
case 'nett':
|
||||
alert($('#valid_amount').text())
|
||||
$('#used_amount').text($('#valid_amount').text());
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
<style type="text/css">
|
||||
div.form-inputs span{
|
||||
padding: 1%;
|
||||
}
|
||||
</style>
|
||||
<%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :station_name %>
|
||||
<%= f.input :is_active %>
|
||||
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font_size %>
|
||||
<%= f.input :print_copy %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'ta'%>
|
||||
<%= f.input :cut_per_item %>
|
||||
<%= f.input :use_alternate_name %>
|
||||
<%= f.input :processing_items, as: :hidden %>
|
||||
|
||||
<%= f.input :auto_print %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<tr>
|
||||
<th>Station name</th>
|
||||
<th>Is active</th>
|
||||
<th>Auto Print</th>
|
||||
<th>Print copy</th>
|
||||
<th>Printer name</th>
|
||||
<th>Cut per item</th>
|
||||
@@ -31,6 +32,7 @@
|
||||
<tr>
|
||||
<td><%= link_to settings_order_queue_station.station_name, settings_order_queue_station_path(settings_order_queue_station) %></td>
|
||||
<td><%= settings_order_queue_station.is_active %></td>
|
||||
<td><%= settings_order_queue_station.auto_print %></td>
|
||||
<td><%= settings_order_queue_station.print_copy %></td>
|
||||
<td><%= settings_order_queue_station.printer_name %></td>
|
||||
<td><%= settings_order_queue_station.cut_per_item %></td>
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
<%= @settings_order_queue_station.is_active %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Auto Print:</strong>
|
||||
<%= @settings_order_queue_station.auto_print %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Processing items:</strong>
|
||||
<%= @settings_order_queue_station.processing_items %>
|
||||
|
||||
16
app/views/settings/rooms/_form.html.erb
Normal file
16
app/views/settings/rooms/_form.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<%= simple_form_for([:settings,@zone,@settings_room]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :status %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :created_by, :collection => Employee.collection %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
2
app/views/settings/rooms/_settings_room.json.jbuilder
Normal file
2
app/views/settings/rooms/_settings_room.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! settings_table, :id, :name, :status, :seater, :order_by, :is_active, :created_by, :created_at, :updated_at
|
||||
json.url settings_table_url(settings_room, format: :json)
|
||||
10
app/views/settings/rooms/edit.html.erb
Normal file
10
app/views/settings/rooms/edit.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_rooms_path %>">Rooms</a></li>
|
||||
<li>Edit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', settings_table: @settings_room %>
|
||||
</div>
|
||||
51
app/views/settings/rooms/index.html.erb
Normal file
51
app/views/settings/rooms/index.html.erb
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li>Rooms</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_zone_room_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Type</th>
|
||||
<th>Seater</th>
|
||||
<th>Order by</th>
|
||||
<th>is Active</th>
|
||||
<th>Created By</th>
|
||||
<th>Created At</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @settings_rooms.each do |room| %>
|
||||
<tr>
|
||||
<td><%= link_to room.name, settings_menu_path(room) %></td>
|
||||
<td><%= room.status %></td>
|
||||
<td>Room</td>
|
||||
<td><%= room.seater rescue "-" %></td>
|
||||
<td><%= room.order_by rescue "-" %></td>
|
||||
<td><%= room.is_active %></td>
|
||||
<% if Employee.exists?(room.created_by) %>
|
||||
<td><%= Employee.find(room.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= room.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_room_path(@zone,room) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone_room_path(@zone,room), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
11
app/views/settings/rooms/new.html.erb
Normal file
11
app/views/settings/rooms/new.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
<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>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', settings_table: @settings_room %>
|
||||
</div>
|
||||
49
app/views/settings/rooms/show.html.erb
Normal file
49
app/views/settings/rooms/show.html.erb
Normal file
@@ -0,0 +1,49 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_rooms_path %>">Rooms</a></li>
|
||||
<li>Details</li>
|
||||
<span style="float: right">
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">Room</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Room</th>
|
||||
<th>Seater</th>
|
||||
<th>Order by</th>
|
||||
<th>is Active</th>
|
||||
<th>Created By</th>
|
||||
<th>Created At</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= link_to @room.name, settings_menu_path(@room) %></td>
|
||||
<td><%= @room.status %></td>
|
||||
<td>Room</td>
|
||||
<td><%= @room.seater rescue "-" %></td>
|
||||
<td><%= @room.order_by rescue "-" %></td>
|
||||
<td><%= @room.is_active rescue "-" %></td>
|
||||
<% if Employee.exists?(@room.created_by) %>
|
||||
<td><%= Employee.find(@room.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= @room.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= @room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_room_path(@zone,@room) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone_room_path(@zone,@room), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
16
app/views/settings/tables/_form.html.erb
Normal file
16
app/views/settings/tables/_form.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<%= simple_form_for([:settings,@zone,@settings_table]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :status %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :created_by, :collection => Employee.collection %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
2
app/views/settings/tables/_settings_table.json.jbuilder
Normal file
2
app/views/settings/tables/_settings_table.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! settings_table, :id, :name, :status, :seater, :order_by, :is_active, :created_by, :created_at, :updated_at
|
||||
json.url settings_table_url(settings_table, format: :json)
|
||||
10
app/views/settings/tables/edit.html.erb
Normal file
10
app/views/settings/tables/edit.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_tables_path %>">Tables</a></li>
|
||||
<li>Edit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', settings_table: @settings_table %>
|
||||
</div>
|
||||
49
app/views/settings/tables/index.html.erb
Normal file
49
app/views/settings/tables/index.html.erb
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li>Tables</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_zone_table_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Seater</th>
|
||||
<th>Order by</th>
|
||||
<th>is Active</th>
|
||||
<th>Created By</th>
|
||||
<th>Created At</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @settings_tables.each do |table| %>
|
||||
<tr>
|
||||
<td><%= link_to table.name, settings_menu_path(table) %></td>
|
||||
<td><%= table.status %></td>
|
||||
<td><%= table.seater rescue "-" %></td>
|
||||
<td><%= table.order_by rescue "-" %></td>
|
||||
<td><%= table.is_active %></td>
|
||||
<% if Employee.exists?(table.created_by) %>
|
||||
<td><%= Employee.find(table.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= table.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_table_path(@zone,table) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone_table_path(@zone,table), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
11
app/views/settings/tables/new.html.erb
Normal file
11
app/views/settings/tables/new.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
<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>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', settings_table: @settings_table %>
|
||||
</div>
|
||||
47
app/views/settings/tables/show.html.erb
Normal file
47
app/views/settings/tables/show.html.erb
Normal file
@@ -0,0 +1,47 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_tables_path %>">Tables</a></li>
|
||||
<li>Details</li>
|
||||
<span style="float: right">
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">Table</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Seater</th>
|
||||
<th>Order by</th>
|
||||
<th>is Active</th>
|
||||
<th>Created By</th>
|
||||
<th>Created At</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= link_to @table.name, settings_menu_path(@table) %></td>
|
||||
<td><%= @table.status %></td>
|
||||
<td><%= @table.seater rescue "-" %></td>
|
||||
<td><%= @table.order_by rescue "-" %></td>
|
||||
<td><%= @table.is_active rescue "-" %></td>
|
||||
<% if Employee.exists?(@table.created_by) %>
|
||||
<td><%= Employee.find(@table.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= @table.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= @table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_table_path(@zone,@table) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone_table_path(@zone,@table), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,10 +1,10 @@
|
||||
<%= simple_form_for(@settings_zone) do |f| %>
|
||||
<%= simple_form_for([:settings,@settings_zone]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :created_by %>
|
||||
<%= f.input :created_by, :collection => Employee.collection %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<h1>Editing Settings Zone</h1>
|
||||
|
||||
<%= render 'form', settings_zone: @settings_zone %>
|
||||
|
||||
<%= link_to 'Show', @settings_zone %> |
|
||||
<%= link_to 'Back', settings_zones_path %>
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zones_path %>">Zones</a></li>
|
||||
<li>Edit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', settings_zone: @settings_zone %>
|
||||
</div>
|
||||
|
||||
@@ -1,31 +1,41 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Settings Zones</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Is active</th>
|
||||
<th>Created by</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @settings_zones.each do |settings_zone| %>
|
||||
<tr>
|
||||
<td><%= settings_zone.name %></td>
|
||||
<td><%= settings_zone.is_active %></td>
|
||||
<td><%= settings_zone.created_by %></td>
|
||||
<td><%= link_to 'Show', settings_zone %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_path(settings_zone) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone, 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>Zones</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_zone_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Is active</th>
|
||||
<th>Created by</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<%= link_to 'New Settings Zone', new_settings_zone_path %>
|
||||
<tbody>
|
||||
<% @settings_zones.each do |settings_zone| %>
|
||||
<tr>
|
||||
<td><%= settings_zone.name %></td>
|
||||
<td><%= settings_zone.is_active %></td>
|
||||
<% if Employee.exists?(settings_zone.created_by) %>
|
||||
<td><%= Employee.find(settings_zone.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= settings_zone.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= link_to 'Show', settings_zone_path(settings_zone) %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_path(settings_zone) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone_path(settings_zone), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,97 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zones_path %>">Zones</a></li>
|
||||
<li>Details</li>
|
||||
<span style="float: right">
|
||||
<%= link_to 'Back', settings_zones_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<strong>Name:</strong>
|
||||
<%= @settings_zone.name %>
|
||||
</p>
|
||||
<br/>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">Zone</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Is active</th>
|
||||
<th>Created by</th>
|
||||
<th colspan="2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<p>
|
||||
<strong>Is active:</strong>
|
||||
<%= @settings_zone.is_active %>
|
||||
</p>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= @settings_zone.name %></td>
|
||||
<td><%= @settings_zone.is_active %></td>
|
||||
<% if Employee.exists?(@settings_zone.created_by) %>
|
||||
<td><%= Employee.find(@settings_zone.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= @settings_zone.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_path(@settings_zone) %></td>
|
||||
<td><%= link_to 'Destroy', settings_zone_path(@settings_zone), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">Dining Facilities
|
||||
<span style="float: right">
|
||||
<%= link_to "New Table",new_settings_zone_table_path(@settings_zone),:class => 'btn btn-primary btn-sm' %>
|
||||
<%= link_to "New Room",new_settings_zone_room_path(@settings_zone),:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Seater</th>
|
||||
<th>Is active</th>
|
||||
<th>Created by</th>
|
||||
<th colspan="2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<p>
|
||||
<strong>Created by:</strong>
|
||||
<%= @settings_zone.created_by %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Edit', edit_settings_zone_path(@settings_zone) %> |
|
||||
<%= link_to 'Back', settings_zones_path %>
|
||||
<tbody>
|
||||
<% @settings_tables.each do |settings_table|%>
|
||||
<tr>
|
||||
<td><%= link_to settings_table.name, settings_zone_table_path(@settings_zone,settings_table) %></td>
|
||||
<td>Table</td>
|
||||
<td><%= settings_table.seater %></td>
|
||||
<td><%= settings_table.is_active %></td>
|
||||
<% if Employee.exists?(settings_table.created_by) %>
|
||||
<td><%= Employee.find(settings_table.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= settings_table.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= settings_table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_table_path(@settings_zone, settings_table) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @settings_rooms.each do |room|%>
|
||||
<tr>
|
||||
<td><%= link_to room.name, settings_zone_room_path(@settings_zone,room) %></td>
|
||||
<td>Room</td>
|
||||
<td><%= room.seater %></td>
|
||||
<td><%= room.is_active %></td>
|
||||
<% if Employee.exists?(room.created_by) %>
|
||||
<td><%= Employee.find(room.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= room.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_zone_room_path(@settings_zone, room) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user