From 67b4cf870ea68f9688240de206bfab46f3b138f8 Mon Sep 17 00:00:00 2001 From: Zin Moe Date: Mon, 8 Jun 2020 09:53:48 +0630 Subject: [PATCH] place expire warning in top --- app/assets/stylesheets/BSBMaterial/style.css | 4 +-- app/models/license.rb | 4 +-- app/views/layouts/CRM.html.erb | 4 +-- app/views/layouts/OQS.html.erb | 2 +- app/views/layouts/application.html.erb | 2 +- app/views/layouts/inventory.html.erb | 2 +- app/views/layouts/origami.html.erb | 4 +-- app/views/layouts/waiter.html.erb | 2 +- app/views/oqs/home/index.html.erb | 2 +- app/views/origami/addorders/detail.html.erb | 2 +- app/views/origami/cash_ins/new.html.erb | 2 +- app/views/origami/cash_outs/new.html.erb | 2 +- app/views/origami/discounts/index.html.erb | 2 +- app/views/origami/home/index.html.erb | 2 +- app/views/origami/home/show.html.erb | 2 +- .../origami/order_reservation/index.html.erb | 2 +- .../origami/other_charges/index.html.erb | 4 +-- app/views/origami/payments/show.html.erb | 2 +- .../origami/pending_order/index.html.erb | 2 +- app/views/origami/pending_order/show.html.erb | 2 +- app/views/origami/shifts/show.html.erb | 2 +- app/views/origami/surveys/_form.html.erb | 2 +- app/views/renew_license/expire.html.erb | 28 ++++++++++----- .../shared/_license_expire_warning.html.erb | 34 ++++++++++++++++--- config/license.yml | 18 +++++----- 25 files changed, 84 insertions(+), 50 deletions(-) diff --git a/app/assets/stylesheets/BSBMaterial/style.css b/app/assets/stylesheets/BSBMaterial/style.css index a4620cf5..004439e9 100755 --- a/app/assets/stylesheets/BSBMaterial/style.css +++ b/app/assets/stylesheets/BSBMaterial/style.css @@ -11,7 +11,7 @@ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); border: none; position: fixed; - top: 0; + /*top: 0;*/ left: 0; z-index: 12; width: 100%; } @@ -6649,7 +6649,7 @@ fieldset[disabled] .form-control { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); border: none; position: fixed; - top: 0; + /*top: 0;*/ left: 0; z-index: 12; width: 100%; } diff --git a/app/models/license.rb b/app/models/license.rb index 5335d6c4..92781a22 100755 --- a/app/models/license.rb +++ b/app/models/license.rb @@ -159,12 +159,12 @@ class License Rails.logger.debug "License Remote Response - " + response.parsed_response.to_s if (@varified["status"]) if old_renewable_date.to_date == @varified['renewable_date'].to_date - message = "*** License couldn't be verified. ***" + message = "*** License can't be verified. ***" status = 2 elsif old_renewable_date.to_date < @varified['renewable_date'].to_date update_license("renewable_date", @varified['renewable_date']) status = 1 - message = "*** License could be verified. ***" + message = "*** License con be verified. ***" end return status, message diff --git a/app/views/layouts/CRM.html.erb b/app/views/layouts/CRM.html.erb index 063080d5..5c2fc4b7 100755 --- a/app/views/layouts/CRM.html.erb +++ b/app/views/layouts/CRM.html.erb @@ -31,6 +31,7 @@

Please wait...

+ <%= render 'shared/license_expire_warning' %>
@@ -59,8 +60,7 @@

<% end %> <% end %> - <% end %> - <%= render 'shared/license_expire_warning' %> + <% end %> <%= yield %> diff --git a/app/views/layouts/OQS.html.erb b/app/views/layouts/OQS.html.erb index b8a3058d..c4d18cab 100755 --- a/app/views/layouts/OQS.html.erb +++ b/app/views/layouts/OQS.html.erb @@ -35,6 +35,7 @@

Please wait...

+ <%= render 'shared/license_expire_warning' %>
@@ -53,7 +54,6 @@ <%= message %> <% end %> - <%= render 'shared/license_expire_warning' %> <%= yield %> \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4b30ef25..44d3c36a 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -32,6 +32,7 @@

Please wait...

+ <%= render 'shared/license_expire_warning' %>
@@ -57,7 +58,6 @@ data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >

<% end %> - <%= render 'shared/license_expire_warning' %> <%= yield %> diff --git a/app/views/layouts/inventory.html.erb b/app/views/layouts/inventory.html.erb index 4a117634..9d52575f 100755 --- a/app/views/layouts/inventory.html.erb +++ b/app/views/layouts/inventory.html.erb @@ -31,6 +31,7 @@

Please wait...

+ <%= render 'shared/license_expire_warning' %>
@@ -52,7 +53,6 @@ <% end %> <% end %> - <%= render 'shared/license_expire_warning' %> <%= yield %> diff --git a/app/views/layouts/origami.html.erb b/app/views/layouts/origami.html.erb index c3ada661..398fc691 100755 --- a/app/views/layouts/origami.html.erb +++ b/app/views/layouts/origami.html.erb @@ -31,6 +31,7 @@

Please wait...

+ <%= render 'shared/license_expire_warning' %>
@@ -60,8 +61,7 @@ data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >

