Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant into adminbsb_material_ui
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
}
|
||||
});
|
||||
|
||||
initRealTimeChart();
|
||||
initDonutChart();
|
||||
initSparkline();
|
||||
// initRealTimeChart();
|
||||
// initDonutChart();
|
||||
// initSparkline();
|
||||
});
|
||||
|
||||
var realtime = 'on';
|
||||
|
||||
@@ -61,7 +61,7 @@ $(document).ready(function(){
|
||||
var date = new Date(data[field]["created_at"]);
|
||||
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
|
||||
|
||||
row ='<div class="card queue_station" data-date="'+data[field]["order_id"]+'">'
|
||||
row ='<div class="card queue_station animated " data-date="'+data[field]["order_id"]+'">'
|
||||
+'<div class="card-block">'
|
||||
+'<h4 class="card-title">'
|
||||
+'<span class="order-zone-type">'+data[field]["table_type"]+'- </span>'
|
||||
|
||||
@@ -1,5 +1,81 @@
|
||||
$(function(){
|
||||
//click menu sidebar menu category
|
||||
$(".product").on("click", function(){
|
||||
var url = $(this).attr('data-ref');
|
||||
show_product_list(url);
|
||||
console.log(url)
|
||||
});
|
||||
//show menu item list when click menu category
|
||||
function show_product_list(url_item){
|
||||
|
||||
var menu_list = $('.menu_items_list');
|
||||
menu_list.empty();
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url_item,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
|
||||
var menu_items_list = $('.menu_items_list');
|
||||
menu_items_list.empty();
|
||||
product = data;
|
||||
|
||||
for(var field in product) {
|
||||
console.log(product[field].name);
|
||||
if (product[field].unit_price > 0) {
|
||||
console.log("hi");
|
||||
qty = 1;
|
||||
options = [];
|
||||
item_attributes = [];
|
||||
|
||||
if (product[field].image_path) {
|
||||
image_path = product[field].image_path.url;
|
||||
}else{
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
|
||||
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
|
||||
+'<div class="custom-card-head card-head" style="line-height:14px;">'
|
||||
+'<small class="col-md-9">'+ product[field].name +'</small>'
|
||||
+"<div class='col-md-3 add_icon' data-item-code='"
|
||||
+ product[field].item_code +"' data-name='"
|
||||
+ product[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ product[field].unit_price +"' data-instance-code = '"+ product[field].item_code +"' data-instance = '"
|
||||
+ product[field].name +"' data-promotion-price = '"+ 1 +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ options +"' data-image='"+image_path+"'>"
|
||||
+"<i class='fa fa-plus '"
|
||||
+ 'style="margin-top:4px;">'
|
||||
+'</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
+"<div class='menu_item_box' data-item-code='"
|
||||
+ product[field].item_code +"' data-instance = '"
|
||||
+JSON.stringify(item_attributes)+"' data-id = '"
|
||||
+JSON.stringify(item_attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(item_attributes)+"' data-item-sets = '"
|
||||
+JSON.stringify(item_attributes)+"' data-toggle='modal' data-target='.sx_item_detailModal'>"
|
||||
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' src='"+image_path+"'>"
|
||||
+"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<small>'+ product[field].unit_price +'</small>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('.menu_items_list').append(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//end Ajax
|
||||
}
|
||||
//end show list function
|
||||
//click menu sidebar menu category
|
||||
$(".menu_category").on("click", function(){
|
||||
var menu_id = $(this).find(".menu-id").text();
|
||||
@@ -69,38 +145,38 @@ $(function(){
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
|
||||
row = '<div class="card custom-card">'
|
||||
+'<div class="custom-card-head card-head" style="line-height:14px;">'
|
||||
+'<small class="col-md-9">'+ menu_items[field].name +'</small>'
|
||||
+"<div class='col-md-3 add_icon' 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+"'>"
|
||||
+"<i class='fa "+fa_plus+" '"
|
||||
+ 'style="margin-top:4px;">'
|
||||
+'</i></div>'
|
||||
+'</div>'
|
||||
row = '<div class="card custom-card testimonial-card animated fadeInRight" style="">'
|
||||
+'<div class="custom-card-head card-head" style="line-height:14px;">'
|
||||
+'<small class="col-md-9">'+ menu_items[field].name +'</small>'
|
||||
+"<div class='col-md-3 add_icon' 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+"'>"
|
||||
+"<i class='fa "+fa_plus+" '"
|
||||
+ 'style="margin-top:4px;">'
|
||||
+'</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
+"<div class='"+menu_item_box+"' data-item-code='"
|
||||
+ menu_items[field].code +"' data-instance = '"
|
||||
+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-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"'>"
|
||||
+"<div class='"+menu_item_box+"' data-item-code='"
|
||||
+ menu_items[field].code +"' data-instance = '"
|
||||
+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-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"'>"
|
||||
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' src='"+image_path+"'>"
|
||||
+"<div class='card-block custom-card-block'>"
|
||||
+"<img id='logo' src='"+image_path+"'>"
|
||||
+"</div>"
|
||||
|
||||
+"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<small>'+ price +'</small>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<small>'+ price +'</small>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
$('.menu_items_list').append(row);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,24 +19,21 @@
|
||||
//= require turbolinks
|
||||
//= require cable
|
||||
//= require settings/processing_items
|
||||
//= require bootstrap/js/bootstrap.js
|
||||
//= require bootstrap-select/js/bootstrap-select.js
|
||||
//= require momentjs/moment
|
||||
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker
|
||||
//= require bootstrap-select/js/bootstrap-select
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require node-waves/waves.js
|
||||
//= require autosize/autosize.js
|
||||
//= require momentjs/moment.js
|
||||
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker.js
|
||||
//= require jquery-countto/jquery.countTo.js
|
||||
//= require raphael/raphael.min
|
||||
//= require morrisjs/morris
|
||||
//= require jquery-sparkline/jquery.sparkline
|
||||
//= require chartjs/Chart.bundle.js
|
||||
//= require fileinput.min
|
||||
//= require BSBMaterial/admin.js
|
||||
//= require BSBMaterial/pages/index.js
|
||||
//= require BSBMaterial/demo.js
|
||||
|
||||
|
||||
|
||||
$(document).on('turbolinks:load', function() {
|
||||
$(document).on('turbolinks:load', function() {
|
||||
// $(document).ready(function(){
|
||||
//Datetimepicker plugin
|
||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||
@@ -64,8 +61,9 @@
|
||||
});
|
||||
|
||||
|
||||
$(function(){
|
||||
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
||||
$(function(){
|
||||
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
||||
|
||||
$('#custom-slimscroll').slimScroll({
|
||||
height: height,
|
||||
size: '5px',
|
||||
@@ -74,6 +72,7 @@
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
$('#order-detail-slimscroll').slimScroll({
|
||||
height: height-180,
|
||||
size: '5px',
|
||||
@@ -82,6 +81,47 @@
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
// Image Upload
|
||||
$("#simple_menu_item_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',
|
||||
}
|
||||
});
|
||||
|
||||
$("#product_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("focus", "[data-behaviour~='datepicker']", function(e){
|
||||
@@ -94,3 +134,5 @@ function export_to(path)
|
||||
var form_params = $("#frm_report").serialize();
|
||||
window.location = path+"?"+ form_params;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
|
||||
|
||||
if (oqs_id == items[field]["order_queue_station_id"]) {
|
||||
|
||||
row ='<div class="card queue_station queue_station_box" data-date="'+items[field]["order_id"]+'">'
|
||||
row ='<div class="card queue_station animated shake queue_station_box" data-date="'+items[field]["order_id"]+'">'
|
||||
+'<strong class="hidden">'+items[field]["order_id"]+'</strong>'
|
||||
+'<div class="card-block">'
|
||||
+'<h4 class="card-title">'
|
||||
|
||||
5
app/assets/javascripts/popper.min.js
vendored
Normal file
5
app/assets/javascripts/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -9,6 +9,7 @@
|
||||
background-color: #54A5AF;
|
||||
padding:5px;
|
||||
color :#fff;
|
||||
|
||||
}
|
||||
|
||||
.custom-card {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "bootstrap-select/css/bootstrap-select";
|
||||
@import "morrisjs/morris";
|
||||
@import "fileinput.min";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
|
||||
@@ -19,6 +20,10 @@
|
||||
padding-right: 5px ;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0.1rem 1rem;
|
||||
}
|
||||
|
||||
.navbar-header {
|
||||
padding: 0px;
|
||||
}
|
||||
@@ -57,18 +62,18 @@ section.content {
|
||||
|
||||
.sidebar {
|
||||
width: 210px;
|
||||
height: calc(100vh - 55px);
|
||||
height: calc(100vh - 50px);
|
||||
position: fixed;
|
||||
top: 55px;
|
||||
top: 50px;
|
||||
right: 250px;
|
||||
}
|
||||
|
||||
.right-sidebar {
|
||||
width: 240px;
|
||||
height: calc(100vh - 55px);
|
||||
height: calc(100vh - 50px);
|
||||
position: fixed;
|
||||
right: -260px;
|
||||
top: 55px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
.nav-tabs li a.active {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
}
|
||||
|
||||
#wrapper.toggled {
|
||||
padding-left: 200px;
|
||||
padding-left: 210px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper {
|
||||
@@ -41,13 +41,14 @@
|
||||
#page-content-wrapper {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
padding: 0px;
|
||||
padding-top: 20px;
|
||||
|
||||
}
|
||||
|
||||
#wrapper.toggled #page-content-wrapper {
|
||||
position: absolute;
|
||||
margin-right: -200px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +118,7 @@
|
||||
padding-left: 0;
|
||||
}
|
||||
#wrapper.toggled {
|
||||
padding-left: 210px;
|
||||
padding-left: 209px;
|
||||
}
|
||||
#sidebar-wrapper {
|
||||
width: 0;
|
||||
@@ -126,12 +127,13 @@
|
||||
width: 216px;
|
||||
}
|
||||
#page-content-wrapper {
|
||||
padding: 0px;
|
||||
padding-top: 20px;
|
||||
position: relative;
|
||||
}
|
||||
#wrapper.toggled #page-content-wrapper {
|
||||
position: relative;
|
||||
margin-right: 0;
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
.accordion {
|
||||
|
||||
Reference in New Issue
Block a user