change read NFC UI
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<strong>Customer :</strong>
|
||||
<% if @cashier_type == 'quick_service' || @cashier_type == 'food_court' %>
|
||||
<button type="button" class="btn bg-info waves-effect" id='customer_name'><%= @sale_data.customer.name%></button>
|
||||
<button type="button" class="btn bg-info waves-effect" id='customer_name' data-toggle="modal" data-target="#read_modal"><%= @sale_data.customer.name%></button>
|
||||
<input type="hidden" name="paypar_account_no" id="paypar_account_no" value='<%=@sale_data.customer.paypar_account_no%>' />
|
||||
<% else %>
|
||||
<input type="hidden" name="paypar_account_no" id="paypar_account_no" value='<%=@sale_data.customer.paypar_account_no%>' />
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 d-flex flex-column h-100" style="padding-right: 10px;">
|
||||
<div class="card h-100" style="margin-bottom: 15px">
|
||||
<div class="card-header" style="margin-bottom: 20%;">
|
||||
<div class="card-header">
|
||||
<div class="row m-l-5 m-r-5 m-t-20" style="padding-bottom: 14px;">
|
||||
<div class="col-md-8"><strong class='amount_balance' style="font-size: 30px">Amount Due: <% if !@sale_payment.nil? %>( Credit )<% end %></strong></div>
|
||||
<div class="col-md-4 text-right">
|
||||
@@ -197,10 +197,7 @@
|
||||
<div class="card-block">
|
||||
<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">
|
||||
Pay
|
||||
</div>
|
||||
<button type="button" class="btn btn-block btn-lg btn-success waves-effect btn_paymal_member pay">[ Complete Payment ]</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -412,14 +409,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content">
|
||||
<h3>Scan OR Tap Card</h3>
|
||||
</div>
|
||||
<div style="position: absolute; bottom: 0; margin-left: 45%; margin-bottom: 60px;">
|
||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<%= render "layouts/read_modal" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
// //control borwser back
|
||||
@@ -435,7 +425,7 @@ var paymalcount = <%= @paymalcount %>;
|
||||
var customer_paypar_account = '<%= @sale_data.customer.paypar_account_no %>';
|
||||
// console.log(pdf_view)
|
||||
$(document).ready(function(){
|
||||
$("#sxModal").hide();
|
||||
$("#read_modal").modal('hide');
|
||||
/* replace url type*/
|
||||
if(!trans_flag){
|
||||
localStorage.setItem("trans_flag", trans_flag);
|
||||
@@ -718,8 +708,8 @@ $(document).ready(function(){
|
||||
// Read Card Reader
|
||||
$(".btn_member").on('click', function(){
|
||||
$("#is_memberModal").hide();
|
||||
$("#sxModal").attr('data-for', 'member');
|
||||
$("#sxModal").show();
|
||||
$("#read_modal").attr('data-for', 'member');
|
||||
$("#read_modal").show();
|
||||
getCardNo();
|
||||
|
||||
onScan.attachTo(document, {
|
||||
@@ -903,12 +893,12 @@ $(document).ready(function(){
|
||||
function setCardNo(cardNo){
|
||||
if(cardNo.length == 16){
|
||||
$("#paypar_account_no").val(cardNo);
|
||||
if ($("#sxModal").attr("data-for") == 'member') {
|
||||
if ($("#read_modal").attr("data-for") == 'member') {
|
||||
member_card(cardNo);
|
||||
} else if ($("#sxModal").attr('data-for') == 'payment') {
|
||||
} else if ($("#read_modal").attr('data-for') == 'payment') {
|
||||
pay_with_card(cardNo);
|
||||
}
|
||||
$("#sxModal").hide();
|
||||
$("#read_modal").modal('hide');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -979,8 +969,8 @@ $(document).ready(function(){
|
||||
});
|
||||
}
|
||||
|
||||
$("#sxModal .btn_cancel").on('click',function(){
|
||||
$("#sxModal").hide();
|
||||
$("#read_modal #close").on('click',function(){
|
||||
$("#read_modal").modal('hide');
|
||||
});
|
||||
|
||||
$(".btn_customer_assign").on('click', function(){
|
||||
@@ -1200,8 +1190,8 @@ $(document).ready(function(){
|
||||
$("#customer_name").on("click",function(){
|
||||
//start customer modal popup
|
||||
if((cashier_type=='quick_service' || cashier_type=='food_court') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
|
||||
$("#sxModal").attr('data-for', 'member');
|
||||
$("#sxModal").show();
|
||||
$("#read_modal").attr('data-for', 'member');
|
||||
$("#read_modal").show();
|
||||
getCardNo();
|
||||
|
||||
onScan.attachTo(document, {
|
||||
@@ -1212,14 +1202,28 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
|
||||
// $("#read_modal").on('shown.bs.modal', function(e) {
|
||||
// if((cashier_type=='quick_service' || cashier_type=='food_court') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
|
||||
// $("#read_modal").attr('data-for', 'member');
|
||||
// $("#read_modal").show();
|
||||
// getCardNo();
|
||||
|
||||
// onScan.attachTo(document, {
|
||||
// onScan: function(sCode) {
|
||||
// setCardNo(sCode)
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// Read Card Reader - Paymal payment for FoodCourt
|
||||
$(".btn_paymal_member").on('click', function (){
|
||||
$(this).off('click');
|
||||
if(customer_paypar_account !== null && customer_paypar_account !== '') {
|
||||
pay_with_card($("#paypar_account_no").val())
|
||||
}else{
|
||||
$("#sxModal").attr('data-for', 'member');
|
||||
$("#sxModal").show();
|
||||
$("#read_modal").attr('data-for', 'member');
|
||||
$("#read_modal").show();
|
||||
getCardNo();
|
||||
onScan.attachTo(document, {
|
||||
onScan: function(sCode) {
|
||||
|
||||
Reference in New Issue
Block a user