Add Key Pad in login_dashboard.html.erb
This commit is contained in:
@@ -65,8 +65,46 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row bg-white">
|
<div class="row bg-white">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
||||||
|
<div class="row justify-content-center form-group">
|
||||||
|
<input type="text" class="form-control col-4" id="emp_id" placeholder="Employee ID">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<div class="card padding-10">
|
||||||
|
<div class="card-content">
|
||||||
|
<div class='col-md-12'>
|
||||||
|
<div class='row bottom'>
|
||||||
|
<div class="pin_pad " data-value="1">1</div>
|
||||||
|
<div class="pin_pad left" data-value="2">2</div>
|
||||||
|
<div class="pin_pad left" data-value="3">3</div>
|
||||||
|
</div>
|
||||||
|
<div class='row bottom'>
|
||||||
|
<div class="pin_pad" data-value="4">4</div>
|
||||||
|
<div class="pin_pad left" data-value="5">5</div>
|
||||||
|
<div class="pin_pad left" data-value="6">6</div>
|
||||||
|
</div>
|
||||||
|
<div class='row bottom'>
|
||||||
|
<div class="pin_pad" data-value="7">7</div>
|
||||||
|
<div class="pin_pad left" data-value="8">8</div>
|
||||||
|
<div class="pin_pad left" data-value="9">9</div>
|
||||||
|
</div>
|
||||||
|
<div class='row bottom'>
|
||||||
|
<!-- <div class="pin_pad bg-grey" data-value="CLR">CLR</div>
|
||||||
|
<div class="pin_pad left" data-value="0">0</div>
|
||||||
|
<div class="pin_pad left bg-indigo" data-value="ENT">ENT</div> -->
|
||||||
|
<div class="pin_pad bg-blue-grey" data-value="BAC">BACK</div>
|
||||||
|
<div class="pin_pad left" data-value="0">0</div>
|
||||||
|
<div class="pin_pad bg-grey left" data-value="CLR">CLR</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
||||||
<div class="row justify-content-center form-group">
|
<div class="row justify-content-center form-group">
|
||||||
<input type="text" class="form-control col-4" id="emp_id" placeholder="Employee ID">
|
<input type="text" class="form-control col-4" id="emp_id" placeholder="Employee ID">
|
||||||
</div>
|
</div>
|
||||||
@@ -177,7 +215,9 @@
|
|||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// for Notificaiotn message
|
// for Notificaiotn message
|
||||||
var placementFrom = $("#noti").attr('data-placement-from');
|
var placementFrom = $("#noti").attr('data-placement-from');
|
||||||
@@ -197,6 +237,30 @@
|
|||||||
$(item).submit();
|
$(item).submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#emp_id").focus();
|
||||||
|
$(".pin_pad").click(function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
var value = $(this).data("value");
|
||||||
|
|
||||||
|
if (value == "CLR") {
|
||||||
|
$("#emp_id").val("");
|
||||||
|
} else if (value == "BAC") {
|
||||||
|
window.location.href = "/"
|
||||||
|
} else {
|
||||||
|
var old_value = $("#emp_id").val();
|
||||||
|
$("#emp_id").val(old_value + value);
|
||||||
|
}
|
||||||
|
if((old_value + value).length == 3){
|
||||||
|
if($.isNumeric(old_value + value)){
|
||||||
|
if((old_value + value).length === 3){
|
||||||
|
window.location.href = '/auth/'+(old_value + value);
|
||||||
|
}else{
|
||||||
|
alert("Please Enter Numeric Number");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#emp_id').keyup(function(e) {
|
$('#emp_id').keyup(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var txtVal = this.value;
|
var txtVal = this.value;
|
||||||
|
|||||||
@@ -113,6 +113,10 @@
|
|||||||
<td><%= t("views.right_panel.detail.total") %> <%= t :sale %> : </td>
|
<td><%= t("views.right_panel.detail.total") %> <%= t :sale %> : </td>
|
||||||
<td align="right"><%= number_with_precision( @summ_sale.grand_total , precision: precision.to_i ,delimiter: delimiter)%></td>
|
<td align="right"><%= number_with_precision( @summ_sale.grand_total , precision: precision.to_i ,delimiter: delimiter)%></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><%= t("views.right_panel.detail.total") %> <%= t :redeem %> : </td>
|
||||||
|
<td align="right"><%= number_with_precision( @summ_sale.grand_total , precision: precision.to_i ,delimiter: delimiter)%></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<% if !(@total_payment_methods.nil?) %>
|
<% if !(@total_payment_methods.nil?) %>
|
||||||
|
|||||||
Reference in New Issue
Block a user