<% end %> - <%= render 'shared/license_expire_warning' %> - <%= yield %> + <%= yield %> \ No newline at end of file diff --git a/app/views/layouts/waiter.html.erb b/app/views/layouts/waiter.html.erb index 6ecfda70..885f9594 100755 --- a/app/views/layouts/waiter.html.erb +++ b/app/views/layouts/waiter.html.erb @@ -14,6 +14,7 @@ + <%= render 'shared/license_expire_warning' %> <%= render 'layouts/header' %>
<% flash.each do |type, message| %> @@ -22,7 +23,6 @@ <%= message %>
<% end %> - <%= render 'shared/license_expire_warning' %> <%= yield %> diff --git a/app/views/oqs/home/index.html.erb b/app/views/oqs/home/index.html.erb index e767bafe..c7b52bb8 100644 --- a/app/views/oqs/home/index.html.erb +++ b/app/views/oqs/home/index.html.erb @@ -1,5 +1,5 @@ -
+
diff --git a/app/views/origami/addorders/detail.html.erb b/app/views/origami/addorders/detail.html.erb index 27d13860..c0e3a61d 100644 --- a/app/views/origami/addorders/detail.html.erb +++ b/app/views/origami/addorders/detail.html.erb @@ -4,7 +4,7 @@ <% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%> <% modify_order = request.path_info.include?('modify_order')%> -
+
diff --git a/app/views/origami/cash_ins/new.html.erb b/app/views/origami/cash_ins/new.html.erb index 5b23656e..675a82c4 100755 --- a/app/views/origami/cash_ins/new.html.erb +++ b/app/views/origami/cash_ins/new.html.erb @@ -1,4 +1,4 @@ -
+

<%= t :cash_in %>

diff --git a/app/views/origami/cash_outs/new.html.erb b/app/views/origami/cash_outs/new.html.erb index ea83b2e0..f31feb62 100755 --- a/app/views/origami/cash_outs/new.html.erb +++ b/app/views/origami/cash_outs/new.html.erb @@ -1,4 +1,4 @@ -
+

<%= t :cash_out %>

diff --git a/app/views/origami/discounts/index.html.erb b/app/views/origami/discounts/index.html.erb index 5d24c9d1..2fa34e8c 100755 --- a/app/views/origami/discounts/index.html.erb +++ b/app/views/origami/discounts/index.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index 39c33749..a583e659 100755 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 8e3c3b18..c6bdfca3 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index 4355c06a..dcc6af33 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -1,6 +1,6 @@ <%= stylesheet_link_tag 'order_reservation', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'order_reservation', 'data-turbolinks-track': 'reload' %> -
+
<% pending_count = 0 diff --git a/app/views/origami/other_charges/index.html.erb b/app/views/origami/other_charges/index.html.erb index 886eda51..06208b2f 100755 --- a/app/views/origami/other_charges/index.html.erb +++ b/app/views/origami/other_charges/index.html.erb @@ -1,4 +1,4 @@ -
+
@@ -202,7 +202,7 @@ <%else%> <%end%> - +
diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 6ed4044e..c9795298 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/pending_order/index.html.erb b/app/views/origami/pending_order/index.html.erb index 903c13a5..fe8ba72f 100644 --- a/app/views/origami/pending_order/index.html.erb +++ b/app/views/origami/pending_order/index.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/pending_order/show.html.erb b/app/views/origami/pending_order/show.html.erb index 73ee0040..9ad89797 100644 --- a/app/views/origami/pending_order/show.html.erb +++ b/app/views/origami/pending_order/show.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/shifts/show.html.erb b/app/views/origami/shifts/show.html.erb index a752e5b5..ec529e8c 100755 --- a/app/views/origami/shifts/show.html.erb +++ b/app/views/origami/shifts/show.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/origami/surveys/_form.html.erb b/app/views/origami/surveys/_form.html.erb index 8bc99b8b..40e52db6 100755 --- a/app/views/origami/surveys/_form.html.erb +++ b/app/views/origami/surveys/_form.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/renew_license/expire.html.erb b/app/views/renew_license/expire.html.erb index 67e9fe1a..d29c5923 100644 --- a/app/views/renew_license/expire.html.erb +++ b/app/views/renew_license/expire.html.erb @@ -8,13 +8,24 @@ text = "Your license will expire in #{day}." end %> +
- -
+
-

Renew Your License

+

Review Your License

<%= link_to origami_dashboard_url do %> <% end %> @@ -51,11 +62,10 @@
- +
- <%= link_to 'Home', origami_dashboard_url, class: 'btn btn-primary btn-lg' %> - <%= link_to 'Renew License', renew_url, class: 'btn btn-primary btn-lg float-right m-l-5 m-r-5' %> - + <%= link_to 'Review License', renew_url, class: 'btn btn-primary btn-lg float-right m-l-10 m-r-5' %> + <%= link_to 'Go To Home', origami_dashboard_url, class: 'btn btn-default btn-lg float-right' %>
@@ -64,9 +74,9 @@ diff --git a/app/views/shared/_license_expire_warning.html.erb b/app/views/shared/_license_expire_warning.html.erb index 0949aff7..a1292d4c 100644 --- a/app/views/shared/_license_expire_warning.html.erb +++ b/app/views/shared/_license_expire_warning.html.erb @@ -10,12 +10,38 @@ end %> <% if license_status == 0 || license_status == 2 %> -