sidebar_resto.blade.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. @php
  2. $current_page = strtolower(Route::currentRouteName());
  3. $permissions = [];
  4. if(\Illuminate\Support\Facades\Auth::user()->role=='resto_user'){
  5. $permissions = $roles[\Illuminate\Support\Facades\Auth::user()->resto_users->role];
  6. }
  7. $main_pages = ['dashboard','orderlisting','show_order','marketing','order-history','outlets','outlets-form','outlets-address',
  8. 'outlets-delivery','outlets-ordering-mode','outlets-pickup','outlets-contactless-dining','pause-orders'];
  9. $outlet = ['outlets','outlets-form','outlets-address','outlets-delivery','outlets-ordering-mode','outlets-pickup','outlets-contactless-dining','invetory','discounts'];
  10. $menu_pages = ['recipes','categories'];
  11. $resto_id = \App\Helpers\CommonMethods::getRestuarantID();
  12. $mta = \App\Models\RestoMetas::where('bussiness_id',$resto_id)->where('meta_def_id',84)->first();
  13. @endphp
  14. <style type="text/css">
  15. .resto-name-long{
  16. max-width: 150px;
  17. display: inline-block;
  18. white-space: nowrap;
  19. overflow: hidden !important;
  20. text-overflow: ellipsis;
  21. top: 4px;
  22. position: relative;
  23. color:#000;
  24. }
  25. .theme-primary.light-skin .sidebar-menu > li:hover svg, .theme-primary.light-skin .sidebar-menu > li:active svg, .theme-primary.light-skin .sidebar-menu > li.active svg{
  26. fill:#FFF !important;
  27. }
  28. .sidebar-menu li svg{
  29. margin-top:-8px;
  30. }
  31. .close-button{
  32. position: absolute;
  33. }
  34. .sidebar-menu li > a > .pull-right-container, .sidebar-menu li > a > .pull-left-container{
  35. font-size: 1.5714285714rem;
  36. }
  37. .theme-primary.light-skin .sidebar-menu > li.active.treeview > a{
  38. color:#FFF !important;
  39. }
  40. .treeview li.active a{
  41. color:#FFF !important;
  42. }
  43. .sidebar-menu .menu-open > a > .pull-right-container > .fa-angle-right, .sidebar-menu .menu-open > a > .pull-right-container > .fa-angle-left{
  44. color:#FFAB00
  45. }
  46. .sidebar-menu .menu-open > a > .pull-left-container > .fa-angle-left {
  47. -webkit-transform: rotate(270deg);
  48. -ms-transform: rotate(270deg);
  49. -o-transform: rotate(270deg);
  50. transform: rotate(270deg);
  51. }
  52. </style>
  53. <aside class="main-sidebar d-none d-sm-none d-md-none d-lg-block">
  54. <!-- sidebar-->
  55. <section class="sidebar position-relative">
  56. <div class="multinav">
  57. <div class="multinav-scroll" style="height: 100%;">
  58. <!-- sidebar menu-->
  59. <ul class="sidebar-menu" data-widget="tree">
  60. <li class="@if(in_array($current_page,$main_pages) && $current_page=="dashboard") active @endif">
  61. <a href="{!! env('APP_URL') !!}dashboard">
  62. <i class="icon-Library">
  63. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M13 9V3h8v6ZM3 13V3h8v10Zm10 8V11h8v10ZM3 21v-6h8v6Zm2-10h4V5H5Zm10 8h4v-6h-4Zm0-12h4V5h-4ZM5 19h4v-2H5Zm4-8Zm6-4Zm0 6Zm-6 4Z"/></svg>
  64. </i>
  65. <span>{{__('label.dashboard')}}</span>
  66. </a>
  67. </li>
  68. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="orderlisting" || $current_page=="show_order")) active @endif">
  69. <a href="{!! env('APP_URL') !!}orders">
  70. <i class="icon-Clipboard-check"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6 20q-1.25 0-2.125-.875T3 17H1V6q0-.825.588-1.412Q2.175 4 3 4h14v4h3l3 4v5h-2q0 1.25-.875 2.125T18 20q-1.25 0-2.125-.875T15 17H9q0 1.25-.875 2.125T6 20Zm0-2q.425 0 .713-.288Q7 17.425 7 17t-.287-.712Q6.425 16 6 16t-.713.288Q5 16.575 5 17t.287.712Q5.575 18 6 18Zm-3-3h.8q.425-.45.975-.725Q5.325 14 6 14t1.225.275q.55.275.975.725H15V6H3Zm15 3q.425 0 .712-.288Q19 17.425 19 17t-.288-.712Q18.425 16 18 16t-.712.288Q17 16.575 17 17t.288.712Q17.575 18 18 18Zm-1-5h4.25L19 10h-2Zm-8-2.5Z"/></svg></i>
  71. @php
  72. $order = \App\Models\Orders::select(DB::raw(' count(status) as status_count'),'status')->where('resto_id',$resto_id)
  73. ->where('status','Placed')->groupBy('status')->first();
  74. $count = isset($order)?$order->status_count:0;
  75. @endphp
  76. <span>{{__('label.live_orders')}}</span><span class="notification-badge" @if(app()->getLocale()=="ar") dir="rtl" @endif id="order-counter" style="font-size: 75%; @if($count == 0) display:none; background-color: red !important @endif">{!! $count !!}</span>
  77. </a>
  78. </li>
  79. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="order-history")) active @endif">
  80. <a href="{!! env('APP_URL') !!}order/history">
  81. <i class="icon-Library">
  82. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3 10V4h2v2.35q1.275-1.6 3.113-2.475Q9.95 3 12 3q3.75 0 6.375 2.625T21 12h-2q0-2.925-2.038-4.963Q14.925 5 12 5q-1.725 0-3.225.8T6.25 8H9v2Zm.05 3H5.1q.3 2.325 1.913 3.938 1.612 1.612 3.862 1.962l1.2 2.1q-3.45 0-6.05-2.288Q3.425 16.425 3.05 13Zm10.3 1.75L11 12.4V7h2v4.6l1.4 1.4ZM17.975 24l-.3-1.5q-.3-.125-.562-.262-.263-.138-.538-.338l-1.45.45-1-1.7 1.15-1q-.05-.325-.05-.65t.05-.65l-1.15-1 1-1.7 1.45.45q.275-.2.538-.338.262-.137.562-.262l.3-1.5h2l.3 1.5q.3.125.575.287.275.163.525.363l1.45-.5 1 1.75-1.15 1q.05.325.05.625t-.05.625l1.15 1-1 1.7-1.45-.45q-.275.2-.537.338-.263.137-.563.262l-.3 1.5Zm1-3q.825 0 1.413-.587.587-.588.587-1.413 0-.825-.587-1.413Q19.8 17 18.975 17q-.825 0-1.413.587-.587.588-.587 1.413 0 .825.587 1.413.588.587 1.413.587Z"/></svg>
  83. </i>
  84. <span>{{__('label.order_history')}}</span>
  85. </a>
  86. </li>
  87. <li class="@if(in_array($current_page,$outlet)) active @endif">
  88. <a href="{!! env('APP_URL') !!}outlets">
  89. <i class="icon-Cart"><!--<span class="path1"></span><span class="path2"></span>-->
  90. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M4 6V4h16v2Zm0 14v-6H3v-2l1-5h16l1 5v2h-1v6h-2v-6h-4v6Zm2-2h6v-4H6Zm-.95-6h13.9Zm0 0h13.9l-.6-3H5.65Z"/></svg>
  91. </i>
  92. <span>{{__('label.outlets')}} </span>
  93. </a>
  94. </li>
  95. <li class="treeview @if(in_array($current_page,$menu_pages)) active menu-open @endif">
  96. <a href="#">
  97. <i class="icon-Clipboard-check">
  98. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-menu-button-fill" viewBox="0 0 16 16">
  99. <path d="M1.5 0A1.5 1.5 0 0 0 0 1.5v2A1.5 1.5 0 0 0 1.5 5h8A1.5 1.5 0 0 0 11 3.5v-2A1.5 1.5 0 0 0 9.5 0h-8zm5.927 2.427A.25.25 0 0 1 7.604 2h.792a.25.25 0 0 1 .177.427l-.396.396a.25.25 0 0 1-.354 0l-.396-.396zM0 8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8zm1 3v2a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2H1zm14-1V8a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v2h14zM2 8.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0 4a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5z"/>
  100. </svg>
  101. </i>
  102. <span>{{__('label.main_menu')}}</span>
  103. <span class=" @if(app()->getLocale()=="ar") pull-left-container @else pull-right-container @endif">
  104. <i class=" @if(app()->getLocale()=="ar") fa fa-angle-left pull-left @else fa fa-angle-right pull-right @endif"></i>
  105. </span>
  106. </a>
  107. <ul class="treeview-menu" @if(in_array($current_page,$menu_pages)) style="display: block;" @else style="display: none;" @endif>
  108. <li @if(in_array($current_page,$menu_pages) && $current_page=="categories") class="active" @endif><a href="{!! env('APP_URL') !!}categories"><i class="icon-Commit"><span class="path1"></span><span class="path2"></span></i>{{__('label.categories')}}</a></li>
  109. <li @if(in_array($current_page,$menu_pages) && $current_page=="recipes") class="active" @endif><a href="{!! env('APP_URL') !!}recipes"><i class="icon-Commit"><span class="path1"></span><span class="path2"></span></i>{{__('label.items')}}</a></li>
  110. </ul>
  111. </li>
  112. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="invetory")) active @endif">
  113. <a href="{!! env('APP_URL') !!}inventory">
  114. <i class="icon-Chart-pie">
  115. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3 20V8.7q-.425-.275-.712-.7Q2 7.575 2 7V4q0-.825.588-1.413Q3.175 2 4 2h16q.825 0 1.413.587Q22 3.175 22 4v3q0 .575-.288 1-.287.425-.712.7V20q0 .825-.587 1.413Q19.825 22 19 22H5q-.825 0-1.413-.587Q3 20.825 3 20ZM5 9v11h14V9Zm15-2V4H4v3ZM9 14h6v-2H9Zm-4 6V9v11Z"/></svg>
  116. </i>
  117. <span>{{__('label.inventory')}} </span>
  118. </a>
  119. </li>
  120. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="pause-orders")) active @endif">
  121. <a href="{!! env('APP_URL') !!}pause/orders">
  122. <i class="icon-Chart-pie">
  123. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M9 16h2V8H9Zm4 0h2V8h-2Zm-1 6q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3.35 2.325 5.675Q8.65 20 12 20Zm0-8Z"/></svg>
  124. </i>
  125. <span>{{__('label.pause_orders')}} </span>
  126. </a>
  127. </li>
  128. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="discounts")) active @endif">
  129. <a href="{!! env('APP_URL') !!}discounts">
  130. <i class="icon-Dinner">
  131. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M14.35 8.55q-.3-.75-.887-1.175-.588-.425-1.413-.425-.45 0-.875.125t-.775.475L8.95 6.1q.35-.35.95-.637.6-.288 1.1-.363V3h2v2.05q1.125.225 1.975.912.85.688 1.275 1.788ZM19.8 22.6 15.2 18q-.375.375-1.025.613-.65.237-1.175.287V21h-2v-2.15q-1.4-.35-2.337-1.275-.938-.925-1.363-2.325l2-.8q.3 1.05 1.012 1.8.713.75 1.888.75.45 0 .825-.113.375-.112.725-.337L1.4 4.2l1.4-1.4 18.4 18.4Z"/></svg>
  132. </i>
  133. <span>{{__('label.discounts')}} </span>
  134. </a>
  135. </li>
  136. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="marketing")) active @endif">
  137. <a href="{!! env('APP_URL') !!}marketing">
  138. <i class="icon-Group">
  139. <svg xmlns="http://www.w3.org/2000/svg" height="26" width="26"><path d="M18 13v-2h4v2Zm1.2 7L16 17.6l1.2-1.6 3.2 2.4Zm-2-12L16 6.4 19.2 4l1.2 1.6ZM5 19v-4H4q-.825 0-1.412-.588Q2 13.825 2 13v-2q0-.825.588-1.413Q3.175 9 4 9h4l5-3v12l-5-3H7v4Zm9-3.65v-6.7q.675.6 1.088 1.463.412.862.412 1.887t-.412 1.887q-.413.863-1.088 1.463ZM4 11v2h4.55L11 14.45v-4.9L8.55 11Zm3.5 1Z"/></svg>
  140. </i>
  141. <span>{{__('label.marketing')}} </span>
  142. </a>
  143. </li>
  144. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="payment-links")) active @endif">
  145. <a href="{!! env('APP_URL') !!}payment/links">
  146. <i class="icon-Group">
  147. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-credit-card-fill" viewBox="0 0 16 16">
  148. <path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1H0V4zm0 3v5a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7H0zm3 2h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z"/>
  149. </svg>
  150. </i>
  151. <span>{{__('label.paymentlinks')}} </span>
  152. </a>
  153. </li>
  154. @if(isset($mta))
  155. <li class="@if(in_array($current_page,$main_pages) && ($current_page=="categories") && isset($_GET['menu'])) active @endif">
  156. <a href="{!! env('APP_URL') !!}categories?menu=tablet">
  157. <i class="icon-Chart-pie">
  158. <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.5 11 12 2l5.5 9Zm11 11q-1.875 0-3.188-1.312Q13 19.375 13 17.5q0-1.875 1.312-3.188Q15.625 13 17.5 13q1.875 0 3.188 1.312Q22 15.625 22 17.5q0 1.875-1.312 3.188Q19.375 22 17.5 22ZM3 21.5v-8h8v8ZM17.5 20q1.05 0 1.775-.725Q20 18.55 20 17.5q0-1.05-.725-1.775Q18.55 15 17.5 15q-1.05 0-1.775.725Q15 16.45 15 17.5q0 1.05.725 1.775Q16.45 20 17.5 20ZM5 19.5h4v-4H5ZM10.05 9h3.9L12 5.85ZM12 9Zm-3 6.5Zm8.5 2Z"/></svg>
  159. </i>
  160. <span>Tablet Menu </span>
  161. </a>
  162. </li>
  163. @endif
  164. {{--<li class="treeview">
  165. <a href="#">
  166. <i class="icon-Clipboard-check"><span class="path1"></span><span class="path2"></span><span class="path3"></span></i>
  167. <span>Settings</span>
  168. <span class="pull-right-container">
  169. <i class="fa fa-angle-right pull-right"></i>
  170. </span>
  171. </a>
  172. <ul class="treeview-menu">
  173. <li><a href="{!! env('APP_URL') !!}restaurant/edit/{!! \App\Helpers\CommonMethods::encrypt($resto_id) !!}"><i class="icon-Commit"><span class="path1"></span><span class="path2"></span></i>Restaurant's Settings</a></li>
  174. </ul>
  175. </li>--}}
  176. </ul>
  177. </div>
  178. </div>
  179. <div class="sidebar-footer">
  180. <!-- <ul class="sidebar-menu tree" data-widget="tree">
  181. <li>
  182. <a >
  183. <i class="icon-User"><span class="path1"></span><span class="path2"></span></i>
  184. <span>Users</span>
  185. </a>
  186. </li>
  187. </ul> -->
  188. <div class="dropdown">
  189. <button class="footer-drop btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-bs-toggle="dropdown" aria-expanded="false">
  190. <i class="icon-User"><span class="path1"></span><span class="path2"></span></i>
  191. <span class="resto-name-long">
  192. @php
  193. $resto = \App\Models\Restaurants::find($resto_id);
  194. @endphp
  195. @if($resto->default_lang=="en")
  196. {!! $resto->name !!}
  197. @endif
  198. @if($resto->default_lang=="ar")
  199. {!! $resto->arabic_name !!}
  200. @endif
  201. </span>
  202. <span class="pull-right-container">
  203. <i class="fa fa-angle-right pull-right"></i>
  204. </span>
  205. </button>
  206. <ul class="dropdown-menu footer-drop" aria-labelledby="dropdownMenu2" data-popper-placement="top-start">
  207. @if(\Illuminate\Support\Facades\Auth::user()->role=="restaurant")
  208. <li><button class="dropdown-item" onclick="location.href='{!! env('APP_URL') !!}users'" type="button">{{__('label.users')}} </button></li>
  209. <li><button class="dropdown-item" type="button" onclick="location.href='{!! env('APP_URL') !!}restaurant/edit/{!! \App\Helpers\CommonMethods::encrypt($resto_id) !!}'">{{__('label.business_settings')}}</button></li>
  210. @endif
  211. <li><button class="dropdown-item" type="button" onclick="location.href='{!! env('APP_URL') !!}change/password'">{{__('label.change_password')}}</button></li>
  212. <li><button class="dropdown-item" type="button" onclick="location.href='{!! env('APP_URL') !!}logout'">{{__('label.logout')}}</button></li>
  213. </ul>
  214. </div>
  215. </div>
  216. </section>
  217. </aside>