Merge branch 'ui_ux_changes' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-06-08 11:37:00 +06:30
6 changed files with 18 additions and 9 deletions

View File

@@ -418,7 +418,7 @@ class Origami::PaymentsController < BaseOrigamiController
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
end
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
unique_code = "ReceiptBillPdf"
customer= Customer.find(saleObj.customer_id)
@@ -462,7 +462,7 @@ class Origami::PaymentsController < BaseOrigamiController
# Mobile Print
render :json => result.to_json
end
# end
end
def foc

View File

@@ -495,7 +495,7 @@
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
<% else %>
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' <%= (can? :edit, :sale_edit)? ' ': 'disabled=' %> active="true">Edit</button>
<button type="button" class="btn btn-block bg-blue waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
<button type="button" class="btn btn-block bg-red waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
<% end %>
<% end %>
<% if current_login_employee.role != "waiter" %>
@@ -790,7 +790,6 @@
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
alert("Hello");
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();

View File

@@ -256,8 +256,18 @@ $(document).ready(function(){
})
$('#reprint').on('click', function () {
var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint"
var ajax_url = '/origami/'+ sale_id + "/reprint"
$.ajax({
type: "GET",
url: ajax_url,
success: function (result) {
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();
}
});
});
$('#back').on('click', function () {
window.location.href = '/origami/quick_service/pending_order';

View File

@@ -460,7 +460,7 @@
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
<% else %>
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' <%= (can? :edit, :sale_edit)? ' ': 'disabled=' %> active="true">Edit</button>
<button type="button" class="btn btn-block bg-blue waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
<button type="button" class="btn btn-block bg-red waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
<% end %>
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" data-toggle="modal" data-target="#waste_spoileModal" > Waste & Spoile</button> -->
<% end %>

View File

@@ -424,7 +424,7 @@ $(document).on('click', '.access_modal', function(event){
$('#re-print').click(function() {
var sale_id = $('#sale_id').val();
var ajax_url = '/origami/'+ sale_id + "/reprint"
var ajax_url = "/origami/"+ sale_id + "/reprint"
// return false;
$.ajax({
type: "GET",

View File

@@ -43,7 +43,7 @@
<th><%= t("views.right_panel.detail.receipt_generated_at") %></th>
<% if @sale["sale_status"] == "completed" %>
<th>
<button type="button" class="btn btn-block bg-blue waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
<button type="button" class="btn btn-block bg-red waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
</th>
<% end %>
</tr>