place expire warning in top

This commit is contained in:
Zin Moe
2020-06-08 09:53:48 +06:30
parent 5001d2f4ca
commit 67b4cf870e
25 changed files with 84 additions and 50 deletions

View File

@@ -11,7 +11,7 @@
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
border: none; border: none;
position: fixed; position: fixed;
top: 0; /*top: 0;*/
left: 0; left: 0;
z-index: 12; z-index: 12;
width: 100%; } width: 100%; }
@@ -6649,7 +6649,7 @@ fieldset[disabled] .form-control {
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
border: none; border: none;
position: fixed; position: fixed;
top: 0; /*top: 0;*/
left: 0; left: 0;
z-index: 12; z-index: 12;
width: 100%; } width: 100%; }

View File

@@ -159,12 +159,12 @@ class License
Rails.logger.debug "License Remote Response - " + response.parsed_response.to_s Rails.logger.debug "License Remote Response - " + response.parsed_response.to_s
if (@varified["status"]) if (@varified["status"])
if old_renewable_date.to_date == @varified['renewable_date'].to_date 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 status = 2
elsif old_renewable_date.to_date < @varified['renewable_date'].to_date elsif old_renewable_date.to_date < @varified['renewable_date'].to_date
update_license("renewable_date", @varified['renewable_date']) update_license("renewable_date", @varified['renewable_date'])
status = 1 status = 1
message = "*** License could be verified. ***" message = "*** License con be verified. ***"
end end
return status, message return status, message

View File

@@ -31,6 +31,7 @@
<p>Please wait...</p> <p>Please wait...</p>
</div> </div>
</div> </div>
<%= render 'shared/license_expire_warning' %>
<!-- #END# Page Loader --> <!-- #END# Page Loader -->
<!-- Overlay For Sidebars --> <!-- Overlay For Sidebars -->
<div class="overlay"></div> <div class="overlay"></div>
@@ -60,7 +61,6 @@
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
<%= render 'shared/license_expire_warning' %>
<%= yield %> <%= yield %>
</section> </section>
</body> </body>

View File

@@ -35,6 +35,7 @@
<p>Please wait...</p> <p>Please wait...</p>
</div> </div>
</div> </div>
<%= render 'shared/license_expire_warning' %>
<!-- #END# Page Loader --> <!-- #END# Page Loader -->
<!-- Overlay For Sidebars --> <!-- Overlay For Sidebars -->
<div class="overlay"></div> <div class="overlay"></div>
@@ -53,7 +54,6 @@
<%= message %> <%= message %>
</div> </div>
<% end %> <% end %>
<%= render 'shared/license_expire_warning' %>
<%= yield %> <%= yield %>
</section> </section>
</body> </body>

View File

@@ -32,6 +32,7 @@
<p>Please wait...</p> <p>Please wait...</p>
</div> </div>
</div> </div>
<%= render 'shared/license_expire_warning' %>
<!-- #END# Page Loader --> <!-- #END# Page Loader -->
<!-- Overlay For Sidebars --> <!-- Overlay For Sidebars -->
<div class="overlay"></div> <div class="overlay"></div>
@@ -57,7 +58,6 @@
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" > data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p> </p>
<% end %> <% end %>
<%= render 'shared/license_expire_warning' %>
<%= yield %> <%= yield %>
</section> </section>
</body> </body>

View File

@@ -31,6 +31,7 @@
<p>Please wait...</p> <p>Please wait...</p>
</div> </div>
</div> </div>
<%= render 'shared/license_expire_warning' %>
<!-- #END# Page Loader --> <!-- #END# Page Loader -->
<!-- Overlay For Sidebars --> <!-- Overlay For Sidebars -->
<div class="overlay"></div> <div class="overlay"></div>
@@ -52,7 +53,6 @@
<% end %> <% end %>
<% end %> <% end %>
<%= render 'shared/license_expire_warning' %>
<%= yield %> <%= yield %>
</section> </section>
</body> </body>

View File

@@ -31,6 +31,7 @@
<p>Please wait...</p> <p>Please wait...</p>
</div> </div>
</div> </div>
<%= render 'shared/license_expire_warning' %>
<!-- #END# Page Loader --> <!-- #END# Page Loader -->
<!-- Overlay For Sidebars --> <!-- Overlay For Sidebars -->
<div class="overlay"></div> <div class="overlay"></div>
@@ -60,8 +61,7 @@
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" > data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p> </p>
<% end %> <% end %>
<%= render 'shared/license_expire_warning' %> <%= yield %>
<%= yield %>
</section> </section>
</body> </body>

View File

@@ -14,6 +14,7 @@
</head> </head>
<body> <body>
<%= render 'shared/license_expire_warning' %>
<%= render 'layouts/header' %> <%= render 'layouts/header' %>
<div class="container-fluid"> <div class="container-fluid">
<% flash.each do |type, message| %> <% flash.each do |type, message| %>
@@ -22,7 +23,6 @@
<%= message %> <%= message %>
</div> </div>
<% end %> <% end %>
<%= render 'shared/license_expire_warning' %>
<%= yield %> <%= yield %>
</div> </div>

