This commit is contained in:
NyanLinHtut
2019-06-21 15:10:25 +06:30
95 changed files with 1892 additions and 500 deletions

View File

@@ -0,0 +1,10 @@
# json.set! :status, @out[0]
# json.set! :data, @out[1]
#
if @cash
json.status true
else
json.status false
json.data @cash
end

View File

@@ -1,2 +1,2 @@
json.status = true
json.message = 'Data successfully Sync'
json.status true
json.message "Sync Record Completed."

View File

@@ -126,8 +126,8 @@
<% if crm_customer.membership_id.nil? && !crm_customer.membership_type.nil? && !crm_customer.membership_type =="" && !crm_customer.paypar_account_no =="" && !crm_customer.paypar_account_no.nil? %>
<%= link_to t("views.btn.sync"), crm_customer_sync_path(crm_customer), :class => "btn btn-md bg-green waves-effect" %>
<% end %>
<% if @customer_update_phone_email %>
<%= link_to t("views.btn.update"), crm_customer_update_phone_email_path(crm_customer), :class => "btn btn-md bg-green waves-effect" %>
<% if @customer_update_phone_email_membertype %>
<%= link_to t("views.btn.update"), crm_customer_update_phone_email_member_type_path(crm_customer), :class => "btn btn-md bg-green waves-effect" %>
<% end %>
<%= link_to t("views.btn.show"), crm_customer_path(crm_customer), :class => "btn btn-md bg-blue waves-effect" %>
</td>

View File

@@ -0,0 +1,10 @@
<%= simple_form_for(@induties_assign_in_duty) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
</div>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>

View File

@@ -0,0 +1,2 @@
json.extract! induties_assign_in_duty, :id, :created_at, :updated_at
json.url induties_assign_in_duty_url(induties_assign_in_duty, format: :json)

View File

@@ -0,0 +1,6 @@
<h1>Editing Induties Assign In Duty</h1>
<%= render 'form', induties_assign_in_duty: @induties_assign_in_duty %>
<%= link_to 'Show', @induties_assign_in_duty %> |
<%= link_to 'Back', induties_assign_in_duties_path %>

View File

