Add multiple photo upload
This commit is contained in:
@@ -193,6 +193,8 @@
|
||||
<button type="button" data-href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect second_view hidden" style="height: 45px">Customer View</button>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$(".cashier_view").on('click', function() {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
|
||||
@@ -241,7 +241,7 @@ $('#cash_out').on('click',function(){
|
||||
|
||||
$('#close_cashier').on('click',function(e){
|
||||
e.preventDefault(); // Prevent the href from redirecting directly
|
||||
var linkURL = '/origami/shift/close';
|
||||
var linkURL = '/origami/shift/cashier/close';
|
||||
warnBeforeRedirect(linkURL);
|
||||
})
|
||||
|
||||
|
||||
@@ -292,9 +292,26 @@
|
||||
<td><%= count %></td>
|
||||
<td class='item-name'>
|
||||
<%= order_item.item_name %>
|
||||
<% if !order_item.options.nil? && !order_item.options.empty? && order_item.options != "undefined" %>
|
||||
<% JSON.parse(order_item.options).each do |option| %>
|
||||
<br><span class="font-13">
|
||||
<%= option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !order_item.set_menu_items.nil?
|
||||
order_item.set_menu_items.each do |item_instance| %>
|
||||
<br><span class="font-13"><%= item_instance %></span>
|
||||
JSON.parse(order_item.set_menu_items).each do |item_instance| %>
|
||||
<br><span class="font-13">
|
||||
<%= item_instance["item_instance_name"] %>
|
||||
<% if !item_instance["options"].nil? && !item_instance["options"].empty? %>
|
||||
<% (item_instance["options"]).each do |set_item_option| %>
|
||||
<br><span class="font-13">
|
||||
<%= set_item_option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end
|
||||
end %>
|
||||
</td>
|
||||
@@ -371,9 +388,26 @@
|
||||
<td><%= count %>
|
||||
<td class='item-name'>
|
||||
<%= order_item.item_name %>
|
||||
<% if !order_item.options.nil? && !order_item.options.empty? && order_item.options != "undefined" %>
|
||||
<% JSON.parse(order_item.options).each do |option| %>
|
||||
<br><span class="font-13">
|
||||
<%= option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !order_item.set_menu_items.nil?
|
||||
order_item.set_menu_items.each do |item_instance| %>
|
||||
<br><span class="font-13"><%= item_instance %></span>
|
||||
JSON.parse(order_item.set_menu_items).each do |item_instance| %>
|
||||
<br><span class="font-13">
|
||||
<%= item_instance["item_instance_name"] %>
|
||||
<% if !item_instance["options"].nil? && item_instance["options"] != "undefined" %>
|
||||
<% (item_instance["options"]).each do |set_item_option| %>
|
||||
<br><span class="font-13">
|
||||
<%= set_item_option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end
|
||||
end %>
|
||||
</td>
|
||||
|
||||
22
app/views/origami/pending_order/index.html.erb
Normal file → Executable file
22
app/views/origami/pending_order/index.html.erb
Normal file → Executable file
@@ -34,7 +34,9 @@
|
||||
<i class="material-icons">reply</i>
|
||||
<%= t("views.btn.back") %>
|
||||
</button>
|
||||
|
||||
<% if current_user.role != "waiter" %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,4 +53,22 @@
|
||||
$('#back').on('click', function () {
|
||||
window.location.href = '/origami/quick_service';
|
||||
})
|
||||
|
||||
$('#close_cashier').on('click',function(e){
|
||||
e.preventDefault(); // Prevent the href from redirecting directly
|
||||
var linkURL = '/origami/shift/quick_service/close';
|
||||
warnBeforeRedirect(linkURL);
|
||||
});
|
||||
|
||||
function warnBeforeRedirect(linkURL) {
|
||||
swal({
|
||||
title: "Alert!",
|
||||
text: "Are you sure you want to close cashier?",
|
||||
type: "warning",
|
||||
showCancelButton: true
|
||||
}, function() {
|
||||
// Redirect the user
|
||||
window.location.href = linkURL;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
25
app/views/origami/pending_order/show.html.erb
Normal file → Executable file
25
app/views/origami/pending_order/show.html.erb
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong id="order-title"> PENDING ORDER </strong>
|
||||
@@ -148,7 +148,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
<% if current_user.role != "waiter" || @status != "sale"%>
|
||||
<button type="button" id="addorder" class="btn bg-blue btn-block">Add Order</button>
|
||||
@@ -167,6 +167,9 @@
|
||||
<% if @status != "sale"%>
|
||||
<button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect">Req.Bill</button>
|
||||
<%end%>
|
||||
<% if current_user.role != "waiter" %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -269,5 +272,23 @@ $(document).ready(function(){
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#close_cashier').on('click',function(e){
|
||||
e.preventDefault(); // Prevent the href from redirecting directly
|
||||
var linkURL = '/origami/shift/quick_service/close';
|
||||
warnBeforeRedirect(linkURL);
|
||||
});
|
||||
|
||||
function warnBeforeRedirect(linkURL) {
|
||||
swal({
|
||||
title: "Alert!",
|
||||
text: "Are you sure you want to close cashier?",
|
||||
type: "warning",
|
||||
showCancelButton: true
|
||||
}, function() {
|
||||
// Redirect the user
|
||||
window.location.href = linkURL;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -277,9 +277,26 @@
|
||||
<td><%= count %></td>
|
||||
<td class='item-name'>
|
||||
<%= order_item.item_name %>
|
||||
<% if !order_item.options.nil? && !order_item.options.empty? && order_item.options != "undefined" %>
|
||||
<% JSON.parse(order_item.options).each do |option| %>
|
||||
<br><span class="font-13">
|
||||
<%= option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !order_item.set_menu_items.nil?
|
||||
order_item.set_menu_items.each do |item_instance| %>
|
||||
<br><span class="font-13"><%= item_instance %></span>
|
||||
JSON.parse(order_item.set_menu_items).each do |item_instance| %>
|
||||
<br><span class="font-13">
|
||||
<%= item_instance["item_instance_name"] %>
|
||||
<% if !item_instance["options"].nil? && item_instance["options"] != "undefined" %>
|
||||
<% (item_instance["options"]).each do |set_item_option| %>
|
||||
<br><span class="font-13">
|
||||
<%= set_item_option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end
|
||||
end %>
|
||||
</td>
|
||||
@@ -345,9 +362,26 @@
|
||||
<td><%= count %>
|
||||
<td class='item-name'>
|
||||
<%= order_item.item_name %>
|
||||
<% if !order_item.options.nil? && !order_item.options.empty? && order_item.options != "undefined" %>
|
||||
<% JSON.parse(order_item.options).each do |option| %>
|
||||
<br><span class="font-13">
|
||||
<%= option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !order_item.set_menu_items.nil?
|
||||
order_item.set_menu_items.each do |item_instance| %>
|
||||
<br><span class="font-13"><%= item_instance %></span>
|
||||
JSON.parse(order_item.set_menu_items).each do |item_instance| %>
|
||||
<br><span class="font-13">
|
||||
<%= item_instance["item_instance_name"] %>
|
||||
<% if !item_instance["options"].nil? && item_instance["options"] != "undefined" %>
|
||||
<% (item_instance["options"]).each do |set_item_option| %>
|
||||
<br><span class="font-13">
|
||||
<%= set_item_option %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end
|
||||
end %>
|
||||
</td>
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var type = '<%= @type %>';
|
||||
$('#close_cashier').on('click',function(){
|
||||
var amount = $('#closing_balance_amount').val();
|
||||
var shift_id = "<%= @shift.id rescue ""%>"
|
||||
@@ -72,7 +73,11 @@
|
||||
});
|
||||
|
||||
$('#back').on('click',function(){
|
||||
window.location.href = '/origami';
|
||||
if(type!='quick_service'){
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service';
|
||||
}
|
||||
});
|
||||
|
||||
/** start CB Card Settle process **/
|
||||
@@ -90,7 +95,7 @@
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/shift/close';
|
||||
window.location.href = '/origami/shift/'+type+'/close';
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -115,7 +120,7 @@
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/shift/close';
|
||||
window.location.href = '/origami/shift/'+type+'/close';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user