View File

@@ -1,5 +1,5 @@
<!-- Column One --> <!-- Column One -->
<div class="row clearfix" style=""> <div class="row clearfix m-top-100" style="">
<div class="col-lg-7 col-md-7 col-sm-7"> <div class="col-lg-7 col-md-7 col-sm-7">
<p class="hidden filter"><%= @filter %></p> <p class="hidden filter"><%= @filter %></p>
<div class="card"> <div class="card">

View File

@@ -4,7 +4,7 @@
<% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%> <% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%>
<% modify_order = request.path_info.include?('modify_order')%> <% modify_order = request.path_info.include?('modify_order')%>
<div class="container-fluid " style="padding:0px 3px 0px 3px;"> <div class="container-fluid addorder-pages" style="padding:0px 3px 0px 3px;">
<div id="oqs_loading_wrapper" style="display:none;"> <div id="oqs_loading_wrapper" style="display:none;">
<div id="oqs_loading"></div> <div id="oqs_loading"></div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div class='row'> <div class='row'>
<div class="col-lg-10 col-md-10 col-sm-10"> <div class="col-lg-10 col-md-10 col-sm-10">
<h2> <%= t :cash_in %> </h2> <h2> <%= t :cash_in %> </h2>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div class='row'> <div class='row'>
<div class="col-lg-10 col-md-10 col-sm-10"> <div class="col-lg-10 col-md-10 col-sm-10">
<h2><%= t :cash_out %></h2> <h2><%= t :cash_out %></h2>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;"> <div id="loading_wrapper" style="display:none;">
<div id="loading"></div> <div id="loading"></div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;"> <div id="loading_wrapper" style="display:none;">
<div id="loading"></div> <div id="loading"></div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;"> <div id="loading_wrapper" style="display:none;">
<div id="loading"></div> <div id="loading"></div>
</div> </div>

View File

@@ -1,6 +1,6 @@
<%= stylesheet_link_tag 'order_reservation', media: 'all', 'data-turbolinks-track': 'reload' %> <%= stylesheet_link_tag 'order_reservation', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'order_reservation', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'order_reservation', 'data-turbolinks-track': 'reload' %>
<div class="container-fluid"> <div class="container-fluid m-top-100">
<!-- start count function --> <!-- start count function -->
<% <%
pending_count = 0 pending_count = 0

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div class="row"> <div class="row">
<!-- Column One --> <!-- Column One -->
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
@@ -202,7 +202,7 @@
<%else%> <%else%>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/sale/<%=@sale_data.sale_id%>/<%=@cashier_type%>/payment'"><i class="material-icons">reply</i> Back </button> <button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/sale/<%=@sale_data.sale_id%>/<%=@cashier_type%>/payment'"><i class="material-icons">reply</i> Back </button>
<%end%> <%end%>
<button id="charge_other" class="btn bg-primary btn-block action-btn">Enter</button> <button id="charge_other" class="btn bg-primary btn-block action-btn" style="height: 35px">Enter</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;"> <div id="loading_wrapper" style="display:none;">
<div id="loading"></div> <div id="loading"></div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div class="row clearfix"> <div class="row clearfix">
<!-- Column One --> <!-- Column One -->
<div class="col-lg-10 col-md-10 col-sm-10"> <div class="col-lg-10 col-md-10 col-sm-10">

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div class="row"> <div class="row">
<!-- Column One --> <!-- Column One -->
<div class="col-lg-5 col-md-5 col-sm-5"> <div class="col-lg-5 col-md-5 col-sm-5">

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;"> <div id="loading_wrapper" style="display:none;">
<div id="loading"></div> <div id="loading"></div>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid"> <div class="container-fluid m-top-100">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7"> <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
<div class="card"> <div class="card">

View File

@@ -8,13 +8,24 @@
text = "Your license will expire in #{day}." text = "Your license will expire in #{day}."
end end
%> %>
<style>
.centered {
position: fixed;
/*width: 850px;*/
padding: 10px;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-sm-2"></div> <div class="col-sm-2"></div>
<div class="card col-sm-8 centered">
<div class="card col-md-8 h-100" style="padding-left: 60px;">
<div class="card-block"> <div class="card-block">
<h3 class="pt-2 d-inline">Renew Your License</h3> <h3 class="pt-2 d-inline">Review Your License</h3>
<%= link_to origami_dashboard_url do %> <%= link_to origami_dashboard_url do %>
<img src="/image/logo.png" style="margin-left: 25pc; width: 150px"> <img src="/image/logo.png" style="margin-left: 25pc; width: 150px">
<% end %> <% end %>
@@ -51,11 +62,10 @@
<label class="card-subtitle mb-2 "><strong><%= @expired_at.to_date.strftime('%B %d, %Y') %></strong></label> <label class="card-subtitle mb-2 "><strong><%= @expired_at.to_date.strftime('%B %d, %Y') %></strong></label>
</div> </div>
</div> </div>
<br>
<div class="col-md-12" style="padding-bottom: 20px;"> <div class="col-md-12" style="padding-bottom: 20px;">
<%= link_to 'Home', origami_dashboard_url, class: 'btn btn-primary btn-lg' %> <%= link_to 'Review License', renew_url, class: 'btn btn-primary btn-lg float-right m-l-10 m-r-5' %>
<%= link_to 'Renew License', renew_url, class: 'btn btn-primary btn-lg float-right m-l-5 m-r-5' %> <%= link_to 'Go To Home', origami_dashboard_url, class: 'btn btn-default btn-lg float-right' %>
<button onclick="history.back();" type='button' class="btn btn-lg btn-default float-right">Cancel</button>
</div> </div>
</div> </div>
<div class="col-sm-2"></div> <div class="col-sm-2"></div>
@@ -64,9 +74,9 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('.alert-warning, .navbar').hide() $('.alert-danger, .navbar').hide()
$('html, section').css('background-color', '#61B8C9') $('html, section').css('background-color', '#61B8C9')
$('html').css('overflow-x', 'hidden') // $('html').css('overflow-x', 'hidden')
$('section.content').css('margin', '70px 0 0 0') $('section.content').css('margin', '70px 0 0 0')
}) })
</script> </script>