@@ -0,0 +1,345 @@
<!-- <div class="page-header">
<ol class="breadcrumb">
<span class="float-right">
<a href="" id="back">Back</a>
</span>
</ol>
</div> -->
<div class="row">
<div class="col-md-12 col-sm-12 col-lg-8">
<div class="card show_all_commissioner_card">
<div class="card-block row" style="margin:0.5rem;">
<% @commissioners.each do |com| %>
<div class="col-md-6 col-sm-6 col-lg-3 mt-3 touch_commissioner" commissionerId='<%= com["id"] %>' commissionerName='<%= com["name"] %>'>
<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(<%=com["image_path"] %>);background-repeat: no-repeat; background-size: cover;">
<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">
<div class="col-8" style="padding:0px !important;"><%=com["name"] %></div>
<% if com["check_in_count"] >0%>
<div class="col-4 row" style="margin:auto;"><span class="badge badge-primary" style="margin:auto;font-size: 0.8rem;">A :<%=com["check_in_count"] %></span></div>
<% end %>
</div>
<div class="add_icon p-t-65 p-b-65 m-r-">
</div>
</div>
</div>
<% end %>
<div class="col-md-6 col-sm-6 col-lg-3 mt-3 add_more_commissioner">
<div class="card custom-card testimonial-card fadeInRight" style="height:100%;width: 100%;">
<div class="row" style="margin: auto;">
<i class="material-icons" style="color: gray;font-size: 9rem;">add</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12 col-sm-12 col-lg-4" id="show_list_induty_card">
<div class="card" >
<div class="alert success-msg" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<i class="fa fa-check"></i>
Successed!
</div>
<div class="card-header row" style="margin-right: 0;margin-left: 0">
<div class="col-7 commissionerName"><label>Create In Duty</label></div>
<div class="col-5"><button type="button" class="btn btn-block btn-default waves-effect" id="back"><i class="material-icons">reply</i>Back to Order</button></div>
</div>
<input type="hidden" name="booking_id" value="<%=@booking_id %>" id="booking_id">
<input type="hidden" name="commissionerId" value="" id="commissionerId">
<div class="row create_induty_card" style="margin-left:1rem;margin-right: 1rem;">
<table class="table table-striped" id="show_in_duty_table">
<thead >
<tr>
<th>Dining</th>
<th>Check In At</th>
<th>Action</th>
</tr>
</thead>
<tbody class="occupide_dining">
</tbody>
</table>
</div>
<div class="row" >
<div class="col-8 add_to_order" style="margin: auto;">
</div>
</div>
<div class="row form-inputs form-group" style="margin: auto;">
<hr style="width :100%;margin-bottom: 1rem;">
<div class="col-12 " style="">
<div class="row form-inputs form-group" style="margin: auto;">
<div class="col-12" >
<label class="radio-room"><input type="radio" name="radio" id="radio-room" value="room" checked="checked" /> Room</label>
<label class="radio-table"><input type="radio" name="radio" id="radio-table" value="table" /> Table</label>
</div>
</div>
<div class="row form-inputs form-group room_collection" style="margin: auto;">
<div class="col-12 ">
<%= simple_form_for 'zone', :method => :get do |f| %>
<%= f.collection_select :dinning_id, Room.all, :id, :name, {prompt: 'Select Room'},:class=>'form-control',:required => true %>
<%end %>
</div>
</div>
<div class="row form-inputs form-group table_collection" style="margin: auto;">
<div class="col-12 ">
<%= simple_form_for 'zone_t', :method => :get do |f| %>
<%= f.collection_select :dinning_id, Table.all, :id, :name, {prompt: 'Select Table'},:class=>'form-control',:required => true %>
<%end %>
</div>
</div>
</div>
</div>
<div class="row form-inputs form-group" style="margin: auto;">
<div class="col-12 ">
<%= simple_form_for 'save_induties', :url => induties_induties_create_path, :method => :post do |f| %>
<%= f.check_box :by_name,:class=>'form-control'%>
<label class="checkboxLabel" for="save_induties_by_name">By Name</label>
<% end %>
</div>
</div>
<button type="button" class=" btn bg-blue form-actions btn_create_induty" id="btn_create_induty" disabled="">Create In Duty</button>
</div>
</div>
</div>
<script type="text/javascript">
$(".table_collection").hide();
$('#back').on('click',function(){
event.preventDefault();
var dinning_id = localStorage.getItem('dinning_id');
var dinning_type = localStorage.getItem('dinning_type');
window.location.href = '/origami/'+dinning_type+'/'+dinning_id;
});
$( document ).ready(function() {
// document.getElementById("btn_create_induty").disabled = true;
$('#btn_create_induty').attr("disabled", 'disabled');
var booking_id=document.getElementById("booking_id").value
getCurrentBooking(booking_id);
});
$(document).on('click', '.btn_create_induty', function(event){
$('.add_to_order').html("");
event.preventDefault();
var str=document.getElementById("zone_dinning_id").value;
var str_t=document.getElementById("zone_t_dinning_id").value;
if (str == ""){
zone_dinning_id =document.getElementById("zone_t_dinning_id").value;
}
if (str_t == ""){
zone_dinning_id =document.getElementById("zone_dinning_id").value;
}
if(str == "" && str_t == ""){
document.getElementById('zone_dinning_id').focus();
$('#zone_dinning_id').css('border-color', 'red');
$('#zone_t_dinning_id').css('border-color', 'red');
return false
}
else{
var booking_id=document.getElementById("booking_id").value
var commissionerId=document.getElementById("commissionerId").value
var by_name =document.getElementById("save_induties_by_name").checked
$.ajax({
type: "POST",
url: "assign_create",
dataType: "json",
data: {booking_id:booking_id,commissionerId:commissionerId,dinning_id:zone_dinning_id,by_name:by_name},
success: function (data) {
in_time = changDateFormat(data.in_time);
d_type = data.dinning_type.charAt(0);
row ='<tr>'
+'<td>'+d_type+'-'+data.dinning_id+'</td>'
+'<td>'+in_time+'</td>'
+'<td><a href="" onclick = "checkout_induty(this)" class="btn checkout_induty" style= "background-color: #3F51B5;"indutyId="'+ data.id +'" >Check Out</a>&nbsp;<a href="" onclick = "remove_induty(this)" class="btn remove_induty" style= "background-color: red;"indutyId="'+ data.id +'" >Remove</a></td>'
+'</tr>';
$('.occupide_dining').append(row);
$('#zone_dinning_id').val("");
document.getElementById("save_induties_by_name").checked = false;
var scrollTo = document.getElementById('show_list_induty_card');
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
$(".success-msg").css('display','block');
}
});
}
});
$(document).on('click', '.touch_commissioner', function(event){
$('#btn_create_induty').attr("disabled", '');
$(".success-msg").css('display','none');
$('.add_to_order').html("");
document.getElementById("btn_create_induty").disabled = false;
var commissionerId = this.getAttribute("commissionerId");
var commissionerName = this.getAttribute("commissionerName");
var url = "get_all_occupied_dining_path" ;
$('.occupide_dining').html("");
$('.commissionerName').html("");
booking_id=document.getElementById("booking_id").value
$.ajax({
type: "GET",
url: "/induties/assign_in_duties/get_all_occupied_dining/"+commissionerId,
dataType: "json",
success: function (data) {
$('.commissionerName').append('<label>'+commissionerName+' (<a href="" onclick = "getCurrent(this)">'+booking_id+'</a> )</label');
data.forEach(function(items) {
in_time = changDateFormat(items.in_time);
d_type = items.dinning_type.charAt(0);
row ='<tr>'
+'<td>'+d_type+'-'+items.dinning_id+'</td>'
+'<td>'+in_time+'</td>'
+'<td><a href="" onclick = "checkout_induty(this)" class="btn checkout_induty" style= "background-color: #3F51B5;"indutyId="'+ items.id +'" >Check Out</a>&nbsp;<a href="" onclick = "remove_induty(this)" class="btn remove_induty" style= "background-color: red;"indutyId="'+ items.id +'" >Remove</a></td>'
+'</tr>';
$('.occupide_dining').append(row);
});
$('#commissionerId').val(commissionerId);
var scrollTo = document.getElementById('show_list_induty_card');
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
}
});
});
function changDateFormat(date){
datetime = new Date(date);
day = datetime.getDate();
month = datetime.getMonth() + 1; //month: 0-11
year = datetime.getFullYear();
date = year + "-" + day + "-" + month;
var hours = datetime.getHours();
var minutes = datetime.getMinutes();
var ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
var in_time = date +' '+hours + ':' + minutes + ' ' + ampm;
return in_time;
}
$('input[type=radio]').change(function() {
if(this.value == "room"){
$(".table_collection").css('display','none');
$(".room_collection").css('display','block');
}
else{
$(".room_collection").css('display','none');
$(".table_collection").css('display','block');
}
});
function checkout_induty(row){
event.preventDefault();
var indutyId = row.getAttribute("indutyId");
var booking_id=document.getElementById("booking_id").value
datetime = new Date();
datetime = changDateFormat(datetime);
swal({
title: '',
text: 'Are you sure want to checkout at ' +datetime,
html:true,
confirmButtonColor: "#3F51B5",
confirmButtonText: "OK",
closeOnConfirm: true,
showCancelButton: true,
cancelButtonColor: '#d33',
}, function(isConfirm){
if(isConfirm){
$.ajax({
type: "POST",
url: "assign_checkout/"+indutyId,
dataType: "json",
success: function (data) {
var d = row.parentNode.parentNode.rowIndex;
document.getElementById('show_in_duty_table').deleteRow(d);
var scrollTo = document.getElementById('show_list_induty_card');
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
$(".success-msg").css('display','block');
}
});
}
});
}
function remove_induty(row){
event.preventDefault();
var indutyId = row.getAttribute("indutyId");
var booking_id=document.getElementById("booking_id").value
swal({
title: '',
text: 'Are you sure want to remove induties ',
html:true,
confirmButtonColor: "#3F51B5",
confirmButtonText: "OK",
closeOnConfirm: true,
showCancelButton: true,
cancelButtonColor: '#d33',
}, function(isConfirm){
if(isConfirm){
$.ajax({
type: "DELETE",
url: "assign_remove/"+indutyId,
dataType: "json",
success: function (data) {
var d = row.parentNode.parentNode.rowIndex;
document.getElementById('show_in_duty_table').deleteRow(d);
var scrollTo = document.getElementById('show_list_induty_card');
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
$(".success-msg").css('display','block');
}
});
}
});
}
$(document).on('click', '.add_more_commissioner', function(event){
localStorage.setItem('from_induty', true);
localStorage.setItem('booking_id', document.getElementById("booking_id").value);
window.location.href ='/settings/commissioners/new';
});
localStorage.setItem('from_induty', false);
function getCurrentBooking(booking_id){
document.getElementById("btn_create_induty").disabled = true;
$('.commissionerName').html("");
$('.add_to_order').html("");
$('.occupide_dining').html("");
$.ajax({
type: "GET",
url: "get_current_booking",
dataType: "json",
success: function (data) {
dinning_id = localStorage.getItem('dinning_id');
dinning_type = localStorage.getItem('dinning_type');
booking_id=document.getElementById("booking_id").value
$('.commissionerName').append('<label><a href="" onclick = "getCurrent(this)">'+booking_id+'</a></label');
$('.add_to_order').append('<input type="hidden" name="current_checkin_count" value='+data.length+'><input type="submit" class="btn bg-blue form-actions add_to_charges" value="Charges to Invoice" onclick = "addToOrder(this)" current_checkin_induties_count ='+data.length+'>');
data.forEach(function(items) {
in_time = changDateFormat(items.in_time);
d_type = items.dinning_type.charAt(0);
row ='<tr>'
+'<td>'+d_type+'-'+items.dinning_id+'</td>'
+'<td>'+in_time+'</td>'
+'<td><a href="" onclick = "checkout_induty(this)" class="btn checkout_induty" style= "background-color: #3F51B5;"indutyId="'+ items.id +'" >Check Out</a>&nbsp;<a href="" onclick = "remove_induty(this)" class="btn remove_induty" style= "background-color: red;"indutyId="'+ items.id +'" >Remove</a></td>'
+'</tr>';
$('.occupide_dining').append(row);
});
var scrollTo = document.getElementById('show_list_induty_card');
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
}
});
}
function getCurrent(row){
$(".success-msg").css('display','none');
booking_id=document.getElementById("booking_id").value
event.preventDefault();
getCurrentBooking(booking_id);
}
function addToOrder(row){
event.preventDefault();
$(".success-msg").css('display','none');
booking_id=document.getElementById("booking_id").value
var current_checkin_induties_count = row.getAttribute("current_checkin_induties_count");
localStorage.setItem("current_checkin_induties_count",current_checkin_induties_count);
var dinning_id = localStorage.getItem('dinning_id');
var dinning_type = localStorage.getItem('dinning_type');
window.location.href = '/origami/'+dinning_type+'/'+dinning_id;
}
</script>

