Merge branch 'adminbsb_material_ui'

This commit is contained in:
Aung Myo
2018-06-12 10:38:56 +06:30

View File

@@ -169,13 +169,16 @@
<!-- Column Three -->
<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>
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
<% if current_user.role != "waiter" %>
<% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %>
<% if current_user.role == "cashier" %>
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="reprints"> Void</a>
<% else %>
<button type="button" class="btn bg-red btn-block" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
<% end %>
<% end %>
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
@@ -340,9 +343,12 @@ function check_emp_access_code(access_code,type) {
// console.log(result);
if (result.status == true) {
createAccessCode(code);
$('#AccessCodeModal').modal('hide');
if(type == "void"){
$('#AccessCodeModal').modal('hide');
$('#voidModal').modal('show');
}else if(type=='reprint'){
var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint"
}
}else{
swal("Opps",result.message,"warning")