inventory definition.coffee
This commit is contained in:
@@ -9,14 +9,16 @@
|
||||
//
|
||||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
|
||||
//= require jquery
|
||||
//= require tether
|
||||
//= require bootstrap
|
||||
//= require bootstrap/js/popper.min
|
||||
//= require bootstrap/js/bootstrap-material-design.min
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require cable
|
||||
//= require jquery-ui
|
||||
//= require bootstrap-datepicker
|
||||
//= require bootstrap/modal
|
||||
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require BSBMaterial/admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
|
||||
@@ -12,10 +12,17 @@
|
||||
//
|
||||
//= require jquery
|
||||
//= require tether
|
||||
//= require bootstrap
|
||||
//= require bootstrap/js/popper.min
|
||||
//= require bootstrap/js/bootstrap-material-design.min
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require cable
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require BSBMaterial/admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
@@ -34,54 +34,11 @@
|
||||
//= require BSBMaterial/admin.js
|
||||
//= require BSBMaterial/pages/index.js
|
||||
//= require BSBMaterial/demo.js
|
||||
|
||||
|
||||
$(document).on('turbolinks:load', function() {
|
||||
|
||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||
format: 'DD-MM YYYY - HH:mm',
|
||||
clearButton: true,
|
||||
weekStart: 1
|
||||
});
|
||||
|
||||
$('.datepicker').bootstrapMaterialDatePicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
clearButton: true,
|
||||
weekStart: 1,
|
||||
time: false
|
||||
});
|
||||
|
||||
$('.timepicker').bootstrapMaterialDatePicker({
|
||||
format: 'HH:mm',
|
||||
clearButton: true,
|
||||
date: false
|
||||
});
|
||||
|
||||
});
|
||||
//= require select2
|
||||
//= require custom.js
|
||||
|
||||
$(function(){
|
||||
|
||||
$('body').bootstrapMaterialDesign();
|
||||
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
||||
|
||||
$('#custom-slimscroll').slimScroll({
|
||||
height: height,
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
$('#order-detail-slimscroll').slimScroll({
|
||||
height: height-180,
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
// Image Upload
|
||||
$("#simple_menu_item_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
@@ -123,54 +80,6 @@ $(function(){
|
||||
}
|
||||
});
|
||||
|
||||
$('.delete').click(function(){
|
||||
var method = $(this).attr('data-method');
|
||||
var url = $(this).attr('data-ref');
|
||||
var html_text = $( this ).siblings( "#delete_text" ).html();
|
||||
swal({
|
||||
title: "Confirmation",
|
||||
text: html_text,
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
html: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
$.ajax({
|
||||
type: method,
|
||||
url: url ,
|
||||
success: function(data) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.dddddddd').click(function(){
|
||||
var currentForm = $(this).closest("form");
|
||||
bootbox.confirm({
|
||||
title: 'Confirmation',
|
||||
message: $('#delete_text').html(),
|
||||
buttons: {
|
||||
'cancel': {
|
||||
label: 'No',
|
||||
className: 'btn green col-md-4 pull-left'
|
||||
},
|
||||
'confirm': {
|
||||
label: 'Yes',
|
||||
className: 'btn red col-md-4 pull-right'
|
||||
}
|
||||
},
|
||||
callback: function(result) {
|
||||
if (result) {
|
||||
currentForm.submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on("focus", "[data-behaviour~='datepicker']", function(e){
|
||||
|
||||
50
app/assets/javascripts/custom.js
Normal file
50
app/assets/javascripts/custom.js
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
$(function(){
|
||||
|
||||
$('body').bootstrapMaterialDesign();
|
||||
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
||||
|
||||
$('#custom-slimscroll').slimScroll({
|
||||
height: height,
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
$('#order-detail-slimscroll').slimScroll({
|
||||
height: height-180,
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
$('.delete').click(function(){
|
||||
var method = $(this).attr('data-method');
|
||||
var url = $(this).attr('data-ref');
|
||||
var html_text = $( this ).siblings( "#delete_text" ).html();
|
||||
swal({
|
||||
title: "Confirmation",
|
||||
text: html_text,
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
html: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
$.ajax({
|
||||
type: method,
|
||||
url: url ,
|
||||
success: function(data) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
13
app/assets/javascripts/inventory.js
Normal file
13
app/assets/javascripts/inventory.js
Normal file
@@ -0,0 +1,13 @@
|
||||
//= require jquery
|
||||
//= require tether
|
||||
//= require bootstrap/js/popper.min
|
||||
//= require bootstrap/js/bootstrap-material-design.min
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require BSBMaterial/admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
//= require select2
|
||||
@@ -1,12 +1,15 @@
|
||||
//= require jquery
|
||||
//= require tether
|
||||
//= require bootstrap
|
||||
//= require bootstrap/js/popper.min
|
||||
//= require bootstrap/js/bootstrap-material-design.min
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require cable
|
||||
//= require jquery-ui
|
||||
//= require bootstrap-datepicker
|
||||
//= require jquery.datetimepicker
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require BSBMaterial/admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
|
||||
$(document).ready(function(){
|
||||
// auto refresh every 60 seconds
|
||||
@@ -19,7 +22,7 @@ $(document).ready(function(){
|
||||
order_status = $(".selected-item").children().find(".orders-order-status").text().substr(0,6).trim();
|
||||
|
||||
// Enable/Disable Button
|
||||
control_button(order_status);
|
||||
//control_button(order_status);
|
||||
|
||||
$(".orders").on('click', function(){
|
||||
$("#order-sub-total").text('');
|
||||
@@ -35,7 +38,7 @@ $(document).ready(function(){
|
||||
var order_status=$(this).find(".orders-order-status").text().trim();
|
||||
|
||||
// Enable/Disable Button
|
||||
control_button(order_status);
|
||||
//control_button(order_status);
|
||||
|
||||
var customer_id=$(this).find(".customer-id").text();
|
||||
show_customer_details(customer_id);
|
||||
@@ -110,7 +113,7 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
// Bill Request
|
||||
$('#request_bills').click(function() {
|
||||
/*$('#request_bills').click(function() {
|
||||
var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
if(order_id!=""){
|
||||
window.location.href = '/origami/' + order_id + '/request_bills'
|
||||
@@ -119,52 +122,52 @@ $(document).ready(function(){
|
||||
alert("Please select an order!");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});*/
|
||||
|
||||
// Discount for Payment
|
||||
$('#discount').click(function() {
|
||||
var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
// $('#discount').click(function() {
|
||||
// var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
|
||||
if(order_id!=""){
|
||||
window.location.href = '/origami/' + order_id + '/discount'
|
||||
}
|
||||
else {
|
||||
alert("Please select an order!");
|
||||
}
|
||||
// if(order_id!=""){
|
||||
// window.location.href = '/origami/' + order_id + '/discount'
|
||||
// }
|
||||
// else {
|
||||
// alert("Please select an order!");
|
||||
// }
|
||||
|
||||
return false;
|
||||
});
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// Pay Discount for Payment
|
||||
$("#pay-discount").on('click', function(e){
|
||||
e.preventDefault();
|
||||
var sale_id = $('#sale-id').text();
|
||||
var sale_item_id = $('.selected-item').attr('id').substr(0,16);
|
||||
var sub_total = $('#order-sub-total').text();
|
||||
var grand_total = $('#order-grand-total').text();
|
||||
var discount_type = $('#discount-type').val();
|
||||
var discount_value = $('#discount-amount').val();
|
||||
var discount_amount = discount_value;
|
||||
var ajax_url = "/origami/" + sale_id + "/discount";
|
||||
// $("#pay-discount").on('click', function(e){
|
||||
// e.preventDefault();
|
||||
// var sale_id = $('#sale-id').text();
|
||||
// var sale_item_id = $('.selected-item').attr('id').substr(0,16);
|
||||
// var sub_total = $('#order-sub-total').text();
|
||||
// var grand_total = $('#order-grand-total').text();
|
||||
// var discount_type = $('#discount-type').val();
|
||||
// var discount_value = $('#discount-amount').val();
|
||||
// var discount_amount = discount_value;
|
||||
// var ajax_url = "/origami/" + sale_id + "/discount";
|
||||
|
||||
if(sale_item_id != null){
|
||||
ajax_url = "/origami/" + sale_item_id + "/discount";
|
||||
sub_total = $("#"+sale_item_id).children().find("#item-total-price").text();
|
||||
}
|
||||
// if(sale_item_id != null){
|
||||
// ajax_url = "/origami/" + sale_item_id + "/discount";
|
||||
// sub_total = $("#"+sale_item_id).children().find("#item-total-price").text();
|
||||
// }
|
||||
|
||||
// For Percentage Discount
|
||||
if(discount_type == 1){
|
||||
discount_amount=(sub_total*discount_value)/100;
|
||||
}
|
||||
// // For Percentage Discount
|
||||
// if(discount_type == 1){
|
||||
// discount_amount=(sub_total*discount_value)/100;
|
||||
// }
|
||||
|
||||
var params = {'sale_id': sale_id, 'sale_item_id': sale_item_id, 'grand_total' : grand_total, 'discount_type':discount_type, 'discount_value':discount_value, 'discount_amount':discount_amount};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: params,
|
||||
success:function(result){ }
|
||||
});
|
||||
});
|
||||
// var params = {'sale_id': sale_id, 'sale_item_id': sale_item_id, 'grand_total' : grand_total, 'discount_type':discount_type, 'discount_value':discount_value, 'discount_amount':discount_amount};
|
||||
// $.ajax({
|
||||
// type: "POST",
|
||||
// url: ajax_url,
|
||||
// data: params,
|
||||
// success:function(result){ }
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
// Payment for Bill
|
||||
@@ -180,118 +183,118 @@ $(document).ready(function(){
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#customer').click(function() {
|
||||
var sale = $(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
if (sale.substring(0, 3)=="SAL") {
|
||||
var sale_id = sale
|
||||
}else{
|
||||
var sale_id = $(".selected-item").find(".order-cid").text();
|
||||
}
|
||||
window.location.href = '/origami/'+ sale_id + "/customers"
|
||||
// $('#customer').click(function() {
|
||||
// var sale = $(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
// if (sale.substring(0, 3)=="SAL") {
|
||||
// var sale_id = sale
|
||||
// }else{
|
||||
// var sale_id = $(".selected-item").find(".order-cid").text();
|
||||
// }
|
||||
// window.location.href = '/origami/'+ sale_id + "/customers"
|
||||
|
||||
return false;
|
||||
});
|
||||
// return false;
|
||||
// });
|
||||
|
||||
$('#re-print').click(function() {
|
||||
var sale_id = $(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
// $('#re-print').click(function() {
|
||||
// var sale_id = $(".selected-item").find(".orders-id").text().substr(0,16);
|
||||
|
||||
window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||
// window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||
|
||||
return false;
|
||||
});
|
||||
// return false;
|
||||
// });
|
||||
|
||||
function show_customer_details(customer_id){
|
||||
// function show_customer_details(customer_id){
|
||||
|
||||
if(window.location.pathname.substring(0, 12) == "/origami/SAL"){
|
||||
var url = customer_id+"/get_customer/"
|
||||
}else{
|
||||
var url = "origami/"+customer_id+"/get_customer/"
|
||||
}
|
||||
// if(window.location.pathname.substring(0, 12) == "/origami/SAL"){
|
||||
// var url = customer_id+"/get_customer/"
|
||||
// }else{
|
||||
// var url = "origami/"+customer_id+"/get_customer/"
|
||||
// }
|
||||
|
||||
$('.customer_detail').removeClass('hide');
|
||||
// $('.customer_detail').removeClass('hide');
|
||||
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
$("#customer_name").text(data["customer"].name);
|
||||
if (data["response_data"]["data"].length) {
|
||||
$.each(data["response_data"]["data"], function (i) {
|
||||
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
|
||||
var balance = data["response_data"]["data"][i]["balance"];
|
||||
if (data["response_data"]["status"]==true) {
|
||||
$('.rebate_amount').removeClass('hide');
|
||||
row =
|
||||
'<td class="charges-name">' + data["response_data"]["data"][i]["accountable_type"] +'</td>'
|
||||
+'<td class="item-attr">' + balance + '</td>';
|
||||
// //Start Ajax
|
||||
// $.ajax({
|
||||
// type: "GET",
|
||||
// url: url,
|
||||
// data: {},
|
||||
// dataType: "json",
|
||||
// success: function(data) {
|
||||
// $("#customer_name").text(data["customer"].name);
|
||||
// if (data["response_data"]["data"].length) {
|
||||
// $.each(data["response_data"]["data"], function (i) {
|
||||
// if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
|
||||
// var balance = data["response_data"]["data"][i]["balance"];
|
||||
// if (data["response_data"]["status"]==true) {
|
||||
// $('.rebate_amount').removeClass('hide');
|
||||
// row =
|
||||
// '<td class="charges-name">' + data["response_data"]["data"][i]["accountable_type"] +'</td>'
|
||||
// +'<td class="item-attr">' + balance + '</td>';
|
||||
|
||||
$(".rebate_amount").html(row);
|
||||
}
|
||||
// $(".rebate_amount").html(row);
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('.rebate_amount').addClass('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
//End Ajax
|
||||
}
|
||||
// }
|
||||
// });
|
||||
// }else{
|
||||
// $('.rebate_amount').addClass('hide');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// //End Ajax
|
||||
// }
|
||||
|
||||
/* For Receipt - Calculate discount or tax */
|
||||
$('.cashier_number').on('click', function(event){
|
||||
if(event.handled !== true) {
|
||||
var original_value=0;
|
||||
original_value = $('#discount-amount').val();
|
||||
// $('.cashier_number').on('click', function(event){
|
||||
// if(event.handled !== true) {
|
||||
// var original_value=0;
|
||||
// original_value = $('#discount-amount').val();
|
||||
|
||||
var input_type = $(this).attr("data-type");
|
||||
// var input_type = $(this).attr("data-type");
|
||||
|
||||
switch (input_type) {
|
||||
case 'num':
|
||||
var input_value = $(this).attr("data-value");
|
||||
if (original_value == "0.0"){
|
||||
$('#discount-amount').val(input_value);
|
||||
update_balance();
|
||||
}
|
||||
else{
|
||||
$('#discount-amount').val(original_value + '' + input_value);
|
||||
update_balance();
|
||||
}
|
||||
break;
|
||||
// switch (input_type) {
|
||||
// case 'num':
|
||||
// var input_value = $(this).attr("data-value");
|
||||
// if (original_value == "0.0"){
|
||||
// $('#discount-amount').val(input_value);
|
||||
// update_balance();
|
||||
// }
|
||||
// else{
|
||||
// $('#discount-amount').val(original_value + '' + input_value);
|
||||
// update_balance();
|
||||
// }
|
||||
// break;
|
||||
|
||||
case 'add':
|
||||
var input_value = $(this).attr("data-value");
|
||||
amount = parseInt(input_value);
|
||||
$('#discount-amount').val(amount);
|
||||
$('#discount-type').val(1);
|
||||
update_balance();
|
||||
break;
|
||||
// case 'add':
|
||||
// var input_value = $(this).attr("data-value");
|
||||
// amount = parseInt(input_value);
|
||||
// $('#discount-amount').val(amount);
|
||||
// $('#discount-type').val(1);
|
||||
// update_balance();
|
||||
// break;
|
||||
|
||||
case 'del' :
|
||||
var discount_text=$('#discount-amount').val();
|
||||
$('#discount-amount').val(discount_text.substr(0,discount_text.length-1));
|
||||
update_balance();
|
||||
break;
|
||||
// case 'del' :
|
||||
// var discount_text=$('#discount-amount').val();
|
||||
// $('#discount-amount').val(discount_text.substr(0,discount_text.length-1));
|
||||
// update_balance();
|
||||
// break;
|
||||
|
||||
case 'clr':
|
||||
$('#discount-amount').val("0.0");
|
||||
update_balance();
|
||||
break;
|
||||
}
|
||||
// case 'clr':
|
||||
// $('#discount-amount').val("0.0");
|
||||
// update_balance();
|
||||
// break;
|
||||
// }
|
||||
|
||||
event.handled = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
// event.handled = true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
|
||||
$('.discount-item-row').on('click',function(){
|
||||
$('.discount-item-row').removeClass('selected-item');
|
||||
$(this).addClass('selected-item');
|
||||
});
|
||||
// $('.discount-item-row').on('click',function(){
|
||||
// $('.discount-item-row').removeClass('selected-item');
|
||||
// $(this).addClass('selected-item');
|
||||
// });
|
||||
|
||||
// $(".orders").on('click', function(){
|
||||
// var dining_id = $(this).attr("data-id");
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
@import "bootstrap";
|
||||
@import "font-awesome";
|
||||
@import "theme";
|
||||
@import "jquery-ui";
|
||||
@import "bootstrap-datepicker3";
|
||||
@import "bootstrap/modal";
|
||||
|
||||
/* Show it is fixed to the top */
|
||||
// body {
|
||||
// min-height: 75rem;
|
||||
// padding-top: 4.5rem;
|
||||
// }
|
||||
//@import "bootstrap";
|
||||
//@import "font-awesome";
|
||||
//@import "theme";
|
||||
//@import "jquery-ui";
|
||||
//@import "bootstrap-datepicker3";
|
||||
//@import "bootstrap/modal";
|
||||
@import "tether";
|
||||
@import "bootstrap/css/bootstrap-material-design.min";
|
||||
@import "node-waves/waves";
|
||||
@import "animate-css/animate";
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "multi-select/css/multi-select.css";
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "morrisjs/morris";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@import "reset";
|
||||
|
||||
.selected-item {
|
||||
color: #fff !important;
|
||||
@@ -45,14 +50,7 @@
|
||||
.jconfirm-box-container{
|
||||
margin-left:-40px !important
|
||||
}
|
||||
.card-columns {
|
||||
@include media-breakpoint-only(lg) {
|
||||
column-count: 5;
|
||||
}
|
||||
@include media-breakpoint-only(xl) {
|
||||
column-count: 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#sxModal {
|
||||
display: none;
|
||||
@@ -93,4 +91,5 @@
|
||||
width: 480px;
|
||||
height: 375px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
@import "bootstrap";
|
||||
@import "font-awesome";
|
||||
@import "theme";
|
||||
|
||||
/* Show it is fixed to the top */
|
||||
// body {
|
||||
// min-height: 75rem;
|
||||
// padding-top: 4.5rem;
|
||||
// }
|
||||
@import "tether";
|
||||
@import "bootstrap/css/bootstrap-material-design.min";
|
||||
@import "node-waves/waves";
|
||||
@import "animate-css/animate";
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "morrisjs/morris";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@import "reset";
|
||||
.order-completed {
|
||||
background-color: #CCFFDD;
|
||||
}
|
||||
|
||||
@@ -9,476 +9,7 @@
|
||||
@import "fileinput.min";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
|
||||
/* Start Reset Theme */
|
||||
.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col-auto, .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-auto, .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md-auto, .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-auto {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.col-lg-1, .col-md-1, .col-sm-1,col-xl-1{
|
||||
padding-left: 5px ;
|
||||
padding-right: 5px ;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0.1rem 1rem;
|
||||
}
|
||||
|
||||
.navbar-header {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
padding-top: 0rem;
|
||||
padding-bottom: 0rem;
|
||||
}
|
||||
|
||||
.navbar-brand-txt {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.navbar-right a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar-right a.dropdown-toggle {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.switch label {
|
||||
color: #070707 !important;
|
||||
}
|
||||
|
||||
.ls-closed .bars:after, .ls-closed .bars:before {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
}
|
||||
|
||||
section.content {
|
||||
margin: 60px 15px 0 225px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 210px;
|
||||
height: calc(100vh - 50px);
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
right: 250px;
|
||||
}
|
||||
|
||||
.right-sidebar {
|
||||
width: 240px;
|
||||
height: calc(100vh - 50px);
|
||||
position: fixed;
|
||||
right: -260px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
.info-box {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card .card-header {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.card .card-title{
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
|
||||
.card .card-block {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: .46875rem 0.25rem;
|
||||
color : #fff !important;
|
||||
}
|
||||
.btn-default, .bg-default{
|
||||
color : #111 !important;
|
||||
}
|
||||
.checkbox label, label.checkbox-inline {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
|
||||
position: relative;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin: 5px 5px 0 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
.sidebar .menu .list .header {
|
||||
background: #eee;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
font-size:0.87rem;
|
||||
}
|
||||
|
||||
.list-group-item{
|
||||
padding:0.75rem 1rem;
|
||||
}
|
||||
.btn:not(.btn-link):not(.btn-circle) span {
|
||||
position: relative;
|
||||
top: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.nav {
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav > li > a {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.nav-tabs > li {
|
||||
float: left;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.nav-tabs li a.active {
|
||||
color: #000 !important;
|
||||
border-bottom: 2px solid #2196F3 !important;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
|
||||
color: #555;
|
||||
cursor: default;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.nav-tabs > li > a {
|
||||
margin-right: 2px;
|
||||
line-height: 1.42857143;
|
||||
text-decoration:none;
|
||||
}
|
||||
.nav-tabs .nav-link {
|
||||
padding: 0.7286em .8575em;
|
||||
}
|
||||
|
||||
.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
|
||||
opacity:0 !important;
|
||||
margin-right:15px;
|
||||
}
|
||||
/* End Reset Theme */
|
||||
/* *************************************************** */
|
||||
|
||||
.hidden{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/***************** Start Origami CSS *************************/
|
||||
/* Reset */
|
||||
.table {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
height: inherit !important;
|
||||
}
|
||||
|
||||
.form-horizontal .form-group {
|
||||
margin-right: 0px !important;
|
||||
}
|
||||
|
||||
.card-columns {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
/* End Reset */
|
||||
/*
|
||||
.dining {
|
||||
min-height:470px;
|
||||
max-height:570px;
|
||||
overflow:auto
|
||||
}
|
||||
|
||||
.order-info {
|
||||
min-height:300px;
|
||||
max-height:500px;
|
||||
overflow:auto
|
||||
}
|
||||
*/
|
||||
.others-payment{
|
||||
line-height:100px;
|
||||
text-align:center;
|
||||
color:white;
|
||||
width:300px;
|
||||
height:100px;
|
||||
font-size:18px;
|
||||
}
|
||||
|
||||
.orders-table {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cashier_number{
|
||||
width: 33%;
|
||||
height:70px;
|
||||
line-height:70px;
|
||||
text-align:center;
|
||||
background:#54A5AF;
|
||||
// float:left;
|
||||
// margin:2px;
|
||||
font-size:20px;
|
||||
color:white;
|
||||
// cursor:pointer;
|
||||
}
|
||||
|
||||
.border-left{
|
||||
border-left:1px solid #fff;
|
||||
}
|
||||
|
||||
.del_cashier_number{
|
||||
opacity:0.6,
|
||||
}
|
||||
|
||||
.pay{
|
||||
width: 98%;
|
||||
height:211px;
|
||||
line-height:211px;
|
||||
text-align:center;
|
||||
font-size:20px;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.payment{
|
||||
height:70px;line-height:70px;
|
||||
align:center;
|
||||
color:white;
|
||||
font-size:16px;
|
||||
margin-top:5px;
|
||||
}
|
||||
|
||||
.font-12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.cash-color{
|
||||
background-color:#80CBC4;
|
||||
}
|
||||
|
||||
.credit-color{
|
||||
background-color:#FFCCBC;
|
||||
}
|
||||
|
||||
.other-payment-color{
|
||||
background-color:#E1BEE7;
|
||||
}
|
||||
|
||||
.cashier_number:hover{
|
||||
background:#A9F5F2;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
white-space: normal !important;
|
||||
height: 60px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.radius-btn {
|
||||
border-radius:5px;
|
||||
color:#fff;
|
||||
background-color:red;
|
||||
}
|
||||
|
||||
.bottom-5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.fluid {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.style2 {
|
||||
border-top: 3px double #8c8b8b;
|
||||
}
|
||||
|
||||
.long{
|
||||
width:49%;
|
||||
}
|
||||
|
||||
.sold {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.paid {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.selected-item {
|
||||
color: #fff !important;
|
||||
background-color: blue !important;
|
||||
}
|
||||
|
||||
.selected-account {
|
||||
color: #fff !important;
|
||||
background-color: blue !important;
|
||||
}
|
||||
|
||||
/* Reciept Style */
|
||||
#order-charges-table td {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.charges-name {
|
||||
width: 80%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
width: 60%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.item-attr {
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item-attr-edit{
|
||||
width: 10%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.display-none{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.text-white{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Colors */
|
||||
.purple {
|
||||
background-color:#7a62d3;
|
||||
}
|
||||
|
||||
.orange{
|
||||
background-color:#FF7F50;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color:#ff0000;
|
||||
}
|
||||
|
||||
.green{
|
||||
background-color: #009900;
|
||||
}
|
||||
|
||||
.orange{
|
||||
background-color: #FF8C00;
|
||||
}
|
||||
|
||||
.blue{
|
||||
background-color: blue;
|
||||
}
|
||||
|
||||
/* End Colors */
|
||||
|
||||
.left{
|
||||
margin-left:1px;
|
||||
}
|
||||
|
||||
.bottom{
|
||||
margin-bottom: 1px;
|
||||
margin-left:-10px ;
|
||||
margin-right:-10px;
|
||||
}
|
||||
|
||||
/* Discount */
|
||||
|
||||
.discount-item-row {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tr.discount-item-row:hover {
|
||||
background-color: #e3e3e3 !important;
|
||||
}
|
||||
.required abbr{
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
#sxModal {
|
||||
display: none;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1100;
|
||||
}
|
||||
|
||||
#sxModal-Content {
|
||||
position: relative;
|
||||
left: 42%;
|
||||
top: 30%;
|
||||
background-color: #d9534f;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding-top: 5%;
|
||||
border-radius: 100px;
|
||||
z-index: 1101;
|
||||
}
|
||||
|
||||
/*Loading gif for payment*/
|
||||
|
||||
#loading_wrapper{
|
||||
position: fixed;
|
||||
background-color: #C8C8C8 ;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
opacity: 0.6;
|
||||
top: 0;
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
#loading{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-image: url('../../../image/loading-ajax.gif');
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100); /* ie */
|
||||
-moz-opacity: 1; /* mozilla */
|
||||
|
||||
}
|
||||
/***********************End Origami CSS ************************/
|
||||
@import "reset";
|
||||
|
||||
/*----- Order Processing Items -----*/
|
||||
.opi_ul {
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
@import "bootstrap";
|
||||
@import "font-awesome";
|
||||
@import "theme";
|
||||
@import "jquery-ui";
|
||||
@import "bootstrap-datepicker3";
|
||||
@import "tether";
|
||||
@import "bootstrap/css/bootstrap-material-design.min";
|
||||
@import "node-waves/waves";
|
||||
@import "animate-css/animate";
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "multi-select/css/multi-select.css";
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "morrisjs/morris";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@import "reset";
|
||||
@import "select2";
|
||||
@import "jquery.datetimepicker";
|
||||
|
||||
|
||||
/* Show it is fixed to the top */
|
||||
// body {
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
/*
|
||||
@import "bootstrap";
|
||||
@import "font-awesome";
|
||||
@import "theme";
|
||||
@import "jquery-ui";
|
||||
@import "bootstrap-datepicker3";
|
||||
|
||||
@import "jquery.datetimepicker";
|
||||
*/
|
||||
|
||||
@import "tether";
|
||||
@import "bootstrap/css/bootstrap-material-design.min";
|
||||
@import "node-waves/waves";
|
||||
@import "animate-css/animate";
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "multi-select/css/multi-select.css";
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "morrisjs/morris";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@import "reset";
|
||||
|
||||
/* Show it is fixed to the top */
|
||||
// body {
|
||||
// min-height: 75rem;
|
||||
// padding-top: 4.5rem;
|
||||
// }
|
||||
|
||||
/* Reset */
|
||||
.table {
|
||||
@@ -237,11 +245,8 @@ tr.discount-item-row:hover {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
/* Jquery Confirm */
|
||||
|
||||
.jconfirm-box-container{
|
||||
margin-left:-40px !important;
|
||||
margin-top:-40px !important;
|
||||
.border-left{
|
||||
border-left:1px solid #fff;
|
||||
}
|
||||
|
||||
#sxModal {
|
||||
|
||||
182
app/assets/stylesheets/reset.css
Normal file
182
app/assets/stylesheets/reset.css
Normal file
@@ -0,0 +1,182 @@
|
||||
/* Start Reset Theme */
|
||||
.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col-auto, .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-auto, .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md-auto, .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-auto {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.col-lg-1, .col-md-1, .col-sm-1,col-xl-1{
|
||||
padding-left: 5px ;
|
||||
padding-right: 5px ;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0.1rem 1rem;
|
||||
}
|
||||
|
||||
.navbar-header {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
padding-top: 0rem;
|
||||
padding-bottom: 0rem;
|
||||
}
|
||||
|
||||
.navbar-brand-txt {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.navbar-right a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar-right a.dropdown-toggle {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.switch label {
|
||||
color: #070707 !important;
|
||||
}
|
||||
|
||||
.ls-closed .bars:after, .ls-closed .bars:before {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
}
|
||||
|
||||
section.content {
|
||||
margin: 70px 15px 0 225px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 210px;
|
||||
height: calc(100vh - 50px);
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
right: 250px;
|
||||
}
|
||||
|
||||
.right-sidebar {
|
||||
width: 240px;
|
||||
height: calc(100vh - 50px);
|
||||
position: fixed;
|
||||
right: -260px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
.info-box {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card .card-header {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.card .card-title{
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
|
||||
.card .card-block {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: .46875rem 0.25rem;
|
||||
color : #fff !important;
|
||||
}
|
||||
.btn-default, .bg-default{
|
||||
color : #111 !important;
|
||||
}
|
||||
.checkbox label, label.checkbox-inline {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
|
||||
position: relative;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin: 5px 5px 0 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
.sidebar .menu .list .header {
|
||||
background: #eee;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
font-size:0.87rem;
|
||||
}
|
||||
|
||||
.list-group-item{
|
||||
padding:0.75rem 1rem;
|
||||
}
|
||||
.btn:not(.btn-link):not(.btn-circle) span {
|
||||
position: relative;
|
||||
top: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.nav {
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav > li > a {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.nav-tabs > li {
|
||||
float: left;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.nav-tabs li a.active {
|
||||
color: #000 !important;
|
||||
border-bottom: 2px solid #2196F3 !important;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
|
||||
color: #555;
|
||||
cursor: default;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.nav-tabs > li > a {
|
||||
margin-right: 2px;
|
||||
line-height: 1.42857143;
|
||||
text-decoration:none;
|
||||
}
|
||||
.nav-tabs .nav-link {
|
||||
padding: 0.7286em .8575em;
|
||||
}
|
||||
|
||||
.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
|
||||
opacity:0 !important;
|
||||
margin-right:15px;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* End Reset Theme */
|
||||
/* *************************************************** */
|
||||
@@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base
|
||||
#all token authentication must be done here
|
||||
#response format must be set to JSON
|
||||
|
||||
#change locallization
|
||||
def set_locale
|
||||
I18n.locale = params[:locale] || I18n.default_locale
|
||||
end
|
||||
|
||||
@@ -10,6 +10,16 @@ class BaseCrmController < ActionController::Base
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
#change locallization
|
||||
def set_locale
|
||||
I18n.locale = params[:locale] || I18n.default_locale
|
||||
end
|
||||
|
||||
# RESTful url for localize
|
||||
def default_url_options
|
||||
{ locale: I18n.locale }
|
||||
end
|
||||
|
||||
def current_user
|
||||
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
|
||||
end
|
||||
|
||||
@@ -10,6 +10,16 @@ class BaseOqsController < ActionController::Base
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
#change locallization
|
||||
def set_locale
|
||||
I18n.locale = params[:locale] || I18n.default_locale
|
||||
end
|
||||
|
||||
# RESTful url for localize
|
||||
def default_url_options
|
||||
{ locale: I18n.locale }
|
||||
end
|
||||
|
||||
def current_user
|
||||
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::BookingsController < ApplicationController
|
||||
class Crm::BookingsController < BaseCrmController
|
||||
load_and_authorize_resource
|
||||
def update_booking
|
||||
booking = Booking.find(params[:booking_id])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::CustomersController < ApplicationController #BaseCrmController
|
||||
class Crm::CustomersController < BaseCrmController
|
||||
load_and_authorize_resource except: [:create]
|
||||
before_action :set_crm_customer, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::DiningQueuesController < ApplicationController #BaseCrmController
|
||||
class Crm::DiningQueuesController < BaseCrmController
|
||||
load_and_authorize_resource
|
||||
before_action :set_dining_queue, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::HomeController < ApplicationController
|
||||
class Crm::HomeController < BaseCrmController
|
||||
def index
|
||||
|
||||
@booking = Booking.all
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Inventory::InventoryController < ApplicationController#BaseInventoryController
|
||||
class Inventory::InventoryController < BaseInventoryController
|
||||
|
||||
def index
|
||||
@products = InventoryDefinition.all.active.order('created_at desc')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Inventory::InventoryDefinitionsController < ApplicationController#BaseInventoryController
|
||||
class Inventory::InventoryDefinitionsController < BaseInventoryController
|
||||
before_action :set_inventory_definition, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
# GET /inventory_definitions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Inventory::StockCheckItemsController < ApplicationController#BaseInventoryController
|
||||
class Inventory::StockCheckItemsController < BaseInventoryController
|
||||
before_action :set_stock_check_item, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
# GET /stock_check_items
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Inventory::StockChecksController < ApplicationController#BaseInventoryController
|
||||
class Inventory::StockChecksController < BaseInventoryController
|
||||
def index
|
||||
@check = StockCheck.new
|
||||
@inventory_definitions = InventoryDefinition.active.all
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Oqs::EditController < ApplicationController#BaseOqsController
|
||||
class Oqs::EditController < BaseOqsController
|
||||
def index
|
||||
assigned_item_id = params[:id]
|
||||
assigned_item = AssignedOrderItem.find(assigned_item_id)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Oqs::HomeController < ApplicationController#BaseOqsController
|
||||
class Oqs::HomeController < BaseOqsController
|
||||
def index
|
||||
|
||||
@queue_stations = OrderQueueStation.all
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::CardPaymentsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::CardPaymentsController < BaseOrigamiController
|
||||
def index
|
||||
@membership_rebate_balance = 0
|
||||
@membership_id = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::CashInsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::CashInsController < BaseOrigamiController
|
||||
def new
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::CreditPaymentsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::CreditPaymentsController < BaseOrigamiController
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::CustomersController < ApplicationController #BaseOrigamiController
|
||||
class Origami::CustomersController < BaseOrigamiController
|
||||
load_and_authorize_resource
|
||||
def index
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::DiscountsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::DiscountsController < BaseOrigamiController
|
||||
authorize_resource :class => false
|
||||
|
||||
#discount page show from origami index with selected order
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::HomeController < ApplicationController #BaseOrigamiController
|
||||
class Origami::HomeController < BaseOrigamiController
|
||||
before_action :set_dining, only: [:show]
|
||||
|
||||
def index
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::InDutiesController < ApplicationController #BaseOrigamiController
|
||||
class Origami::InDutiesController < BaseOrigamiController
|
||||
before_action :set_in_duty, only: %i[show edit update edit_in_duty update_for_in_duty destroy destroy_in_duty]
|
||||
|
||||
# GET /in_duties
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::JcbController < ApplicationController #BaseOrigamiController
|
||||
class Origami::JcbController < BaseOrigamiController
|
||||
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::MasterController < ApplicationController #BaseOrigamiController
|
||||
class Origami::MasterController < BaseOrigamiController
|
||||
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::MoveroomController < ApplicationController #BaseOrigamiController
|
||||
class Origami::MoveroomController < BaseOrigamiController
|
||||
|
||||
authorize_resource :class => false
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::MovetableController < ApplicationController #BaseOrigamiController
|
||||
class Origami::MovetableController < BaseOrigamiController
|
||||
|
||||
authorize_resource :class => false
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::MpuController < ApplicationController #BaseOrigamiController
|
||||
class Origami::MpuController < BaseOrigamiController
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::OrdersController < ApplicationController #BaseOrigamiController
|
||||
class Origami::OrdersController < BaseOrigamiController
|
||||
def show
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::OtherChargesController < ApplicationController #BaseOrigamiController
|
||||
class Origami::OtherChargesController < BaseOrigamiController
|
||||
authorize_resource :class => false
|
||||
|
||||
def index
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::OthersPaymentsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::OthersPaymentsController < BaseOrigamiController
|
||||
def index
|
||||
@membership_rebate_balance = 0
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::PaymentsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::PaymentsController < BaseOrigamiController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::ProductCommissionsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::ProductCommissionsController < BaseOrigamiController
|
||||
before_action :set_product_commission, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
# GET /product_commissions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::RedeemPaymentsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::RedeemPaymentsController < BaseOrigamiController
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
payment_method = params[:payment_method]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::RoomInvoicesController < ApplicationController #BaseOrigamiController
|
||||
class Origami::RoomInvoicesController < BaseOrigamiController
|
||||
def index
|
||||
@room = DiningFacility.find(params[:room_id])
|
||||
puts "room bookig lenght"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::RoomsController < ApplicationController #BaseOrigamiController
|
||||
class Origami::RoomsController < BaseOrigamiController
|
||||
def index
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::SaleEditController < ApplicationController #BaseOrigamiController
|
||||
class Origami::SaleEditController < BaseOrigamiController
|
||||
authorize_resource class: false
|
||||
# Index for sale item void OR edit
|
||||
def edit
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::TableInvoicesController < ApplicationController #BaseOrigamiController
|
||||
class Origami::TableInvoicesController < BaseOrigamiController
|
||||
def index
|
||||
@table = DiningFacility.find(params[:table_id])
|
||||
puts "table bookig lenght"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::VisaController < ApplicationController #BaseOrigamiController
|
||||
class Origami::VisaController < BaseOrigamiController
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::VoucherController < ApplicationController #BaseOrigamiController
|
||||
class Origami::VoucherController < BaseOrigamiController
|
||||
def index
|
||||
@sale_id = params[:sale_id]
|
||||
|
||||
|
||||
@@ -70,6 +70,6 @@ class Settings::CashierTerminalsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def settings_cashier_terminal_params
|
||||
params.require(:cashier_terminal).permit(:name, :is_active, :is_currently_login, :auto_print_receipt, :printer_name, :header, :footer, :font, :font_size, :show_tax, :show_cashier, :show_guest_info)
|
||||
params.require(:cashier_terminal).permit(:name, :is_active, :is_currently_login, :auto_print_receipt, :printer_name, :header, :footer, :font, :font_size, :show_tax, :show_cashier, :show_guest_info,{ zone_ids: [] })
|
||||
end
|
||||
end
|
||||
|
||||
@@ -73,11 +73,6 @@ class Settings::OrderQueueStationsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def settings_order_queue_station_params
|
||||
# <<<<<<< HEAD
|
||||
# params.require(:order_queue_station).permit(:station_name, :is_active, :auto_print, :processing_items, :print_copy, :printer_name, :font_size, :cut_per_item, :use_alternate_name, :created_by)
|
||||
# =======
|
||||
# Don't Know { zone_ids: [] }
|
||||
params.require(:order_queue_station).permit(:station_name, :is_active, :processing_items, :auto_print, :print_copy, :printer_name, :font_size, :cut_per_item, :use_alternate_name, :created_by,{ zone_ids: [] })
|
||||
# >>>>>>> b093a993ba002c92659bbb34338c55c031c11d87
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
class CashierTerminal < ApplicationRecord
|
||||
has_many :cashier_terminal_by_zones
|
||||
has_many :zones, through: :cashier_terminal_by_zones
|
||||
end
|
||||
|
||||
4
app/models/cashier_terminal_by_zone.rb
Normal file
4
app/models/cashier_terminal_by_zone.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class CashierTerminalByZone < ApplicationRecord
|
||||
belongs_to :zone
|
||||
belongs_to :cashier_terminal
|
||||
end
|
||||
@@ -2,6 +2,7 @@ class SeedGenerator < ApplicationRecord
|
||||
# Generate ID for Tables
|
||||
def self.generate_id(model, prefix)
|
||||
seed = SeedGenerator.find_by_model(model)
|
||||
next_no = seed.next
|
||||
new_receipt_no = 0
|
||||
|
||||
if (seed.nil?)
|
||||
@@ -9,18 +10,33 @@ class SeedGenerator < ApplicationRecord
|
||||
seed.model = model
|
||||
new_receipt_no = seed.next
|
||||
seed.save
|
||||
|
||||
else
|
||||
current_no = seed.next
|
||||
seed.next = seed.next + seed.increase_by
|
||||
seed.current = current_no
|
||||
seed.save
|
||||
# current_no = seed.next
|
||||
# seed.next = seed.next + seed.increase_by
|
||||
# seed.current = current_no
|
||||
# seed.save
|
||||
cur_val, next_val = self.update_seed(model, seed.next, seed.increase_by)
|
||||
|
||||
if next_no == cur_val
|
||||
puts "SSS"
|
||||
puts next_val
|
||||
cur_val2, next_val2 = self.update_seed(model, next_val, seed.increase_by)
|
||||
puts next_val2
|
||||
padding_len = 15 - prefix.length
|
||||
saleOrderId = prefix +"-"+ cur_val2.to_s.to_s.rjust((14-prefix.length)+1,'0')
|
||||
puts saleOrderId
|
||||
return saleOrderId
|
||||
end
|
||||
|
||||
padding_len = 15 - prefix.length
|
||||
saleOrderId = prefix +"-"+ cur_val.to_s.to_s.rjust((14-prefix.length)+1,'0')
|
||||
return saleOrderId
|
||||
|
||||
end
|
||||
|
||||
padding_len = 15 - prefix.length
|
||||
saleOrderId = prefix +"-"+ seed.current.to_s.to_s.rjust((14-prefix.length)+1,'0')
|
||||
return saleOrderId
|
||||
|
||||
end
|
||||
|
||||
# Generate Receipt No
|
||||
@@ -71,4 +87,24 @@ class SeedGenerator < ApplicationRecord
|
||||
next_code = prefix + seed.current.to_s.to_s.rjust((count)+1,'0')
|
||||
return next_code
|
||||
end
|
||||
|
||||
def self.update_seed(model, current, inc)
|
||||
cur_val = 0
|
||||
next_val = 0
|
||||
nex = current + inc
|
||||
|
||||
update_sql = "update seed_generators set current= #{current}, next= #{nex} where model='#{model}';";
|
||||
select_sql = "select * from seed_generators where model='#{model}';"
|
||||
update_result = ActiveRecord::Base.connection.execute(update_sql);
|
||||
|
||||
select_result = ActiveRecord::Base.connection.execute(select_sql);
|
||||
|
||||
select_result.each do |row|
|
||||
p row
|
||||
cur_val = row [3]
|
||||
next_val = row[4]
|
||||
end
|
||||
|
||||
return cur_val, next_val
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,6 +3,7 @@ class Zone < ApplicationRecord
|
||||
has_many :tables, dependent: :destroy
|
||||
has_many :rooms, dependent: :destroy
|
||||
has_many :order_queue_stations
|
||||
has_many :cashier_terminals
|
||||
|
||||
# validations
|
||||
validates_presence_of :name, :created_by
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">CRM</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">CRM</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||
<!-- <div class="main-box-body clearfix"> -->
|
||||
@@ -103,7 +103,6 @@
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
@@ -1,46 +1,43 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li>Queue</li>
|
||||
<li>Assign Queue <%=@queue.queue_no%></li>
|
||||
|
||||
</ul>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>">Queue</a></li>
|
||||
<li class="breadcrumb-item active">Assign Queue <%=@queue.queue_no%></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
|
||||
<div class="tab-content" style="max-height:670px; overflow:auto">
|
||||
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="active" id="tables" role="tabpanel">
|
||||
<div class="tab-pane" id="rooms" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 2.2rem;">
|
||||
<% @i =0 %>
|
||||
<% DiningFacility.all.each do |table| %>
|
||||
<div class="card assign_table <%= table.status=="available" ? "green" : "red"%>" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= @queue.id %></p>
|
||||
<p class="hidden queue-status"><%= table.status %></p>
|
||||
<p style="text-align: center"><%= table.name %></p>
|
||||
<p style="text-align: center">Seat : <%= table.seater %></p>
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div id="custom-slimscroll">
|
||||
<div class="tab-content">
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="active" id="tables" role="tabpanel">
|
||||
<div class="tab-pane" id="rooms" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 2.2rem;">
|
||||
<% @i =0 %>
|
||||
<% DiningFacility.all.each do |table| %>
|
||||
<div class="card assign_table <%= table.status=="available" ? "green" : "red"%>" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= @queue.id %></p>
|
||||
<p class="hidden queue-status"><%= table.status %></p>
|
||||
<p style="text-align: center"><%= table.name %></p>
|
||||
<p style="text-align: center">Seat : <%= table.seater %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<br>
|
||||
<a href="<%= crm_dining_queues_path%>" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.js"></script> -->
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="p-l-10">
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
@@ -45,12 +48,25 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= link_to 'Back', inventory_path, class: 'btn bg-default waves-effect' %>
|
||||
<%= f.button :submit, class: 'btn bg-blue wave' %>
|
||||
<%= f.submit 'Submit', class: 'btn bg-blue waves-effect' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div class="container-fluid">
|
||||
<div class="col">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= inventory_path %>">Product Inventory</a></li>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', inventory: @inventory_definition %>
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= inventory_path %>">Product Inventory</a></li>
|
||||
<li class="breadcrumb-item active">Edit</li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<%= render 'form', inventory: @inventory_definition %>
|
||||
@@ -1,34 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>SmartSales : Restaurant</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<!-- Favicon-->
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
<%= stylesheet_link_tag 'CRM', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'CRM', 'data-turbolinks-track': 'reload' %>
|
||||
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header_crm' %>
|
||||
<div class="container-fluid">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert-danger fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
|
||||
<% if !flash["errors"]%>
|
||||
<%=message%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
<%= stylesheet_link_tag 'CRM', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'CRM', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body class="theme-red">
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="preloader">
|
||||
<div class="spinner-layer pl-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!-- #END# Page Loader -->
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert-danger fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
|
||||
<% if !flash["errors"]%>
|
||||
<%=message%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,28 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>SmartSales : Restaurant</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<!-- Favicon-->
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
<%= stylesheet_link_tag 'OQS', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'OQS', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header' %>
|
||||
<div class="container-fluid">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
<%= message %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
<%= stylesheet_link_tag 'OQS', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'OQS', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body class="theme-red">
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="preloader">
|
||||
<div class="spinner-layer pl-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!-- #END# Page Loader -->
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
<%= message %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
@@ -48,10 +48,18 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= crm_customers_path %>">
|
||||
<i class="material-icons">group</i>
|
||||
<a href="javascript:void(0);" class="menu-toggle">
|
||||
<i class="material-icons">widgets</i>
|
||||
<span><%= t :crm %></span>
|
||||
</a>
|
||||
<ul class="ml-menu">
|
||||
<li>
|
||||
<a href="<%= crm_customers_path %>"><%= t :customer %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= crm_dining_queues_path %>"><%= t :queue %></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= inventory_path %>">
|
||||
|
||||
@@ -1,24 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>SmartSales : Restaurant</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<!-- Favicon-->
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||
|
||||
<%= stylesheet_link_tag 'inventory_definitions', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
<%= javascript_include_tag 'inventory', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header_inventory' %>
|
||||
<div class="container-fluid">
|
||||
<% flash.each do |type, message| %>
|
||||
<body class="theme-red">
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="preloader">
|
||||
<div class="spinner-layer pl-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Page Loader -->
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<% if !flash["errors"]%>
|
||||
<div class="alert fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
@@ -26,9 +55,9 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,23 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>SmartSales : Restaurant</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<!-- Favicon-->
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
<%= stylesheet_link_tag 'origami', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header_orgiami' %>
|
||||
<div class="container-fluid">
|
||||
<%= stylesheet_link_tag 'origami', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'origami', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body class="theme-red">
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="preloader">
|
||||
<div class="spinner-layer pl-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Page Loader -->
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<% if !flash["errors"]%>
|
||||
<div class="alert fade in">
|
||||
@@ -27,8 +56,7 @@
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :is_currently_login %>
|
||||
<%= f.input :auto_print_receipt %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox'%>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :font_size %>
|
||||
|
||||
@@ -17,7 +17,7 @@ Rails.application.config.assets.precompile += %w( login.js )
|
||||
|
||||
# --- Waiter/ Cashier - Orgiami ----
|
||||
Rails.application.config.assets.precompile += %w( origami.css )
|
||||
# Rails.application.config.assets.precompile += %w( origami.js )
|
||||
Rails.application.config.assets.precompile += %w( origami.js )
|
||||
# -- Order Queue Station -----
|
||||
Rails.application.config.assets.precompile += %w( OQS.css )
|
||||
Rails.application.config.assets.precompile += %w( OQS.js )
|
||||
@@ -48,4 +48,5 @@ Rails.application.config.assets.precompile += %w( popper.min.js )
|
||||
|
||||
# --- Inventory Definition ----
|
||||
Rails.application.config.assets.precompile += %w( inventory_definitions.css )
|
||||
Rails.application.config.assets.precompile += %w( inventory.js )
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ mm:
|
||||
oqs: "အမှာစာနေရာများ"
|
||||
origami: "အရောင်းကောင်တာ"
|
||||
crm: "စားသုံးသူကြီးကြပ်ရေး"
|
||||
customer: "စားသုံးသူကြီးကြပ်ရေး"
|
||||
queue: "စားသုံးသူကြီးကြပ်ရေး"
|
||||
inventory: "ကုန်လှောင်ရုံ"
|
||||
settings: "သတ်မှတ်ချက်များ"
|
||||
transactions: "အလုပ်ပြီးမြောက်မှု့များ"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class CreateCashierTerminalByZones < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :cashier_terminal_by_zones do |t|
|
||||
t.references :cashier_terminal, :null => false
|
||||
t.references :zone, :null => false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
spec/models/cashier_terminal_by_zone_spec.rb
Normal file
5
spec/models/cashier_terminal_by_zone_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe CashierTerminalByZone, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
Reference in New Issue
Block a user