View File

@@ -0,0 +1 @@
json.array! @induties_assign_in_duties, partial: 'induties_assign_in_duties/induties_assign_in_duty', as: :induties_assign_in_duty

View File

@@ -0,0 +1,5 @@
<h1>New Induties Assign In Duty</h1>
<%= render 'form', induties_assign_in_duty: @induties_assign_in_duty %>
<%= link_to 'Back', induties_assign_in_duties_path %>

View File

@@ -0,0 +1,4 @@
<p id="notice"><%= notice %></p>
<%= link_to 'Edit', edit_induties_assign_in_duty_path(@induties_assign_in_duty) %> |
<%= link_to 'Back', induties_assign_in_duties_path %>

View File

@@ -0,0 +1 @@
json.partial! "induties_assign_in_duties/induties_assign_in_duty", induties_assign_in_duty: @induties_assign_in_duty

View File

@@ -4,7 +4,6 @@
<% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%>
<% modify_order = request.path_info.include?('modify_order')%>
<div class="container-fluid " style="padding:0px 3px 0px 3px;">
<div id="oqs_loading_wrapper" style="display:none;">
<div id="oqs_loading"></div>
@@ -166,15 +165,15 @@
Back
</button>
<% if @quick_service_only %>
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-9" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
</button>
<% else %>
<%# <% if @quick_service_only %>
<!-- <button type="button" class="btn btn-lg btn-primary waves-effect col-md-9" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
</button> -->
<%# <% else %>
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-6" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
</button>
<a class="btn btn-lg bg-blue waves-effect select_table col-md-3" data-toggle="modal" data-target="#TableModal" style=" padding: .5rem 0.15rem !important;">Select</a>
<input type="hidden" name="table_id" value="" id="table_id">
<% end %>
<%# <% end %>
<%else%>
<button type="button" class="btn btn-lg btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>Back
@@ -282,7 +281,7 @@
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<% end %>
<%end%>
<% if !@quick_service_only && current_user.role == "waiter"%>
<% if @quick_service_only && current_user.role == "waiter"%>
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<%end%>
<%else%>

