hide left_sidebar and auto_scroll to item in add order table

This commit is contained in:
Zin Moe
2020-02-28 17:49:54 +06:30
parent aa30fbba39
commit 944838c739
6 changed files with 51 additions and 12 deletions

View File

@@ -10,22 +10,23 @@
</div> -->
<!-- #END# Search Bar -->
<!-- Top Bar -->
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
<% display_none = (food_court && current_user.role == 'cashier') ? 'd-none' : '' %>
<%if !request.path_info.include?('second_display') %>
<nav class="navbar">
<div class="container-fluid">
<div class="navbar-header">
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
<%if current_login_employee.role !="waiter" %>
<a href="javascript:void(0);" class="bars"></a>
<a href="javascript:void(0);" class="bars <%= display_none %>"></a>
<% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" || current_login_employee.role == "account" %>
<a class="navbar-brand mbl_view" href="<%=dashboard_path%>" style="margin-left: 20px;">
<% elsif current_login_employee.role == "supervisor" %>
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
<% elsif current_login_employee.role == "cashier" || current_login_employee.role == "waiter"%>
<%if ShiftSale.current_open_shift(current_login_employee) %>
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
<%if current_login_employee.role == "cashier" && food_court %>
<a class="navbar-brand mbl_view" href="<%=foodcourt_food_court_path%>" style="margin-left: 20px;">
<a class="navbar-brand mbl_view" href="<%=foodcourt_food_court_path%>" style="margin-left: -10px;">
<%else%>
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
<%end%>
@@ -38,7 +39,7 @@
<% else %>
<a class="navbar-brand m-0 mbl_view" href="<%= origami_dashboard_path%>">
<%end%>
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo" />
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo", class="<%= display_none.present? ? 'm-0' : '' %>" />
<span class="navbar-brand-txt">SX Restaurant</span>
</a>