View File

@@ -10,12 +10,38 @@
end end
%> %>
<% if license_status == 0 || license_status == 2 %> <% if license_status == 0 || license_status == 2 %>
<div class="alert alert-warning fade show" role="alert" style="margin-top: -15px;"> <div class="alert alert-danger fade show text-center" role="alert">
<strong style="margin-left: 40px !important"><%= text %></strong> <strong style="margin-left: 40px !important"><%= text %></strong>
<%= link_to 'Renew License', expire_url, class: 'btn btn-sm btn-primary', style: "margin-left: 40px !important"%> <%= link_to 'Review License', expire_url, class: 'btn btn-sm btn-primary', style: "margin-left: 20px !important"%>
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="padding-top: 5px;"> <button type="button" class="close btn-close" data-dismiss="alert" aria-label="Close" style="padding-top: 5px;">
<span aria-hidden="true" class="text-white">&times;</span> <span aria-hidden="true" class="text-white">&times;</span>
</button> </button>
</div> </div>
<% end %> <% end %>
<script>
$(document).ready(function() {
if (<%= license_status %> == 1) {
$('.navbar').css("top", 0)
$('section.content').css('margin-top', '0 !important')
}
else {
$('.navbar').css("top", '45px')
$('.block-header, .addorder-pages').css('margin-top', '115px')
$('.page-header, .m-top-100').css('margin-top', '100px')
$('.alert-danger').css({
'top': 0,
'position': 'fixed',
'z-index': 999,
'width': '100%'
})
}
$('.btn-close').on ('click', function() {
$('.navbar').css("top", '0')
$('.block-header, .addorder-pages').css('margin-top', '')
$('.page-header, .m-top-100').css('margin-top', '')
})
})
</script>

View File

@@ -1,19 +1,17 @@
--- ---
localhost: localhost:
iv_key: c5bODYtxFPckKXr3bLPdnQ== iv_key: 03TLQUDDVSOPa/lEEHqhVw==
shop_name: scdemo3 shop_name: scdemo3
email: hanwintun@code2lab.com email: hanwintun@code2lab.com
telephone: '' telephone: ''
fax: '' fax: ''
address: '' address: ''
dbhost: eFiEpFewQVPPylY1pefN2ZIVmxg9v7G1YrnHtNIPIbQQg7WtffKz35uCcOwgwzEvCTPUhPQama4B80FHyTpn3Q== dbhost: gG0jQLrVX6l0dZaA5wVP9bNTrfgzotwAcjcFKQmM9WUQ5121pkwg+9mYh5XDrIwL4//1UNjRR6CNZPorBMGtAw==
dbschema: PRMtXnRsDZQjF319ItO7Lw== dbschema: M9ddWoBb89JN51Ld1r7vTw==
dbusername: QYngtMBsTBV/B17XiH5zhQ== dbusername: 8Lc2lKIyJld/xfG6+ZxcOw==
dbpassword: vXsZqV2sJQ+tjIiGBb7N8A== dbpassword: "+EhtSe5kJuVKp+wFMRlmoA=="
api_token: UQFLAbMvJxUCnDVCOhIdqYZEGRqVQMvI api_token: UQFLAbMvJxUCnDVCOhIdqYZEGRqVQMvI
app_token: DvRXGlomaBFpGVLYsidekVVZyqosntouTA app_token: DvRXGlomaBFpGVLYsidekVVZyqosntouTA
plan_sku: AqCfY9X2C03i+XBLnvRz5w== plan_sku: 2NY6p1HAlR7UqE8AsBEytg==
renewable_date: 'MXf+rRgjWFxIRgpf+Aa4JA== renewable_date: vlKVqrJyCB6LxXTkv63COg==
plan_name: 6NSPpVHcwHBoFZPcVNjkvD6F5quXIWVaWieCRzpspbE=
'
plan_name: bDYhVmEo9MNZmfIxwxE30BFHUKWTDVkVDnUiE6htM5Y=