merge with master
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
//= require bootstrap-notify/bootstrap-notify.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require fileinput.min
|
||||
//= require BSBMaterial/turbolink_admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
@@ -34,4 +35,24 @@ $(document).on('turbolinks:load', function() {
|
||||
weekStart: 1,
|
||||
time: false
|
||||
});
|
||||
});
|
||||
|
||||
$("#customer_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
browseClass: "btn btn-success",
|
||||
browseLabel: "Pick Image",
|
||||
browseIcon: "<i class=\"fa fa-image\"></i> ",
|
||||
removeClass: "btn btn-danger",
|
||||
removeLabel: "Delete",
|
||||
removeIcon: "<i class=\"fa fa-trash\"></i> ",
|
||||
showUpload: false,
|
||||
// uploadClass: "btn btn-info",
|
||||
// uploadLabel: "Upload",
|
||||
// uploadIcon: "<i class=\"fa fa-upload\"></i> ",
|
||||
previewTemplates: {
|
||||
image: '<div class="file-preview-frame" id="{previewId}" data-fileindex="{fileindex}">\n' +
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ $(function() {
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
|
||||
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
|
||||
row = '<div class="card custom-card testimonial-card fadeInRight" style="">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;">'
|
||||
+'<div class="col-md-9">'+ product[field].name +'</div>'
|
||||
+"<div class='col-md-3 add_icon' data-item-code='"
|
||||
@@ -180,9 +180,8 @@ $(function() {
|
||||
image_path = "image/logo.png";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
row = '<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
||||
+'<div class="col-md-9">'+ menu_items[field].name +'</div>'
|
||||
+"<div class='col-md-3 "+menu_item_box+"' data-item-code='"
|
||||
@@ -190,19 +189,21 @@ $(function() {
|
||||
+JSON.stringify(menu_items[field].instances)+"' data-id = '"
|
||||
+JSON.stringify(menu_items[field].attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(menu_items[field].options)+"'data-opt = '"
|
||||
+JSON.stringify(menu_items[field].options)+"' data-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"' >"
|
||||
+"<i class='fa "+fa_plus+" '>"
|
||||
+add+ '</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+"<div class='"+add_icon+" p-t-65 m-r--5' data-item-code='"
|
||||
+"<div class='"+add_icon+" p-t-65 m-r-' data-item-code='"
|
||||
+ menu_items[field].code +"' data-name='"
|
||||
+ menu_items[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ price +"' data-instance-code = '"+ code +"' data-instance = '"
|
||||
+ name +"' data-promotion-price = '"+ promotion_price +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ options +"' data-image='"+image_path+"' data-toggle='"
|
||||
+ JSON.stringify(menu_items[field].options) +"' data-opt = '"
|
||||
+ JSON.stringify(menu_items[field].options) +"' data-image='"+image_path+"' data-toggle='"
|
||||
+data_modal+"' data-target='."+data_target+"' data-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"'data-instances = '"
|
||||
+JSON.stringify(menu_items[field].instances)+"'>"
|
||||
@@ -237,10 +238,10 @@ $(function() {
|
||||
//instances = $(this).data('instance');
|
||||
item_sets = $(this).data('item-sets');
|
||||
instances = $(this).data('instances');
|
||||
// item_sets = $(data).attr('data-item-sets');
|
||||
item_options = $(this).data('options');
|
||||
|
||||
for(var field in item_sets) {
|
||||
|
||||
|
||||
$('.set_order').attr('data-min-qty',item_sets[field]["min_selectable_qty"]);
|
||||
|
||||
value = item_sets[field]["instances"];
|
||||
@@ -283,10 +284,20 @@ $(function() {
|
||||
});
|
||||
}
|
||||
|
||||
for(var j in item_options) {
|
||||
value = item_options[j]["values"];
|
||||
type = item_options[j]["type"];
|
||||
row = "<h4>"+type+"</h4>"
|
||||
$(value).each(function(i){
|
||||
row +="<button class='btn btn- waves-effect option_btn "+ type +"' data-type='"
|
||||
+type+"' data-value='"+value[i]+"' data-group='set_menu_default'>"+value[i]+"</button>";
|
||||
});
|
||||
$(".options-list").append(row);
|
||||
}
|
||||
$('.set-item').attr('data-code',instances[0]['code']);
|
||||
$('.set-item').attr('data-name',instances[0]['name']);
|
||||
$('.set-item').attr('data-price',instances[0]['price']);
|
||||
$('.set-item').attr('data-options','[]');
|
||||
$('.set-item').attr('data-options','');
|
||||
$('.set-item').attr('data-parent',true);
|
||||
|
||||
$('#set_change_qty').val(1);
|
||||
@@ -341,6 +352,7 @@ $(function() {
|
||||
sub_total = $('#set_total_price').text();
|
||||
name = $(this).data('name');
|
||||
price = $(this).data('price');
|
||||
options = $(this).attr('data-options','');
|
||||
// qty = $('#set_change_qty').val();
|
||||
qty = document.getElementById("set_count").value;
|
||||
total = qty*price;
|
||||
@@ -369,52 +381,48 @@ $(function() {
|
||||
|
||||
item = get_set_item(items);
|
||||
customer_display_view(item,"set_add");
|
||||
|
||||
var option = ''
|
||||
attribute_arr = []
|
||||
option_arr = []
|
||||
|
||||
var rowCount = $('.summary-items tbody tr').length+1;
|
||||
option_arr = []
|
||||
code = $('.set-item').attr('data-code');
|
||||
name = $('.set-item').attr('data-name');
|
||||
price = $('.set-item').attr('data-price');
|
||||
option = $('.set-item').attr('data-options');
|
||||
option = ($('.set-item').attr('data-options') === 'undefined') ? '' :$('.set-item').attr('data-options');
|
||||
parent = $('.set-item').attr('data-parent');
|
||||
total = qty * price ;
|
||||
option_arr.push(option);
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
+option_arr+"' data-row ='"+rowCount+ "' data-parent ='"+parent+ "'>"
|
||||
+option+"' data-row ='"+rowCount+ "' data-parent ='"+parent+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name +'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name +' ' + option +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(total).toFixed(2)
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".summary-items tbody").append(row);
|
||||
|
||||
var rowCount = $('.summary-items tbody tr').length+1;
|
||||
var set_option = ''
|
||||
$(items).each(function(i){
|
||||
code = $(items[i]).attr('data-code');
|
||||
name = $(items[i]).attr('data-name');
|
||||
price = $(items[i]).attr('data-price');
|
||||
option = $(items[i]).attr('data-options');
|
||||
set_option = ($(items[i]).attr('data-options') === 'undefined') ? ' ' :$(items[i]).attr('data-options');
|
||||
|
||||
sub_item = $(items[i]).attr('data-sub-item');
|
||||
option = $(items[i]).attr('data-options');
|
||||
total = qty * price ;
|
||||
option_arr.push(option);
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
+option_arr+"' data-row ='"+rowCount+ "' data-sub-item ='"+sub_item+ "'>"
|
||||
+set_option+"' data-row ='"+rowCount+ "' data-sub-item ='"+sub_item+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name +'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name +' ' + set_option +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(total).toFixed(2)
|
||||
@@ -626,8 +634,6 @@ $(function() {
|
||||
|
||||
|
||||
if(group == "set_menu"){
|
||||
code = $(this).data('code');
|
||||
value = $(this).data('value');
|
||||
|
||||
instance = $(".selected-instance");
|
||||
$(instance).each(function(i){
|
||||
@@ -638,6 +644,12 @@ $(function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(group == "set_menu_default"){
|
||||
option_arr = get_selected_attributes('selected-option');
|
||||
$('.set-item').attr('data-options',JSON.stringify(option_arr));
|
||||
$('.set_default_option').text(option_arr);
|
||||
}
|
||||
|
||||
}); //End selecct attribute buttom
|
||||
|
||||
@@ -650,7 +662,6 @@ $(function() {
|
||||
|
||||
attribute_arr = get_selected_attributes('selected-attribute');
|
||||
option_arr = get_selected_attributes('selected-option');
|
||||
|
||||
if (item_row.length>0) {
|
||||
var instances = jQuery.parseJSON(item_row.attr('data-instances'));
|
||||
|
||||
@@ -689,9 +700,9 @@ $(function() {
|
||||
$('.add_to_order').attr('data-attributes',JSON.stringify(attribute_arr));
|
||||
$('.add_to_order').attr('data-options',JSON.stringify(option_arr));
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data);
|
||||
item = get_item(item_data,"add_to_order");
|
||||
customer_display_view(item,"add");
|
||||
show_item_detail(item_data);
|
||||
show_item_detail(item_data,"add_to_order");
|
||||
calculate_sub_total();
|
||||
|
||||
}); //End add order Click
|
||||
@@ -699,13 +710,13 @@ $(function() {
|
||||
// click plus icon for add
|
||||
$(document).on('click', '.add_icon', function(event){
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data);
|
||||
item = get_item(item_data,"add_icon");
|
||||
customer_display_view(item,"add");
|
||||
show_item_detail(item_data);
|
||||
show_item_detail(item_data,"add_icon");
|
||||
calculate_sub_total();
|
||||
}); //End Add Icon Click
|
||||
|
||||
function show_item_detail(data){
|
||||
function show_item_detail(data,click_type){
|
||||
|
||||
qty = parseInt(data.attr('data-qty'));
|
||||
append = 0;
|
||||
@@ -717,23 +728,24 @@ $(function() {
|
||||
}else{
|
||||
instance = "("+data.attr('data-instance')+")";
|
||||
}
|
||||
|
||||
d_option = data.attr('data-options');
|
||||
if (d_option){
|
||||
option_name = "-"+data.attr('data-options');
|
||||
d_option = data.attr('data-opt');
|
||||
if (click_type != "add_icon"){
|
||||
option_name = "-"+data.attr('data-options');
|
||||
data_option = data.attr('data-options') ;
|
||||
}else{
|
||||
option_name = '';
|
||||
option_name = ' ';
|
||||
data_option = '[]';
|
||||
}
|
||||
|
||||
|
||||
var rowCount = $('.summary-items tbody tr').length+1;
|
||||
var item_row = $('.summary-items tbody tr');
|
||||
|
||||
$(item_row).each(function(i){
|
||||
item_code = $(item_row[i]).attr('data-code');
|
||||
instance_code = $(item_row[i]).attr('data-instance-code');
|
||||
r_option = $(item_row[i]).attr('data-options');
|
||||
|
||||
if (item_code == data.attr('data-item-code') && instance_code == data.attr('data-instance-code')&&r_option==d_option) {
|
||||
r_option = $(item_row[i]).attr('data-opt');
|
||||
if (item_code == data.attr('data-item-code') && instance_code == data.attr('data-instance-code')&&r_option == d_option) {
|
||||
if (qty > 1) {
|
||||
qty = parseInt($(item_row[i]).children('#item_qty').text()) + qty;
|
||||
}else{
|
||||
@@ -757,9 +769,10 @@ $(function() {
|
||||
+instance+ "' data-code='"+data.attr('data-item-code')+"' data-instance-code='"
|
||||
+data.attr('data-instance-code')+"' data-attributes='"
|
||||
+data.attr('data-attributes')+"' data-options ='"
|
||||
+data_option+"' data-opt ='"
|
||||
+data.attr('data-options')+"' data-row ='"+rowCount+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + data.attr('data-name')+ ' ' + instance +' ' + option_name +'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + data.attr('data-name')+ ' ' + instance +''+option_name+'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(price).toFixed(2)
|
||||
@@ -776,17 +789,17 @@ $(function() {
|
||||
e.preventDefault();
|
||||
$("#oqs_loading_wrapper").show();
|
||||
|
||||
type = window.location.href.indexOf("quick_service");
|
||||
if (type != -1) {
|
||||
quick_service = window.location.href.indexOf("quick_service");
|
||||
if (quick_service != -1) {
|
||||
type = 'quick_service'
|
||||
var table_type = $('#table_type').text();
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').val();
|
||||
var customer_id = $('#customer_id').val();
|
||||
var booking_id = $('#booking_id').text();
|
||||
var ajax_url = 'addorders/create';
|
||||
}else{
|
||||
type = 'cashier'
|
||||
var table_type = $('#table_type').text();
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').text();
|
||||
var customer_id = $('#customer_id').text();
|
||||
var booking_id = $('#booking_id').text();
|
||||
@@ -813,17 +826,17 @@ $(function() {
|
||||
data: params,
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
customer_display_view(null,"reload");
|
||||
if (type == "quick_service") {
|
||||
window.location.href = "/origami/quick_service"
|
||||
window.location.href = "/origami/quick_service"
|
||||
}else{
|
||||
if(table_type == "Table"){
|
||||
window.location.href = "/origami/table/" + table_id
|
||||
window.location.href = "/origami/table/" + table_id
|
||||
}
|
||||
else {
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
}
|
||||
}
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
});
|
||||
// }else{
|
||||
@@ -878,13 +891,24 @@ $(function() {
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
if (result.status) {
|
||||
|
||||
if (result.data == null){
|
||||
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
|
||||
swal({
|
||||
title: "Please Open Shift !",
|
||||
text: result.status,
|
||||
type: "warning",
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "Ok",
|
||||
closeOnConfirm: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
|
||||
});
|
||||
|
||||
}else{
|
||||
window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1156,7 +1180,7 @@ $(function() {
|
||||
|
||||
for(var i in data) {
|
||||
|
||||
row = '<li class="menu_category fadeInTop animated" data-id="'+data[i].id+'">'
|
||||
row = '<li class="menu_category fadeInTop" data-id="'+data[i].id+'">'
|
||||
+'<a class="nav-link" data-toggle="tab" href="" role="tab">'+ data[i].name+'</a>'
|
||||
+'</li>' ;
|
||||
$(sub_category).append(row);
|
||||
@@ -1169,7 +1193,7 @@ $(function() {
|
||||
}
|
||||
|
||||
/* Get Item rows */
|
||||
function get_item(data){
|
||||
function get_item(data,click_type){
|
||||
var sale_items = [];
|
||||
|
||||
var sale_item = {};
|
||||
@@ -1180,6 +1204,8 @@ $(function() {
|
||||
sale_item.instance_code = data.attr('data-instance-code')
|
||||
sale_item.attributes = data.attr('data-attributes')
|
||||
sale_item.options = data.attr('data-options')
|
||||
sale_item.opt = data.attr('data-opt')
|
||||
sale_item.click_type = click_type
|
||||
sale_item.instance = data.attr('data-instance')
|
||||
sale_items.push(sale_item);
|
||||
|
||||
|
||||
@@ -104,6 +104,86 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$("#shop_logo").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
browseClass: "btn btn-success",
|
||||
browseLabel: "Pick Image",
|
||||
browseIcon: "<i class=\"fa fa-image\"></i> ",
|
||||
removeClass: "btn btn-danger",
|
||||
removeLabel: "Delete",
|
||||
removeIcon: "<i class=\"fa fa-trash\"></i> ",
|
||||
showUpload: false,
|
||||
// uploadClass: "btn btn-info",
|
||||
// uploadLabel: "Upload",
|
||||
// uploadIcon: "<i class=\"fa fa-upload\"></i> ",
|
||||
previewTemplates: {
|
||||
image: '<div class="file-preview-frame" id="{previewId}" data-fileindex="{fileindex}">\n' +
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
|
||||
$("#commissioner_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
browseClass: "btn btn-success",
|
||||
browseLabel: "Pick Image",
|
||||
browseIcon: "<i class=\"fa fa-image\"></i> ",
|
||||
removeClass: "btn btn-danger",
|
||||
removeLabel: "Delete",
|
||||
removeIcon: "<i class=\"fa fa-trash\"></i> ",
|
||||
showUpload: false,
|
||||
// uploadClass: "btn btn-info",
|
||||
// uploadLabel: "Upload",
|
||||
// uploadIcon: "<i class=\"fa fa-upload\"></i> ",
|
||||
previewTemplates: {
|
||||
image: '<div class="file-preview-frame" id="{previewId}" data-fileindex="{fileindex}">\n' +
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
|
||||
$("#employee_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
browseClass: "btn btn-success",
|
||||
browseLabel: "Pick Image",
|
||||
browseIcon: "<i class=\"fa fa-image\"></i> ",
|
||||
removeClass: "btn btn-danger",
|
||||
removeLabel: "Delete",
|
||||
removeIcon: "<i class=\"fa fa-trash\"></i> ",
|
||||
showUpload: false,
|
||||
// uploadClass: "btn btn-info",
|
||||
// uploadLabel: "Upload",
|
||||
// uploadIcon: "<i class=\"fa fa-upload\"></i> ",
|
||||
previewTemplates: {
|
||||
image: '<div class="file-preview-frame" id="{previewId}" data-fileindex="{fileindex}">\n' +
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
|
||||
$("#shop_image").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
browseClass: "btn btn-success",
|
||||
browseLabel: "Pick Image",
|
||||
browseIcon: "<i class=\"fa fa-image\"></i> ",
|
||||
removeClass: "btn btn-danger",
|
||||
removeLabel: "Delete",
|
||||
removeIcon: "<i class=\"fa fa-trash\"></i> ",
|
||||
showUpload: false,
|
||||
// uploadClass: "btn btn-info",
|
||||
// uploadLabel: "Upload",
|
||||
// uploadIcon: "<i class=\"fa fa-upload\"></i> ",
|
||||
previewTemplates: {
|
||||
image: '<div class="file-preview-frame" id="{previewId}" data-fileindex="{fileindex}">\n' +
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
|
||||
// first input focus for all form
|
||||
$('form:first *input[data-behaviour!=datepicker]:input[type!=hidden]:first').focus();
|
||||
|
||||
|
||||
@@ -10,10 +10,12 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
var tax = data.tax_profiles;
|
||||
var status= data.status
|
||||
if (status == "reload") {
|
||||
window.location.reload();
|
||||
jQuery('#s_reload').click();
|
||||
}
|
||||
$('#second_display_slider').addClass("hidden")
|
||||
$('#second_display_items').removeClass("hidden")
|
||||
$('#second_display_slider').addClass("hidden")
|
||||
$('#second_display_items').removeClass("hidden")
|
||||
|
||||
|
||||
// append items
|
||||
if (status == "add") {
|
||||
for(var i in items) {
|
||||
@@ -28,11 +30,20 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
instance = "("+items[i].instance+")";
|
||||
}
|
||||
|
||||
d_option = items[i].options;
|
||||
if (d_option){
|
||||
option_name = "-"+items[i].options;
|
||||
// d_option = items[i].options;
|
||||
// if (d_option){
|
||||
// option_name = "-"+items[i].options;
|
||||
// }else{
|
||||
// option_name = '';
|
||||
// }
|
||||
|
||||
d_option = items[i].opt;
|
||||
if (items[i].click_type != "add_icon"){
|
||||
option_name = "-"+items[i].options;
|
||||
data_option = items[i].options ;
|
||||
}else{
|
||||
option_name = '';
|
||||
option_name = ' ';
|
||||
data_option = '[]';
|
||||
}
|
||||
|
||||
var rowCount = $('.second_display_items tbody tr').length+1;
|
||||
@@ -66,7 +77,8 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
+instance+ "' data-code='"+items[i].item_code+"' data-instance-code='"
|
||||
+items[i].instance_code+"' data-attributes='"
|
||||
+items[i].attributes+"' data-options ='"
|
||||
+items[i].options+"' data-row ='"+rowCount+ "'>"
|
||||
+data_option+"' data-opt ='"
|
||||
+items[i].options+"' data-row ='"+rowCount+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + items[i].name+ ' ' + instance + ' ' + option_name +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
@@ -84,8 +96,6 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
var attribute_arr = [];
|
||||
var rowCount = $('.second_display_items tbody tr').length+1;
|
||||
for(var i in items) {
|
||||
|
||||
|
||||
code = items[i].code;
|
||||
item_code = items[i].item_code;
|
||||
name = items[i].name;
|
||||
|
||||
@@ -9,7 +9,8 @@ $(document).ready(function() {
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 25
|
||||
});
|
||||
|
||||
$('#order-detail-slimscroll').slimScroll({
|
||||
@@ -18,7 +19,18 @@ $(document).ready(function() {
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 25
|
||||
});
|
||||
|
||||
$('#menu-slimscroll').slimScroll({
|
||||
height: height-$('#menu-slimscroll').attr('data-height'),
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 25
|
||||
});
|
||||
|
||||
// $('.delete').click(function(){
|
||||
|
||||
@@ -9,12 +9,37 @@
|
||||
//= require bootstrap-notify/bootstrap-notify.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require fileinput.min
|
||||
//= require cable
|
||||
//= require turbolinks
|
||||
//= require BSBMaterial/turbolink_admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
|
||||
|
||||
$(document).on('turbolinks:load', function() {
|
||||
|
||||
$("#customer_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
browseClass: "btn btn-success",
|
||||
browseLabel: "Pick Image",
|
||||
browseIcon: "<i class=\"fa fa-image\"></i> ",
|
||||
removeClass: "btn btn-danger",
|
||||
removeLabel: "Delete",
|
||||
removeIcon: "<i class=\"fa fa-trash\"></i> ",
|
||||
showUpload: false,
|
||||
// uploadClass: "btn btn-info",
|
||||
// uploadLabel: "Upload",
|
||||
// uploadIcon: "<i class=\"fa fa-upload\"></i> ",
|
||||
previewTemplates: {
|
||||
image: '<div class="file-preview-frame" id="{previewId}" data-fileindex="{fileindex}">\n' +
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('turbolinks:load', function() {
|
||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||
format: 'DD-MM-YYYY - HH:mm',
|
||||
@@ -224,7 +249,7 @@ function setCommPorts(comPortLists) {
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type+"/payment/others_payment";
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -298,7 +323,7 @@ function resCBPay(resMsg,card_sale_trans_id,cmd_type,payment_type,bnk_bill_amoun
|
||||
if(jobj.STATUS == "Approved"){
|
||||
$.ajax({type: "POST",
|
||||
url: "/origami/payment/"+payment_type,
|
||||
data: "amount="+ bnk_bill_amount + "&sale_id="+ sale_id,
|
||||
data: "amount="+ bnk_bill_amount + "&sale_id="+ sale_id + "&ref_no=" + jobj.REFNUM,
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
@@ -317,6 +342,8 @@ function resCBPay(resMsg,card_sale_trans_id,cmd_type,payment_type,bnk_bill_amoun
|
||||
}else{
|
||||
if(payment_type!="master"){
|
||||
payment_type = payment_type.toUpperCase();
|
||||
}else{
|
||||
payment_type = "Master";
|
||||
}
|
||||
swal({
|
||||
title: 'Oops',
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@import "reset";
|
||||
@import "fileinput.min";
|
||||
|
||||
.sx-margin-0 {
|
||||
margin: 0 !important;
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
background-color: #2790a5;
|
||||
}
|
||||
|
||||
.active_tab{
|
||||
border-style: solid;
|
||||
border-color: #2790a5;
|
||||
}
|
||||
|
||||
.login-page {
|
||||
margin: 0% auto;
|
||||
background-color: #2790a5;
|
||||
@@ -75,3 +80,13 @@
|
||||
background-color: #fff;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.p-card{
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.p-name{
|
||||
padding-bottom: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -198,6 +198,18 @@ select.form-control {
|
||||
background-color: blue !important;
|
||||
}
|
||||
|
||||
.selected-payment {
|
||||
color: #fff !important;
|
||||
background-color: blue !important;
|
||||
}
|
||||
.payment_btn {
|
||||
white-space: normal !important;
|
||||
margin-bottom: 15px;
|
||||
margin-right: 15px;
|
||||
color:#fff !important;
|
||||
# background-color: green !important;
|
||||
}
|
||||
|
||||
/* Reciept Style */
|
||||
#order-charges-table td {
|
||||
border-top: none !important;
|
||||
@@ -314,7 +326,7 @@ tr.discount-item-row:hover {
|
||||
position: relative;
|
||||
left: 42%;
|
||||
top: 30%;
|
||||
background-color: #d9534f;
|
||||
background-color: #32ad1a;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
width: 200px;
|
||||
@@ -396,3 +408,27 @@ i.logout_icon{
|
||||
color: #fff !important;
|
||||
background-color: #5DADE2 !important;
|
||||
}
|
||||
|
||||
/* Start Is Member Modal */
|
||||
#is_memberModal .modal-body {
|
||||
height: 260px !important;
|
||||
}
|
||||
|
||||
#is_memberModal .btn {
|
||||
width: 80%;
|
||||
}
|
||||
/* End Is Member Modal */
|
||||
|
||||
/* Start iframe */
|
||||
iframe {
|
||||
border: none;
|
||||
overflow: hidden !important;
|
||||
width: 400px;
|
||||
height: 550px;
|
||||
}
|
||||
|
||||
#pdfModal .btn {
|
||||
width: 150%;
|
||||
height: 100%;
|
||||
}
|
||||
/* End iframe */
|
||||
Reference in New Issue
Block a user