From 46ad87314aa73ad0e847ccca07b7faa65a7321dc Mon Sep 17 00:00:00 2001 From: Phyo Date: Mon, 26 Jun 2017 14:39:25 +0630 Subject: [PATCH] Add color blue to orders --- app/assets/stylesheets/origami.scss | 4 ++ app/views/origami/home/index.html.erb | 21 ++++++++--- app/views/origami/home/show.html.erb | 34 ++++++++++------- app/views/origami/room_invoices/show.html.erb | 4 +- app/views/origami/rooms/show.html.erb | 37 +++++++++++-------- .../origami/table_invoices/show.html.erb | 4 +- 6 files changed, 64 insertions(+), 40 deletions(-) diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 3606dadc..8c478a1a 100644 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -160,6 +160,10 @@ background-color: #FF8C00 } +.blue{ + background-color: blue +} + .left{ margin-left:1px; } diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index e28717e3..5888bb3e 100644 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -38,12 +38,21 @@
<% @tables.each do |table| %> <% if table.status == 'occupied' %> -
-
- Zone <%= table.zone_id %>
- Table <%= table.name %> ( <%= table.seater %> Seat ) -
-
+ <% if table.get_booking.nil? %> +
+
+ Zone <%= table.zone_id %>
+ Table <%= table.name %> ( <%= table.seater %> Seat ) +
+
+ <% else %> +
+
+ Zone <%= table.zone_id %>
+ Table <%= table.name %> ( <%= table.seater %> Seat ) +
+
+ <% end %> <% else %>
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index c25c1b2f..9eacac99 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -38,16 +38,22 @@
<% @tables.each do |table| %> <% if table.status == 'occupied' %> -
-
- <%= table.name %> - <% if table.get_booking.nil? %> - billed - <% else %> - new - <% end %> -
-
+ <% if table.get_booking.nil? %> +
+
+ <%= table.name %> + billed +
+
+
+ <% else %> +
+
+ <%= table.name %> + new +
+
+ <% end %> <% else %>
@@ -108,9 +114,9 @@
<% if @status_order == 'order' && @status_sale != 'sale' %> -
ORDER DETAILS
+
ORDER DETAILS | Table <%= @dining.name rescue "" %>
<% elsif @status_sale == 'sale' %> -
INVOICE DETAILS
+
INVOICE DETAILS | Table <%= @dining.name rescue "" %>
<% end %>
@@ -129,8 +135,8 @@
- -

Customer : <%= @customer.name %>

+ +

Customer : <%= @customer.name rescue "" %>

diff --git a/app/views/origami/room_invoices/show.html.erb b/app/views/origami/room_invoices/show.html.erb index 46e9a892..7ea799ae 100644 --- a/app/views/origami/room_invoices/show.html.erb +++ b/app/views/origami/room_invoices/show.html.erb @@ -35,8 +35,8 @@
- -

Customer : <%= @customer.name %>

+ +

Customer : <%= @customer.name rescue "" %>

diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 381edb25..6fa61bd8 100644 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -38,16 +38,21 @@
<% @tables.each do |table| %> <% if table.status == 'occupied' %> -
-
- <%= table.name %> - <% if table.get_booking.nil? %> - billed - <% else %> - new - <% end %> -
-
+ <% if table.get_booking.nil? %> +
+
+ <%= table.name %> + billed +
+
+ <% else %> +
+
+ <%= table.name %> + new +
+
+ <% end %> <% else %>
@@ -108,9 +113,9 @@
<% if @status == 'order' %> -
ORDER DETAILS
+
ORDER DETAILS | Table <%= @room.name rescue "" %>
<% elsif @status_sale == 'sale' %> -
INVOICE DETAILS
+
INVOICE DETAILS | Table <%= @room.name rescue "" %>
<% end %>
@@ -258,28 +263,28 @@ $(document).ready(function(){ $(".tables").on('click', function(){ var customer_id=$(".customer-id").text(); show_customer_details(customer_id); - + var dining_id = $(this).attr("data-id"); window.location.href = '/origami/table/' + dining_id; }) $(".sales").on('click',function(){ var customer_id=$(".customer-id").text(); show_customer_details(customer_id); - + var sale_id = $(this).attr("data-id"); window.location.href = '/origami/sale/' + sale_id; }) $(".rooms").on('click', function(){ var customer_id=$(".customer-id").text(); show_customer_details(customer_id); - + var dining_id = $(this).attr("data-id"); window.location.href = '/origami/room/' + dining_id; }) $(".orders").on('click',function(){ var customer_id=$(".customer-id").text(); show_customer_details(customer_id); - + var order_id = $(this).attr("data-id"); window.location.href = '/origami/order/' + order_id; }) diff --git a/app/views/origami/table_invoices/show.html.erb b/app/views/origami/table_invoices/show.html.erb index 065c7f8d..ee66f9a3 100644 --- a/app/views/origami/table_invoices/show.html.erb +++ b/app/views/origami/table_invoices/show.html.erb @@ -35,8 +35,8 @@
- -

Customer : <%= @customer.name %>

+ +

Customer : <%= @customer.name rescue "" %>