Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -41,8 +41,7 @@ authorize_resource :class => false
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
from, to = get_date_range_from_params
|
from, to = get_date_range_from_params
|
||||||
puts from
|
|
||||||
puts to
|
|
||||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
|
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||||
|
|
||||||
date_arr = Array.new
|
date_arr = Array.new
|
||||||
|
|||||||
@@ -83,20 +83,24 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
|
|
||||||
var to_date = new Date($('#to').val());
|
from = $("#from").val();
|
||||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
to = $("#to").val();
|
||||||
var from_date = new Date($('#from').val());
|
|
||||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
|
||||||
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|||||||
@@ -149,20 +149,24 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
|
|
||||||
var to_date = new Date($('#to').val());
|
from = $("#from").val();
|
||||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
to = $("#to").val();
|
||||||
var from_date = new Date($('#from').val());
|
|
||||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
|
||||||
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|||||||
@@ -151,22 +151,25 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
|
|
||||||
var to_date = new Date($('#to').val());
|
from = $("#from").val();
|
||||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
to = $("#to").val();
|
||||||
var from_date = new Date($('#from').val());
|
|
||||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
|
||||||
$('#from').val(from)
|
|
||||||
$('#to').val(to)
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -253,19 +253,23 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
var to_date = new Date($('#to').val());
|
from = $("#from").val();
|
||||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
to = $("#to").val();
|
||||||
var from_date = new Date($('#from').val());
|
|
||||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -151,20 +151,24 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
|
|
||||||
var to_date = new Date($('#to').val());
|
from = $("#from").val();
|
||||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
to = $("#to").val();
|
||||||
var from_date = new Date($('#from').val());
|
|
||||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
|
||||||
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|||||||
@@ -105,19 +105,23 @@
|
|||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#from').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
$('#to').val(date)
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
var to_date = new Date($('#to').val());
|
from = $("#from").val();
|
||||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
to = $("#to").val();
|
||||||
var from_date = new Date($('#from').val());
|
|
||||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user