diff --git a/.idea/.generators b/.idea/.generators
index 16189766..98526fe7 100644
--- a/.idea/.generators
+++ b/.idea/.generators
@@ -5,4 +5,4 @@ You are allowed to:
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--->
+-->
diff --git a/.idea/sxrestaurant.iml b/.idea/sxrestaurant.iml
index 6c1240f7..53fef9e5 100644
--- a/.idea/sxrestaurant.iml
+++ b/.idea/sxrestaurant.iml
@@ -52,7 +52,6 @@
-
@@ -66,7 +65,6 @@
-
@@ -82,7 +80,7 @@
-
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1c0d6110..705b1a97 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,10 +3,17 @@
+
-
-
+
+
+
+
+
+
+
+
@@ -21,7 +28,7 @@
-
+
@@ -48,55 +55,85 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -136,12 +173,8 @@
-
-
-
-
@@ -181,12 +214,16 @@
-
-
-
+
+
+
+
+
+
+
@@ -211,6 +248,7 @@
+
@@ -258,14 +296,22 @@
-
-
+
+
+
+
+
+
+
+
+
+
@@ -297,6 +343,14 @@
+
+
+
+
+
+
+
+
@@ -702,12 +756,12 @@
-
+
-
+
@@ -719,20 +773,20 @@
-
+
-
+
-
+
-
+
-
+
@@ -750,40 +804,11 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -970,14 +995,6 @@
-
-
-
-
-
-
-
-
@@ -994,14 +1011,6 @@
-
-
-
-
-
-
-
-
@@ -1102,26 +1111,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1130,14 +1119,6 @@
-
-
-
-
-
-
-
-
@@ -1162,5 +1143,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
index 91e29a6e..93b245eb 100644
--- a/Gemfile
+++ b/Gemfile
@@ -34,7 +34,7 @@ gem 'simple_form'
gem 'nested_form'
gem 'bootstrap', '~> 4.0.0.alpha3'
gem 'tether-rails'
-gem "font-awesome-rails"
+gem 'font-awesome-rails', '~> 4.7', '>= 4.7.0.2'
gem 'rack-cors'
# image upload
@@ -53,7 +53,6 @@ gem 'to_xls-rails'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
-gem 'jquery-datatables-rails', '~> 3.4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
@@ -112,13 +111,8 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'httparty', '~> 0.15.5'
-gem 'momentjs-rails', :git => 'git://github.com/derekprior/momentjs-rails.git'
-gem 'bootstrap-daterangepicker-rails'
-# # gem 'momentjs-rails', '>= 2.9.0'
-# gem 'bootstrap3-datetimepicker-rails'
-# gem 'momentjs-rails', '>= 2.9.0'
-# gem 'bootstrap3-datetimepicker-rails'
-gem 'datetimepicker-rails', github: 'zpaulovics/datetimepicker-rails', branch: 'master', submodules: true
-gem 'bootstrap-datepicker-rails'
+gem 'momentjs-rails' # for date-range selector
+gem 'bootstrap-daterangepicker-rails' # date-range picker
+gem 'bootstrap-datepicker-rails' # date picker
gem 'jquery-datetimepicker-rails'
-gem 'select2-rails'
+gem 'select2-rails' # for multi-select and auto-complete select box
diff --git a/Gemfile.lock b/Gemfile.lock
index b567932e..b2a6e59c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,19 +1,3 @@
-GIT
- remote: git://github.com/derekprior/momentjs-rails.git
- revision: ea58a20b7b2c901831dd01f34e0054ef6c75bde8
- specs:
- momentjs-rails (2.17.1)
- railties (>= 3.1)
-
-GIT
- remote: https://github.com/zpaulovics/datetimepicker-rails.git
- revision: 36d21cec5da7f5b214925804f60e63c61c747023
- branch: master
- submodules: true
- specs:
- datetimepicker-rails (4.7.16)
- momentjs-rails (>= 2.9.0)
-
GEM
remote: https://rubygems.org/
specs:
@@ -107,11 +91,6 @@ GEM
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
- jquery-datatables-rails (3.4.0)
- actionpack (>= 3.1)
- jquery-rails
- railties (>= 3.1)
- sass-rails
jquery-datetimepicker-rails (2.4.1.0)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
@@ -144,6 +123,8 @@ GEM
mime-types-data (3.2016.0521)
mini_portile2 (2.2.0)
minitest (5.10.3)
+ momentjs-rails (2.17.1)
+ railties (>= 3.1)
multi_json (1.12.1)
multi_xml (0.6.0)
mysql2 (0.4.6)
@@ -286,20 +267,18 @@ DEPENDENCIES
coffee-rails (~> 4.2)
cups (~> 0.0.7)
database_cleaner
- datetimepicker-rails!
factory_girl_rails (~> 4.0)
faker
filterrific
- font-awesome-rails
+ font-awesome-rails (~> 4.7, >= 4.7.0.2)
httparty (~> 0.15.5)
jbuilder (~> 2.5)
- jquery-datatables-rails (~> 3.4.0)
jquery-datetimepicker-rails
jquery-rails
jquery-ui-rails
kaminari (~> 1.0.1)
listen (~> 3.0.5)
- momentjs-rails!
+ momentjs-rails
mysql2 (>= 0.3.18, < 0.5)
nested_form
pg
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 87ca5d6d..b1879bba 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -20,13 +20,10 @@
//= require settings/processing_items
//= require jquery-ui
//= require bootstrap-datepicker
-//= require jquery.datetimepicker
-//= require dataTables/jquery.dataTables
//= require moment
//= require daterangepicker
//= require select2
-//= require bootstrap-datetimepicker
-//= require pickers
+//= require jquery.datetimepicker
$(document).on('turbolinks:load', function() {
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 1cc201dd..4aabe81b 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -4,11 +4,9 @@
@import "theme";
@import "jquery-ui";
@import "bootstrap-datepicker3";
-@import "jquery.datetimepicker";
-@import "dataTables/jquery.dataTables";
@import "daterangepicker-bs3";
@import "select2";
-@import "bootstrap-datetimepicker";
+@import "jquery.datetimepicker";
/* Show it is fixed to the top */
// body {
diff --git a/app/controllers/origami/in_juties_controller.rb b/app/controllers/origami/in_juties_controller.rb
index 5903ace3..6ac04659 100644
--- a/app/controllers/origami/in_juties_controller.rb
+++ b/app/controllers/origami/in_juties_controller.rb
@@ -12,7 +12,6 @@ class Origami::InJutiesController < BaseOrigamiController
@table = DiningFacility.find(params[:table_id])
@in_juty = InJuty.new
@juties_in = Kaminari.paginate_array(@juty_in).page(params[:page]).per(10)
-
end
# GET /in_juties/1
# GET /in_juties/1.json
@@ -60,10 +59,10 @@ class Origami::InJutiesController < BaseOrigamiController
def create_for_in_juty
@in_juty = InJuty.new
- @in_juty.dinning_id = in_juty_params[:dinning_id]
- @in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
- @in_juty.in_time = in_juty_params[:in_time]
- @in_juty.out_time = in_juty_params[:out_time]
+ @in_juty.dinning_id = in_juty_params[:dinning_id]
+ @in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
+ @in_juty.in_time = in_juty_params[:in_time]
+ @in_juty.out_time = in_juty_params[:out_time]
respond_to do |format|
@@ -75,7 +74,7 @@ class Origami::InJutiesController < BaseOrigamiController
format.json { render json: @in_juty.errors, status: :unprocessable_entity }
end
end
-
+
end
# PATCH/PUT /in_juties/1
@@ -93,9 +92,9 @@ class Origami::InJutiesController < BaseOrigamiController
end
- def update_for_in_juty
- @in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
- @in_juty.in_time = in_juty_params[:in_time]
+ def update_for_in_juty
+ @in_juty.commissioner_ids = in_juty_params[:commissioner_ids]
+ @in_juty.in_time = in_juty_params[:in_time]
@in_juty.out_time = in_juty_params[:out_time]
respond_to do |format|
if @in_juty.save
@@ -121,7 +120,7 @@ class Origami::InJutiesController < BaseOrigamiController
def destroy_in_juty
@table_id = params[:table_id]
@in_juty.destroy
-
+
respond_to do |format|
format.html { redirect_to origami_index_in_juty_path(@table_id), notice: 'In juty was successfully destroyed.' }
format.json { head :no_content }
diff --git a/app/views/origami/in_juties/_assign_in_juty.html.erb b/app/views/origami/in_juties/_assign_in_juty.html.erb
index 81af7d29..62531529 100644
--- a/app/views/origami/in_juties/_assign_in_juty.html.erb
+++ b/app/views/origami/in_juties/_assign_in_juty.html.erb
@@ -1,46 +1,43 @@
-<%= simple_form_for @in_juty,:url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
-
- <%= f.error_notification %>
- <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
-
-
+<%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
+
+ <%= f.error_notification %>
+ <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
- <%= f.hidden_field :dinning_id,:value => @table.id, :class => "form-control col-md-6 " %>
+
+
+ <%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %>
+
+ Dining Name:
+ <%= @table.name %>
+
+
+
+ Commissioner Name:
+ <%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
+
+
+ <%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %>
+
+ <%= f.input :out_time, :placeholder => "From Date", :class => "form-control" %>
+
+
+
+
+ <%= f.button :submit, "Create", :class => 'btn btn-primary ', :id => 'create' %>
+ <%= f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
+ <%= f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>
+
-
Dining Name:
- <%= @table.name %>
-
-
-
-
Commissioner Name:
- <%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
-
- <%= f.input :in_time, :placeholder => "From Date" , :class => "form-control", :as => :datetime_picker%>
-
- <%= f.input :out_time, :placeholder => "From Date" , :class => "form-control", :as => :datetime_picker%>
-
-
-
- <%= f.button :submit, "Create",:class => 'btn btn-primary ', :id => 'create' %>
- <%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update' %>
- <%= f.button :button, "Reset",:class => 'btn btn-danger ', :id => 'reset' %>
-
-
<% end %>
\ No newline at end of file
+
diff --git a/app/views/origami/in_juties/index_in_juty.html.erb b/app/views/origami/in_juties/index_in_juty.html.erb
index 2ac1048e..bbb9912b 100644
--- a/app/views/origami/in_juties/index_in_juty.html.erb
+++ b/app/views/origami/in_juties/index_in_juty.html.erb
@@ -1,5 +1,5 @@
-
+
@@ -16,74 +16,67 @@
<% @juties_in.each do |in_juty| %>
-
-
+
+
<%= in_juty.dining_facility.name rescue '-' %>
<%= in_juty.commissioner.name rescue '-' %>
<%= in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %>
<%= in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %>
- <%= link_to 'Destroy', origami_destroy_in_juty_path(in_juty.dining_facility.id,in_juty),method: :delete, data: {confirm: 'Are you sure?'} %>
+ <%= link_to 'Destroy', origami_destroy_in_juty_path(in_juty.dining_facility.id, in_juty), method: :delete, data: {confirm: 'Are you sure?'} %>
<% end %>
<%= paginate @juties_in %>
-
+
- <%= render 'assign_in_juty', in_juty: @in_juty ,table: @table %>
+ <%= render 'assign_in_juty', in_juty: @in_juty, table: @table %>
-Back
+ Back
\ No newline at end of file
+
diff --git a/app/views/settings/promotions/new.html.erb b/app/views/settings/promotions/new.html.erb
index c7748bb6..321aa4d1 100644
--- a/app/views/settings/promotions/new.html.erb
+++ b/app/views/settings/promotions/new.html.erb
@@ -13,5 +13,4 @@
$("#promotion_promo_code").val(Math.random().toString(36).slice(5) + Math.random().toString(36).slice(5));
// $( "#fromtime" ).timepicker();
// $( "#totime" ).timepicker({ 'scrollDefault': 'now' });
-$('#scrollDefaultExample').timepicker({ 'scrollDefault': 'now' });
diff --git a/dump.rdb b/dump.rdb
index dfef99fa..332310c7 100644
Binary files a/dump.rdb and b/dump.rdb differ