add loading and change css file

This commit is contained in:
yarzar_code
2020-08-10 12:53:39 +06:30
parent b24e34534c
commit 80d7522071
5 changed files with 753 additions and 172 deletions

View File

@@ -191,7 +191,7 @@
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
<div class="btn_paymal_member pay border-top border- border-left purple payment-left" style="border-radius: 50%; width: 45%; height: 220px; margin: 0 auto; line-height: 210px;">
<div class="btn_paymal_member pay border-top border- border-left purple payment-left">
Pay
</div>
</div>
@@ -211,17 +211,6 @@
<% else %>
<button type="button" class="btn bg-red btn-block" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
<%end %>
<% if @other_payment <= 0 %>
<%if @sale_data.total_discount == 0 %>
<% if current_login_employee.role == "cashier" %>
<a class="btn btn-block bg-deep-purple waves-effect access_modal" data-toggle="modal" data-type="waste"> Waste</a>
<a class="btn btn-block bg-deep-purple waves-effect access_modal" data-toggle="modal" data-type="spoile"> Spoile</a>
<% else %>
<button type="button" class="btn btn-block bg-deep-purple waves-effect " data-status="waste" value="waste" id="btn_waste" onclick="waste_and_spoilage('waste')">Waste</button>
<button type="button" class="btn btn-block bg-deep-purple waves-effect " data-status="spoile" value="spoile" id="btn_spoile" onclick="waste_and_spoilage('spoile')">Spoile</button>
<% end %>
<% end %>
<% end %>
<% end %>
<% if @sale_payment.nil? %>
<hr>
@@ -288,7 +277,7 @@
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="is_memberModalLabel">Are you Member?</h1>
<h1 class="modal-title" id="is_memberModalLabel">Are you member?</h1>
</div>
<div class="modal-body">
<input type="hidden" name="qr_code" id="qr_code" />
@@ -436,9 +425,9 @@ var customer_name = "<%= @customer.name %>";
var pdf_view = '<%=@pdf_view%>';
var trans_flag = <%= @trans_flag %>;
var paymalcount = <%= @paymalcount %>;
var customer_paypar_account = '<%= @sale_data.customer.paypar_account_no %>';
// console.log(pdf_view)
$(document).ready(function(){
localStorage.removeItem('sale_id')
$("#sxModal").hide();
/* replace url type*/
if(!trans_flag){
@@ -951,7 +940,7 @@ $(document).ready(function(){
swal({
title: "Confirmation !",
text: 'Are You Sure to assign this customer' + customer + '!',
text: 'Are you sure to assign this customer' + customer + '!',
showCancelButton: true,
confirmButtonColor: "green",
confirmButtonText: "Yes!",
@@ -1044,7 +1033,7 @@ $(document).ready(function(){
var params = { 'cash':cash,'sale_id':sale_id,'sub_total':sub_total,'remark':remark,'type':cashier_type,'access_code':access_code };
swal({
title: "Alert",
text: "Are you sure want to FOC This Receipt?",
text: "Are you sure want to FOC this receipt?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
@@ -1209,7 +1198,13 @@ $(document).ready(function(){
// Read Card Reader - Paymal payment for FoodCourt
$(".btn_paymal_member").on('click', function (){
$(this).off('click');
pay_with_card($("#paypar_account_no").val())
if(customer_paypar_account !== null && customer_paypar_account !== '') {
pay_with_card($("#paypar_account_no").val())
}else{
$("#sxModal").attr('data-for', 'member');
$("#sxModal").show();
getCardNo();
}
});
// QR Code Reader
@@ -1288,7 +1283,7 @@ $(document).ready(function(){
var access_code = localStorage.getItem("access_code");
swal({
title: "Alert",
text: "Are you sure want to Void?",
text: "Are you sure want to void?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",