View File

@@ -47,16 +47,16 @@
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
<% if table.get_checkout_booking.nil? %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<% else %>
<div class="card tables orange text-white" data-id="<%= table.id %>">
<% end %>
<div class="card-block">
Table <%= table.name %> ( <%= table.seater %> Seat ) <br>
<%= table.zone.name %>
</div>
</div>
<% if table.get_checkout_booking.nil? %>
<div class="card tables red text-white" data-id="<%= table.id %>">
<% else %>
<div class="card tables orange text-white" data-id="<%= table.id %>">
<% end %>
<div class="card-block">
Table <%= table.name %> ( <%= table.seater %> Seat ) <br>
<%= table.zone.name %>
</div>
</div>
<% else %>
<% if table.get_checkout_booking.nil? %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
@@ -219,6 +219,7 @@
getCreditSales("","","cashier"); //credit sales script data binding
$(".tables").on('click', function(){
localStorage.setItem('dinning_type','table');
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/' + dining_id;
});
@@ -229,6 +230,7 @@
});
$(".rooms").on('click', function(){
localStorage.setItem('dinning_type','room');
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/room/' + dining_id;
});

View File

@@ -796,6 +796,7 @@
<script>
var cashier_type = "cashier";
$(document).ready(function () {
// alert(localStorage.getItem("current_checkin_count"));
localStorage.removeItem("trans_flag");
/* check webview loaded*/
var webview = <%= @webview %>;
@@ -825,8 +826,9 @@
window.location.href = '/origami/table/' + dining_id + "/table_invoice/" + sale_id;
})
$(".tables").on('click', function () {
localStorage.setItem('dinning_type','table');
var customer_id = $(".customer-id").text();
localStorage.setItem('customer_id',customer_id);
show_customer_details(customer_id);
var dining_id = $(this).attr("data-id");
@@ -843,8 +845,9 @@
});
$(".rooms").on('click', function () {
localStorage.setItem('dinning_type','room');
var customer_id = $(".customer-id").text();
localStorage.setItem('customer_id',customer_id);
show_customer_details(customer_id);
var dining_id = $(this).attr("data-id");
@@ -1074,6 +1077,8 @@
var order_id = $('#save_order_id').attr('data-order');
var ajax_url = "/origami/" + order_id + "/request_bills";
localStorage.setItem("tax_type", "all");
var current_checkin_induties_count =localStorage.getItem("current_checkin_induties_count");
localStorage.removeItem("current_checkin_induties_count");
if(order_id!=undefined && order_id!=null && order_id!=""){
if($('#request_bills').is(":visible")) {
$('#request_bills').prop("disabled",true);
@@ -1081,7 +1086,7 @@
$.ajax({
type: "GET",
url: ajax_url,
// data: 'order_id='+ order_id,
data: {current_checkin_induties_count: current_checkin_induties_count},
success: function (result) {
if (!result.status) {
swal({
@@ -1207,9 +1212,10 @@
});
$('#in_duties').on('click', function () {
localStorage.setItem('dinning_id',<%= @dining.id %>);
var dining_id = "<%= @dining.id %>";
var booking_id = "<%= @booking.booking_id rescue "" %>";
window.location.href = '/origami/assign_in_duty/'+ booking_id;
window.location.href = '/induties/'+ booking_id +'/assign';
});
$('#void').on('click', function () {

View File

@@ -1,9 +1,6 @@
<div class="row">
<div class="col-md-8">
<br/>
<div class="card">
<div class="card-header">
<label>Dining Name:</label>

View File

@@ -29,9 +29,17 @@
%>
<!-- end count function -->
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
<div class="row m-t--10">
<% if request.user_agent.include? "Mobile" %>
<div class="row m-t-10" style="margin-left: 0.2rem">
<% else %>
<div class="row m-t-10">
<% end %>
<div class="col-lg-5 col-md-5 col-sm-5 div_order_margin">
<% if !request.user_agent.include? "Mobile" %>
<ul class="nav nav-tabs tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
<% else %>
<ul class="nav nav-tabs tab-col-teal mobile_tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
<% end %>
<li class="nav-item red m-b-5" data-color="#F44336" data-type="pending">
<a class="nav-link" data-toggle="tab" href="#pending" role="tab">
<p class="num p-t-5">
@@ -50,6 +58,7 @@
<%= delivered_count %>
</p> <%= t :delivering %></a>
</li>
<% if !request.user_agent.include? "Mobile" %>
<li class="nav-item m-b-5" data-color="#03A9F4" data-type="completed" style="background-color: #03A9F4;">
<a class="nav-link" data-toggle="tab" href="#completed" role="tab">
<p class="num p-t-5">
@@ -62,6 +71,7 @@
<%= processed_count %>
</p> <%= t :processed %></a>
</li>
<% end %>
</ul>
<div class="tab-content m-t--10">
@@ -334,7 +344,7 @@
</div>
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order">
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order" id="div_card_order">
<div class="card m-b-5 p-t-5">
<div class="card-header custom-card-header">
<table class="table">
@@ -355,6 +365,11 @@
</div>
<div class="card-block custom-card-block">
<div id="order-detail-slimscroll" data-height="110">
<% if request.user_agent.include? "Mobile" %>
<input type="hidden" name="summary_items_mobile" value="true">
<%else %>
<input type="hidden" name="summary_items_mobile" value="false">
<%end %>
<table class="table summary-items">
<tbody>
<!-- <tr>
@@ -406,8 +421,12 @@
</div>
</div>
</div>
<% if request.user_agent.include? "Mobile" %>
<div class="col-lg-3 col-md-3 col-sm-3" style="margin-right: 0.5rem">
<% else %>
<div class="col-lg-3 col-md-3 col-sm-3">
<% end %>
<div class="card m-b-5 p-t-5" style="background-color: #E8EAF6">
<div class="card-header custom-card-header" style="background-color: #E8EAF6">
<table class="table">

View File

@@ -914,6 +914,8 @@ $(document).ready(function(){
show_customer_details(customer_id);
var dining_id = $(this).attr("data-id");
localStorage.setItem('dinning_type','table');
localStorage.setItem('customer_id',customer_id);
window.location.href = '/origami/table/' + dining_id;
});
@@ -932,6 +934,8 @@ $(document).ready(function(){
show_customer_details(customer_id);
var dining_id = $(this).attr("data-id");
localStorage.setItem('dinning_type','room');
localStorage.setItem('customer_id',customer_id);
window.location.href = '/origami/room/' + dining_id;
});
@@ -1146,6 +1150,8 @@ $('#pay').on('click',function() {
});
// Bill Request
$('#request_bills').click(function() {
var current_checkin_induties_count =localStorage.getItem("current_checkin_induties_count");
localStorage.removeItem("current_checkin_induties_count");
var order_id = $('#save_order_id').attr('data-order');
var ajax_url = "/origami/" + order_id + "/request_bills";
if(order_id!=undefined && order_id!=null && order_id!=""){
@@ -1156,7 +1162,7 @@ $('#request_bills').click(function() {
$.ajax({
type: "GET",
url: ajax_url,
// data: 'order_id='+ order_id,
data: {current_checkin_induties_count: current_checkin_induties_count},
success: function (result) {
if (!result.status) {
swal({
@@ -1367,9 +1373,10 @@ $('#add_invoice').on('click',function(){
});
$('#in_duties').on('click', function () {
localStorage.setItem('dinning_id',<%= @room.id %>);
var dining_id = "<%= @room.id %>";
var booking_id = "<%= @booking.booking_id rescue "" %>";
window.location.href = '/origami/assign_in_duty/'+ booking_id;
window.location.href = '/induties/'+ booking_id +'/assign';
});
// Ordering

View File

@@ -46,8 +46,6 @@
</tr>
</thead>
<tbody>
<% puts 'testing!!!!!!' %>
<% puts @print_settings.precision.to_i %>
<% if @print_settings.precision.to_i > 0
precision = @print_settings.precision
else

View File

@@ -36,6 +36,8 @@
<%= f.label :resigned_date %><br/>
<%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/>
<%= f.input :is_active %>
<input type="hidden" name="from_induty" value="" class="from_induty">
<input type="hidden" name="booking_id" value="" class="booking_id">
</div>
<div class="form-actions">
@@ -70,3 +72,7 @@
</div>
</div>
</div>
<script type="text/javascript">
$('.from_induty').val(localStorage.getItem('from_induty'));
$('.booking_id').val(localStorage.getItem('booking_id'));
</script>

View File

@@ -10,3 +10,4 @@
</div>
<%= render 'form', commissioner: @commissioner %>

View File

@@ -10,7 +10,7 @@
<!--<%= f.label :product_code, 'Product' %>
<%= f.collection_select :product_code, MenuItem.all.order('name asc'), :id, :name, {prompt: 'Select a Product'}, {class: 'form-control'} %><br/>-->
<%= f.input :name %>
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
<%= f.input :commission_type, :collection => ['Percentage','Net Amount','Basic Pay'], prompt: 'Select Commission Type', class: 'form-control' %>
<%= f.input :amount %>
<%= f.input :is_active,:class => "filled-in" ,:id => "" %>

View File

@@ -17,7 +17,7 @@
<table class="table table-striped">
<thead>
<tr>
<th><%= t("views.right_panel.detail.product") %> <%= t("views.right_panel.detail.name_txt2") %></th>
<th><%= t("views.right_panel.detail.group") %> <%= t("views.right_panel.detail.name_txt2") %></th>
<th><%= t("views.right_panel.detail.commission_type") %></th>
<th><%= t("views.right_panel.detail.amount") %></th>
<th><%= t("views.right_panel.detail.active") %></th>