diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index f9661398..ae6d1c12 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -21,7 +21,8 @@ //= require settings/processing_items //= require momentjs/moment //= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker -//= require bootstrap-select/js/bootstrap-select +//= require bootstrap/js/bootstrap.js +//= require multi-select/js/jquery.multi-select.js //= require jquery-slimscroll/jquery.slimscroll.js //= require node-waves/waves.js //= require sweetalert/sweetalert.min.js @@ -36,7 +37,7 @@ $(document).on('turbolinks:load', function() { - + $('.datetimepicker').bootstrapMaterialDatePicker({ format: 'DD-MM YYYY - HH:mm', clearButton: true, @@ -58,20 +59,6 @@ $(document).on('turbolinks:load', function() { }); -function showConfirmMessage() { - swal({ - title: "Information", - text: "You will not be able to recover this imaginary file!", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "OK", - closeOnConfirm: true - }, function () { - swal("Deleted!", "Your imaginary file has been deleted.", "success"); - }); -} - $(function(){ $('body').bootstrapMaterialDesign(); @@ -137,13 +124,12 @@ $(function(){ }); $('.delete').click(function(){ - var method = $(this).attr('data-method'); - var url = $(this).attr('data-ref'); - var html = $( this ).siblings( "#delete_text" ).html(); - console.log(html); + 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: html_text, type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index dc8a3c65..d2e6eadb 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -3,9 +3,8 @@ @import "node-waves/waves"; @import "animate-css/animate"; @import "sweetalert/sweetalert.css"; -@import "multi-select/css/multi-select"; +@import "multi-select/css/multi-select.css"; @import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker"; -@import "bootstrap-select/css/bootstrap-select"; @import "morrisjs/morris"; @import "fileinput.min"; @import "BSBMaterial/style"; @@ -62,7 +61,7 @@ } section.content { - margin: 50px 15px 0 225px; + margin: 60px 15px 0 225px; } .sidebar { @@ -81,10 +80,6 @@ section.content { top: 50px; } -.nav-tabs li a.active { - color: #000 !important; -} - .info-box { margin-bottom: 20px; } @@ -106,8 +101,8 @@ section.content { } .btn { - padding: .46875rem 0.25rem; - color : #fff !important; + padding: .46875rem 0.25rem; + color : #fff !important; } .btn-default, .bg-default{ color : #111 !important; @@ -148,7 +143,43 @@ section.content { 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; +} /* End Reset Theme */ /* *************************************************** */ diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index 49e7af6e..40c20afc 100644 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -68,8 +68,7 @@ class Api::OrdersController < Api::ApiController if booking.dining_facility_id.to_i == params[:table_id].to_i && booking.booking_status != 'moved' if !booking.sale_id.nil? sale_status = check_order_with_booking(booking) - # puts "WWwwWWWWWWww" - # puts sale_status + if sale_status return return_json_status_with_code(400, "bill requested") end @@ -79,8 +78,7 @@ class Api::OrdersController < Api::ApiController end else sale_status = check_order_with_table(params[:table_id]) - # puts "OOOOOOOOO" - # puts sale_status + if sale_status return return_json_status_with_code(400, "bill requested") end @@ -88,8 +86,7 @@ class Api::OrdersController < Api::ApiController end #booking exists else sale_status = check_order_with_table(params[:table_id]) - # puts "MMMMMMMM" - # puts sale_status + if sale_status # return false , @message = "bill requested" return return_json_status_with_code(400, "bill requested") diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index c9479d2d..a1b797a5 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -9,7 +9,7 @@ -
+
diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index c07e0830..4527f7cf 100644 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -1,18 +1,17 @@
- -
- - - -
+
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index d3774135..3f48ac92 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -2,13 +2,10 @@
- -
-
- - -
-
- <% @complete.each do |sale| %> -
-
- <%= sale.receipt_no %> - <%= sale.sale_status %> +
+ +
+
+ <% @complete.each do |sale| %> +
+
+ <%= sale.receipt_no %> + <%= sale.sale_status %> +
-
- <% end %> + <% end %> +
-
- -
-
- <% @tables.each do |table| %> - <% if table.status == 'occupied' %> + +
+
+ <% @tables.each do |table| %> + <% if table.status == 'occupied' %> - <% if table.get_booking.nil? %> -
-
- <%= table.name %> - billed -
+ <% if table.get_booking.nil? %> +
+
+ <%= table.name %> + billed +
+
-
- <% else %> -
-
- <%= table.name %> - new + <% else %> +
+
+ <%= table.name %> + new +
+ <% end %> + <% else %> +
+
+ <%= table.name %> + new
- <% end %> - <% else %> -
-
- <%= table.name %> - new
-
- <% end %> - <% end %> + <% end %> + <% end %> +
-
- -
-
- <% @rooms.each do |room| %> - <% if room.status == 'occupied' %> + +
+
+ <% @rooms.each do |room| %> + <% if room.status == 'occupied' %> -
-
- <%= room.name %> - <% if room.get_booking.nil? %> - billed - <% else %> - new - <% end %> +
+
+ <%= room.name %> + <% if room.get_booking.nil? %> + billed + <% else %> + new + <% end %> +
-
- <% else %> -
-
- <%= room.name %> - + <% else %> +
+
+ <%= room.name %> + +
-
- <% end %> - <% end %> + <% end %> + <% end %> +
-
- -
-
- <% @orders.each do |order| %> -
-
- <%= order.order_id %> + +
+
+ <% @orders.each do |order| %> +
+
+ <%= order.order_id %> +
-
- <% end %> + <% end %> +
-
diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index d04ab835..5128e6f5 100644 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -20,7 +20,7 @@
-
+
diff --git a/app/views/settings/employees/_form.html.erb b/app/views/settings/employees/_form.html.erb index 345a71aa..0a6986e9 100644 --- a/app/views/settings/employees/_form.html.erb +++ b/app/views/settings/employees/_form.html.erb @@ -1,5 +1,3 @@ - -
<%= simple_form_for([:settings,@employee]) do |f| %> @@ -7,7 +5,7 @@
<%= f.input :name %> - <%= f.input :role, :collection => Lookup.collection_of("employee_roles") %> + <%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %> <%= f.input :emp_id, :as => :integer, :label => "Employee Numberic ID (*Unique)" %> <%= f.input :password %> diff --git a/app/views/settings/employees/edit.html.erb b/app/views/settings/employees/edit.html.erb index 156b0224..dae34a31 100644 --- a/app/views/settings/employees/edit.html.erb +++ b/app/views/settings/employees/edit.html.erb @@ -9,5 +9,4 @@
- <%= render 'form', employee: @employee %> diff --git a/app/views/settings/employees/new.html.erb b/app/views/settings/employees/new.html.erb index e6757ffc..f3c59410 100644 --- a/app/views/settings/employees/new.html.erb +++ b/app/views/settings/employees/new.html.erb @@ -9,5 +9,4 @@
- <%= render 'form', employee: @employee %> \ No newline at end of file