orders.blade.php 88 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850
  1. @extends('layouts.app')
  2. @section('page-title')| Live Orders @endsection
  3. @section('css')
  4. <link href="{!! env('APP_ASSETS') !!}css/liveorder.css?v={!! time() !!}" rel="stylesheet" type="text/css">
  5. @endsection
  6. @section('content')
  7. <style>
  8. #discount-info{
  9. position: absolute;
  10. height: 175px;
  11. width: 400px;
  12. border: 1px solid;
  13. bottom: 15%;
  14. background: #fff;
  15. left: 22%;
  16. border-radius: 5px;
  17. padding: 15px;
  18. display: none;
  19. z-index: 1;
  20. cursor: pointer;
  21. box-shadow: 0px 2px 3px #091E4240, 0px 0px 1px #091E424F;
  22. }
  23. #discount-info.active{
  24. display: block;
  25. }
  26. #only-loyalty-points{
  27. display:none;
  28. }
  29. span.info{
  30. cursor: pointer;
  31. position: relative;
  32. top: -2px;
  33. }
  34. #only-loyalty-points.active{
  35. display:block;
  36. }
  37. .item-list .list-group-item{
  38. background-color: transparent !important;
  39. }
  40. .item-list .list-group{
  41. margin-left: 18px !important;
  42. }
  43. .item-list .list-group-item .badge{
  44. font-size: 70% !important;
  45. }
  46. #show-recipes, .calc_div{
  47. background-color: #fff7e8;
  48. }
  49. .row.right-panel-box{
  50. padding:0 10px
  51. }
  52. .lh-48
  53. {
  54. line-height:48px;
  55. }
  56. .theme-primary .nav-tabs .nav-link .labelcenter{
  57. position: relative;
  58. top: 3px;
  59. }
  60. .arrow-arabic svg{
  61. -webkit-transform:rotate(180deg);
  62. -moz-transform: rotate(180deg);
  63. -ms-transform: rotate(180deg);
  64. -o-transform: rotate(180deg);
  65. transform: rotate(180deg);
  66. }
  67. .print{
  68. color:#000 !important
  69. }
  70. .load-more-order{
  71. position: absolute;
  72. background: #006cd5;
  73. right: 20%;
  74. left: 20%;
  75. padding: 20px;
  76. text-align: center;
  77. color: #FFF;
  78. font-weight: 700;
  79. bottom: -12%;
  80. text-transform: uppercase;
  81. cursor: pointer;
  82. }
  83. p[rel] img{ height: 12px !important;}
  84. body {
  85. background-color: #FFF;
  86. }
  87. .discount_with{
  88. display:none !important;
  89. }
  90. .discount_with.active{
  91. display:flex !important
  92. }
  93. .delivery_discount_with{
  94. display:none !important;
  95. }
  96. .delivery_discount_with.active{
  97. display:flex !important
  98. }
  99. #print-recipt{
  100. display: none; }
  101. .mlist_li.selected{
  102. color: #000;
  103. background-color: #f1f1f1;
  104. }
  105. @if(app()->getLocale()=="ar")
  106. #show-recipes .box-header{
  107. padding: 15px 1.2rem 5px 0;
  108. }
  109. @else
  110. #show-recipes .box-header{
  111. padding: 15px 0 5px 1.2rem;
  112. }
  113. @endif
  114. @-webkit-keyframes special {
  115. from { background-color: rgba(255, 121, 77, 0.27); }
  116. to { background-color: inherit; }
  117. }
  118. @-moz-keyframes special {
  119. from { background-color: rgba(255, 121, 77, 0.27);; }
  120. to { background-color: inherit; }
  121. }
  122. @-o-keyframes special {
  123. from { background-color: rgba(255, 121, 77, 0.27);; }
  124. to { background-color: inherit; }
  125. }
  126. @keyframes special {
  127. from { background-color: rgba(255, 121, 77, 0.27);; }
  128. to { background-color: inherit; }
  129. }
  130. .special {
  131. -webkit-animation: special 1s infinite; /* Safari 4+ */
  132. -moz-animation: special 1s infinite; /* Fx 5+ */
  133. -o-animation: special 1s infinite; /* Opera 12+ */
  134. animation: special 1s infinite; /* IE 10+ */
  135. }
  136. .mlist_li.selected .media, .mlist_li.selected .box{
  137. /*background-color: transparent !important;*/
  138. }
  139. .mlist_li.selected p{
  140. color:#000 !important;
  141. }
  142. .labelcenter { width: auto}
  143. .gap-items p.status{ font-size: 12px}
  144. .gap-items p.min{
  145. line-height: 13px;
  146. padding-top: 11px;
  147. font-size: 11px;
  148. }
  149. .bg-danger p.min, .bg-danger .gap-items p.status{
  150. display: none;}
  151. .bg-danger .circle-div{ height: 10px; width: 10px; background: #fff !important; margin-right: 15px;}
  152. .mlist_li.selected .media-list-hover > .media:not(.media-list-header):not(.media-list-footer):hover,.mlist_li.selected .media-list-hover .media-list-body > .media:hover{
  153. background-color: transparent !important;
  154. }
  155. .mlist_li.selected .media-list{
  156. color: #000;
  157. background-color: #f1f1f1 !important;
  158. }
  159. .sidebar-mini.sidebar-collapse .content-wrapper {
  160. width: calc(100% - 60px) !important;
  161. margin-left: 60px !important;
  162. }
  163. .no-order-found{
  164. background-color: #000;
  165. background-image: url({!! env('APP_ASSETS') !!}images/no-order.png);
  166. background-repeat: no-repeat;
  167. background-position: center;
  168. ;
  169. }
  170. .actions{
  171. position:absolute; top: 20px; right: 10px;
  172. }
  173. .actions li{ margin:0 !important; padding:0}
  174. @media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1){
  175. body {
  176. padding: 0px !important;
  177. }
  178. }
  179. @media (max-width:767px){
  180. .actions {
  181. position: absolute;
  182. top: 20px;
  183. right: 15px;
  184. }
  185. .calc_div{
  186. padding: 14px;
  187. }
  188. .mlist_li.selected p {
  189. color: #fff!important;
  190. }
  191. .mlist_li.selected .media-list {
  192. color: #fff;
  193. background-color: transparent!important;
  194. }
  195. /*------Start Arabic css---------------*/
  196. html[dir="rtl"].nav-tabs{
  197. padding-right:0 !important;
  198. }
  199. /*------end Arabic css---------------*/
  200. body.fixed {
  201. overflow-y:hidden;
  202. }
  203. .for-mobile{
  204. /* max-height: 330px; */
  205. max-height: 60vh;
  206. overflow: auto;
  207. }
  208. #show-recipes .box-header {
  209. padding:0rem 18px 0 12px !important;
  210. }
  211. .right-panel-footer p{margin-bottom: 5px !important;
  212. padding: 0 !important;}
  213. .button-bottom-div{margin-top: 0px !important;}
  214. }
  215. .box-header p {
  216. margin-bottom: 0;
  217. }
  218. .box-header {
  219. padding: 1.5rem 0.5rem;
  220. }
  221. @media (max-width:767px){
  222. .box-header {
  223. padding: 0.5rem 14px;
  224. }
  225. }
  226. @media (max-width: 1024px){
  227. .navbar-custom-menu .navbar-nav > li:last-child > a {
  228. line-height: 25px;
  229. margin-left: 30px !important;
  230. }
  231. }
  232. @media (min-width: 768px) and (max-width: 1024px) {
  233. body{
  234. overflow-x:hidden !important;
  235. overflow-y:hidden !important;
  236. }
  237. }
  238. </style>
  239. @php
  240. $resto = \App\Models\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID());
  241. $lang = $resto->default_lang;
  242. app()->setLocale($lang);
  243. if(session('app_lang') !==null){
  244. $lang = session('app_lang');
  245. app()->setLocale($lang);
  246. }
  247. $restuarant1 = $resto;
  248. $resto_metas = \App\Helpers\CommonMethods::getRestoMetas($restuarant1);
  249. $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD";
  250. $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants";
  251. $is_allow_print_preview = isset($resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER'])?$resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER']:"Disabled";
  252. $is_tax_info = isset($resto_metas['DISPLAY_TAX_INFO'])?$resto_metas['DISPLAY_TAX_INFO']:"";
  253. @endphp
  254. <!-- Content Wrapper. Contains page content -->
  255. <div class="content-wrapper p-0">
  256. <div id="countdown"></div>
  257. <div class="container-full">
  258. <section class="content p-0">
  259. <div class="row">
  260. <div class="col-sm-12 p-0">
  261. <nav class="navbar navbar-static-top p-0">
  262. <!-- Sidebar toggle button-->
  263. <div class="row sm-m-0">
  264. <div class="col-md-12 tab-bar-section">
  265. <div class="app ovrflow-x-auto">
  266. <ul class="hs full nav nav-tabs" role="tablist">
  267. <li class="item nav-item d-inline">
  268. <div class="gap-items-4">
  269. <a class="nav-link p-0 active lh-48" data-bs-toggle="tab" href="#new-orders" data-status="new" role="tab">{{__('label.new')}}
  270. <span class="labelcenter label-default new">0</span></a>
  271. </div>
  272. </li>
  273. <li class="item nav-item d-inline">
  274. <div class="gap-items-4">
  275. <a class="nav-link p-0 lh-48" data-bs-toggle="tab" href="#in-kitchen" data-status="kitchen" role="tab">{{__('label.in_preparation')}}
  276. <span class="labelcenter label-default kitchen">0</span></a>
  277. </div>
  278. </li>
  279. <li class="item nav-item d-inline">
  280. <div class="gap-items-4">
  281. <a class="nav-link p-0 lh-48" data-bs-toggle="tab" href="#in-route" data-status="route" role="tab" >{{__('label.in_routeready')}}
  282. <span class="labelcenter label-default route">0</span></a>
  283. </div>
  284. </li>
  285. <li class="item nav-item d-inline">
  286. <div class="gap-items-4">
  287. <a class="nav-link p-0 lh-48" data-bs-toggle="tab" href="#all-orders" data-status="all" role="tab">{{__('label.all')}}
  288. <span class="labelcenter label-default all">0</span></a>
  289. </div>
  290. </li>
  291. </ul>
  292. </div>
  293. </div>
  294. </div>
  295. <!-- <div class="app-menu"></div> -->
  296. <a href="#" class="d-inline-block btn right-bar-btn waves-effect waves-circle btn btn-circle btn-danger btn-sm right-close-btn">
  297. <i class="mdi mdi-close"></i>
  298. </a>
  299. </nav>
  300. </div>
  301. </div>
  302. <div class="row">
  303. <div class="col-sm-12 col-md-4 order-sections-list" style="background-color: #f1f1f1">
  304. <div class="row p-10">
  305. <div class="col-md-12 mt-5">
  306. <div class="search-bx mx-5">
  307. <form>
  308. <div class="input-group search-div">
  309. <input type="search" class="form-control" style="background-color: transparent" placeholder="{{__('label.search_by_order_id')}}" aria-label="Search" aria-describedby="button-addon2">
  310. <div class="input-group-append">
  311. <button class="btn btn-sarch" type="submit" id="button-addon3"><i class="ti-search"></i></button>
  312. </div>
  313. </div>
  314. </form>
  315. </div>
  316. </div>
  317. </div>
  318. <div class="row mt-5 list_row">
  319. <div class=" col-md-12 position-relative p-0">
  320. <div class="tab-content">
  321. <div class="tab-pane fade in active all-orders position-relative" id="all-orders" role="tabpanel" style="max-height: 73vh; min-height: 73vh; overflow: auto;">
  322. <div class="p-0">
  323. <ul class="list-group list-ul list-unstyled orders-list" id="orders-list">
  324. {{--<li class="mlist_li p-5 mb-5 pl-15">
  325. <div class="d-grid gap-2 d-flex justify-content-center">
  326. <button class="btn btn-md btn-primary ref-btn">Refresh</button>
  327. </div>
  328. </li>--}}
  329. </ul>
  330. </div>
  331. </div>
  332. </div>
  333. <div class="load-more-order" data-start-page="2" data-number-of-items="{!! env('ORDER_NUMBER_ITEMS') !!}">
  334. {{__('label.load_more_orders')}}
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. <div class="col-sm-12 col-md-6 p-0 box-shadowed">
  340. <div class="no-order" style="padding-top: 50%; height: 93vh ;">
  341. <h3 class="text-center text-light">{{__('label.no_order_selected')}}</h3>
  342. </div>
  343. <div class="order-section" style="display: none; height: 90vh ; overflow-x: auto">
  344. <div class="row back-to-orders d-md-none d-lg-none">
  345. <div class="col-sm-12 text-center @if($lang=='ar') arrow-arabic @endif">
  346. @if($lang=="en")
  347. <svg style=" filter: drop-shadow(1px 0px 0px black);" xmlns="http://www.w3.org/2000/svg" width="13.917" height="9.785" viewBox="0 0 13.917 9.785">
  348. <path id="Shape_878" data-name="Shape 878" d="M301.31,1645.861h-7.36v2.854l-6.557-4.9,6.548-4.889v2.853h7.369Zm-8.177,1.227v-2.051h7.354v-2.443h-7.364v-2.036l-4.368,3.261Z" transform="translate(-287.393 -1638.93)"/>
  349. </svg>
  350. {{__('label.live_orders')}}
  351. @else
  352. <svg style=" filter: drop-shadow(1px 0px 0px black);" xmlns="http://www.w3.org/2000/svg" width="13.917" height="9.785" viewBox="0 0 13.917 9.785">
  353. <path id="Shape_878" data-name="Shape 878" d="M301.31,1645.861h-7.36v2.854l-6.557-4.9,6.548-4.889v2.853h7.369Zm-8.177,1.227v-2.051h7.354v-2.443h-7.364v-2.036l-4.368,3.261Z" transform="translate(-287.393 -1638.93)"/>
  354. </svg> {{__('label.live_orders')}}
  355. @endif
  356. </div>
  357. </div>
  358. <div class="row">
  359. <div class="col-sm-12">
  360. <div class="boxs">
  361. <div class="box-header with-border">
  362. <div class="d-flex justify-content-between align-items-center">
  363. <p class="fw-bold" rel="order_ref"></p>
  364. <p rel="order_placed"></p>
  365. <span class="inkitchen-btn badge badge-warning " id="toggle"></span>
  366. </div>
  367. </div>
  368. </div>
  369. </div>
  370. <div class="row">
  371. <div class="col-sm-12 mt-1 @if(app()->getLocale()=="ar") text-start @else text-end @endif px-0 pt-1 ">
  372. <a href="#!" class="print">
  373. <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" class="bi bi-printer-fill" viewBox="0 0 16 16">
  374. <path d="M5 1a2 2 0 0 0-2 2v1h10V3a2 2 0 0 0-2-2H5zm6 8H5a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1z"/>
  375. <path d="M0 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-1v-2a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2H2a2 2 0 0 1-2-2V7zm2.5 1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"/>
  376. </svg>
  377. </a>
  378. </div>
  379. </div>
  380. <div class="for-mobile">
  381. <div class="row right-panel-box">
  382. <div class="col-6">
  383. <div class="boxs">
  384. <div class="box-body">
  385. <div class="d-flex align-items-start">
  386. <div>
  387. <p class="text-fade mb-0">{{__('label.brand')}}</p>
  388. <p rel="brand_name"></p>
  389. </div>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. <div class="col-6">
  395. <div class="boxs">
  396. <div class="box-body">
  397. <div class="d-flex align-items-start">
  398. <div>
  399. <p class="text-fade mb-0">{{__('label.outlets')}}</p>
  400. <p rel="outlet_name"></p>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. <div class="row right-panel-box">
  408. <div class="col-6">
  409. <div class="boxs">
  410. <div class="box-body">
  411. <div class="d-flex align-items-start">
  412. <div>
  413. <p class="text-fade mb-0">{{__('label.order_type')}}</p>
  414. <p>
  415. <i class="icon-Dinner"><span class="path1"></span><span class="path2"></span><span class="path3"></span><span class="path4"></span><span class="path5"></span></i>
  416. <p rel="order_type"></p>
  417. </p>
  418. </div>
  419. </div>
  420. </div>
  421. </div>
  422. </div>
  423. <div class="col-6 for-delivery">
  424. <div class="boxs">
  425. <div class="box-body">
  426. <div class="d-flex align-items-start">
  427. <div class="">
  428. <p class="text-fade mb-0">{{__('label.delivery_at')}}</p>
  429. <p style="direction: ltr !important;" rel="delivery_at"></p>
  430. </div>
  431. </div>
  432. </div>
  433. </div>
  434. </div>
  435. <div class="col-6 for-pickup" style="display:none">
  436. <div class="boxs">
  437. <div class="box-body">
  438. <div class="d-flex align-items-start">
  439. <div class="">
  440. <p class="text-fade mb-0">{{__('label.pickup_at')}}</p>
  441. <p rel="delivery_at"></p>
  442. </div>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. </div>
  448. <div class="row right-panel-box">
  449. <div class="col-6">
  450. <div class="boxs">
  451. <div class="box-body">
  452. <div class="d-flex align-items-start">
  453. <div class="">
  454. <p class="text-fade mb-0">{{__('label.customers')}}</p>
  455. <p rel="customer"> <br>
  456. <i class="mdi mdi-crown org-color"></i>
  457. <small class="org-color">Ordered 5 times </small>
  458. </p>
  459. </div>
  460. </div>
  461. </div>
  462. </div>
  463. </div>
  464. <div class="col-6">
  465. <div class="boxs">
  466. <div class="box-body">
  467. <div class="d-flex align-items-start">
  468. <div class="">
  469. <p class="text-fade mb-0">{{__('label.phone_number')}}</p>
  470. <p rel="phone"></p>
  471. </div>
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. </div>
  477. <div class="row right-panel-box">
  478. <div class="col-6">
  479. <div class="boxs">
  480. <div class="box-body">
  481. <div class="d-flex align-items-start">
  482. <div class="">
  483. <p class="text-fade mb-0">{{__('label.payment_mode')}}</p>
  484. <p rel="payment"></p>
  485. </div>
  486. </div>
  487. </div>
  488. </div>
  489. </div>
  490. <div class="col-6">
  491. <div class="boxs">
  492. <div class="box-body">
  493. <div class="d-flex align-items-start">
  494. <div class="">
  495. <p class="text-fade mb-0">{{__('label.channel')}}</p>
  496. <p rel="channel"></p>
  497. </div>
  498. </div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. <div class="row right-panel-box">
  504. <!--<div class="col-md-6" id="address">
  505. <div class="boxs">
  506. <div class="box-body">
  507. <div class="d-flex align-items-start">
  508. <div class="">
  509. <p class="text-fade mb-0">Address</p>
  510. <p rel="address"></p>
  511. </div>
  512. </div>
  513. </div>
  514. </div>
  515. </div>-->
  516. <div class="col-6" id="table" style="display:none">
  517. <div class="boxs">
  518. <div class="box-body">
  519. <div class="d-flex align-items-start">
  520. <div class="">
  521. <p class="text-fade mb-0">{{__('label.table')}}</p>
  522. <p rel="for_table"></p>
  523. </div>
  524. </div>
  525. </div>
  526. </div>
  527. </div>
  528. <div class="col-6 for-delivery">
  529. <div class="boxs">
  530. <div class="box-body">
  531. <div class="d-flex align-items-start">
  532. <div class="">
  533. <p class="text-fade mb-0">
  534. {{__('label.order_notes')}}</p>
  535. <p rel="order_instructions">
  536. </p>
  537. </div>
  538. </div>
  539. </div>
  540. </div>
  541. </div>
  542. <div class="col-6 for-delivery">
  543. <div class="boxs">
  544. <div class="box-body">
  545. <div class="d-flex align-items-start">
  546. <div class="">
  547. <p class="text-fade mb-0"> {{__('label.delivery_notes')}}</p>
  548. <p rel="delivery_notes">
  549. </p>
  550. </div>
  551. </div>
  552. </div>
  553. </div>
  554. </div>
  555. </div>
  556. <div class="row right-panel-box">
  557. <div class="col-md-12">
  558. <div class="boxs" style="position: relative">
  559. <div class="box-body address_action_div">
  560. <div class="d-flex align-items-start">
  561. <div class="">
  562. <p class="text-fade mb-0">{{__('label.address')}}</p>
  563. <p rel="address" style="max-width: 80%"></p>
  564. </div>
  565. </div>
  566. </div>
  567. <div class="actions">
  568. <ul class="list-inline">
  569. <li class="list-inline-item"><a href="#!" class="address-actions" data-action="copy-clipboard"><svg data-v-10e82b3e="" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="" style="color: var(--color-midnight); width: 20px; height: 20px;"><path fill-rule="evenodd" d="M16 5.5H6a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h10a.5.5 0 00.5-.5V6a.5.5 0 00-.5-.5zM6 4a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2H6z" clip-rule="evenodd"></path><path fill-rule="evenodd" d="M1.25 4A2.75 2.75 0 014 1.25h6a.75.75 0 010 1.5H4c-.69 0-1.25.56-1.25 1.25v6a.75.75 0 01-1.5 0V4z" clip-rule="evenodd"></path></svg></a></li>
  570. <li class="list-inline-item"><a href="#!" class="address-actions" data-action="google-map"><svg data-v-2740a47f="" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg" class="" style="width: 20px; height: 20px;"><path d="M16.45 7.7c0 3.152-2.19 4.965-3.831 6.72-.983 1.051-1.769 4.48-1.769 4.48s-.784-3.426-1.764-4.475C7.443 12.671 5.25 10.855 5.25 7.7a5.6 5.6 0 1111.2 0v0z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.61 7.7a2.24 2.24 0 104.48 0 2.24 2.24 0 00-4.48 0z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></a></li>
  571. <li class="list-inline-item">
  572. <a href="#!" class="address-actions" data-action="whatsapp">
  573. <svg data-v-2740a47f="" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg" class="" style="width: 20px; height: 20px;"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.071 4.013a9.192 9.192 0 016.502-2.663 9.192 9.192 0 019.207 9.143v.01A9.222 9.222 0 015.803 18.33l-2.92.925a.75.75 0 01-.937-.954l.932-2.763a9.027 9.027 0 01-1.528-5.042v-.003a9.192 9.192 0 012.721-6.48zM10.572 2.1l-.002.75a7.692 7.692 0 00-7.72 7.65 7.527 7.527 0 001.464 4.473.75.75 0 01.107.685l-.58 1.72 1.84-.583a.75.75 0 01.638.088 7.722 7.722 0 0011.96-6.387 7.692 7.692 0 00-7.705-7.646l-.002-.75zM8.548 5.878c.223.115.47.313.606.628.055.126.132.314.212.51l.177.43c.07.167.134.316.186.428.026.056.045.096.058.12v.002a1.149 1.149 0 01.058 1.17 1.27 1.27 0 01-.282.38 5.126 5.126 0 01-.07.063l-.048.045a6.172 6.172 0 002.386 2.02c.085-.116.18-.253.252-.367.156-.246.41-.47.777-.513.277-.032.52.062.614.098l.009.004c.2.076 1.063.497 1.425.673l.136.066c.019.009.04.02.064.03.077.037.173.082.246.123.085.047.297.166.434.4.04.068.067.14.083.213a1.81 1.81 0 01-.216 1.572c-.796 1.379-2.173 1.81-3.55 1.667-1.356-.14-2.785-.827-3.962-1.76-1.178-.934-2.19-2.183-2.63-3.538-.452-1.393-.293-2.904.899-4.163.401-.436 1-.53 1.429-.496.233.018.482.078.707.195zm5.91 7.139l-.066-.031-.175-.085a155.61 155.61 0 00-1.056-.508 6 6 0 01-.39.508c-.133.15-.35.327-.67.366a1.22 1.22 0 01-.686-.133 7.672 7.672 0 01-3.436-2.979l-.01-.016a1.033 1.033 0 01-.085-.922c.086-.216.248-.379.276-.408a8.417 8.417 0 01.24-.234 15.217 15.217 0 01-.242-.552l-.19-.463a46.22 46.22 0 00-.15-.365.524.524 0 00-.313.012c-.76.8-.875 1.717-.565 2.672.323.995 1.113 2.016 2.135 2.826 1.021.81 2.188 1.34 3.184 1.443.963.1 1.683-.193 2.108-.943a.728.728 0 01.038-.061.312.312 0 00.052-.127zM7.515 7.194l-.002.003.002-.003zm.346.018H7.86h.002zm4.226 4.58zm-2.29-3.779z" fill="currentColor"></path></svg>
  574. </a>
  575. </li>
  576. </ul>
  577. </div>
  578. </div>
  579. </div>
  580. </div>
  581. @if( $business_type=="Florist")
  582. <div class="row right-panel-box" >
  583. <div class="col-6">
  584. <div class="boxs">
  585. <div class="box-body">
  586. <div class="d-flex align-items-start">
  587. <div class="">
  588. <p class="text-fade mb-0">{{__('label.receiver_name')}}</p>
  589. <p rel="recipient_name"></p>
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </div>
  595. <div class="col-6">
  596. <div class="boxs">
  597. <div class="box-body">
  598. <div class="d-flex align-items-start">
  599. <div class="">
  600. <p class="text-fade mb-0">{{__('label.receiver_phone')}}</p>
  601. <p rel="recipient_phone"></p>
  602. </div>
  603. </div>
  604. </div>
  605. </div>
  606. </div>
  607. </div>
  608. <div class="row right-panel-box" >
  609. <div class="col-md-12">
  610. <div class="boxs">
  611. <div class="box-body">
  612. <div class="d-flex align-items-start">
  613. <div class="">
  614. <p class="text-fade mb-0">{{__('label.greeting_message')}}</p>
  615. <p rel="greeting_message"></p>
  616. </div>
  617. </div>
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622. @endif
  623. <div id="discount-info">
  624. <ul class="list-group list-group-flush">
  625. <li class="list-group-item">Discount Code : <strong><span id="discount-code"></span></strong></li>
  626. <li class="list-group-item">Discount Name : <strong><span id="discount-name"></span></strong></li>
  627. <li class="list-group-item">Start DateTime : <strong><span id="discount-start-datetime"></span></strong></li>
  628. <li class="list-group-item">End DateTime : <strong><span id="discount-end-datetime"></span></strong></li>
  629. <li class="list-group-item text-end">
  630. <span class="close-popup">
  631. <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
  632. <path fill="currentColor" d="m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 13.4Z"/></svg>
  633. </span>
  634. </li>
  635. </ul>
  636. </div>
  637. <div class="col-12" id="show-recipes"></div>
  638. <div class="col-12 calc_div">
  639. <div class="box-header border-0 p-15 mt-0 pb-0">
  640. <div class="d-flex justify-content-between align-items-center m-0">
  641. <p>{{__('label.sub_total')}}:</p>
  642. <p class="sub_total"></p>
  643. </div>
  644. <div class="discount_with text-success d-flex justify-content-between align-items-center m-0">
  645. <p>{{__('label.discounts')}} ( <span rel="discount_code"></span> ) ( <span rel="discount_amount"></span> ) :</p>
  646. <p class="discount_total">AED 0</p>
  647. </div>
  648. <div id="only-delivery">
  649. <div class="d-flex justify-content-between align-items-center m-0">
  650. <p>{{__('label.delivery_fee')}}:</p>
  651. <p class="delivery_fee"></p>
  652. </div>
  653. <div class="delivery_discount_with text-success d-flex justify-content-between align-items-center m-0">
  654. <p>{{__('label.delivery_discounts')}}:</p>
  655. <p class="delivery_discount_total">AED 0</p>
  656. </div>
  657. </div>
  658. <div id="only-loyalty-points" class="text-success">
  659. <div class="d-flex justify-content-between align-items-center m-0">
  660. <p>{{__('label.loyalty_points')}}:</p>
  661. <p class="loyalty_amount"></p>
  662. </div>
  663. </div>
  664. @if(!empty($is_tax_info))
  665. <div class="d-flex fw-bold justify-content-between align-items-center m-0">
  666. <p>{{__('label.tax_info')}}:</p>
  667. <p class="tax_info"></p>
  668. </div>
  669. @endif
  670. <div class="d-flex fw-bold justify-content-between align-items-center m-0">
  671. <p class="">{{__('label.total')}}:</p>
  672. <p class="total_txt"></p>
  673. </div>
  674. </div>
  675. </div>
  676. </div>
  677. </div>
  678. <div class="row mt-0 right-panel-footer footer_btn_div">
  679. <div class="col-12 mt-5 button-bottom-div">
  680. <div class="m-0 text-center">
  681. <button type="button" class="waves-effect waves-light btn btn-outline btn-danger mb-0 btn-w80 rounded-0 rclose-btn reject change-status-reject" data-status="Rejected" style="display: none">{{__('label.reject')}}</button>
  682. <button type="button" class="waves-effect waves-light btn btn-outline btn-dark mb-0 btn-w50 rounded-0 rclose-btn accept change-status-reject" data-status="Close" style="display: none">{{__('label.close')}}</button>
  683. <button type="button" class="waves-effect waves-light btn btn-outline btn-danger mb-0 btn-w50 rounded-0 accept change-status-reject" data-status="Rejected" style="display: none">{{__('label.cancel')}}</button>
  684. <button type="button" class="waves-effect waves-light btn btn-default btn-w80 rounded-0 ready-collect change-status " data-status="">{{__('label.accept')}}</button>
  685. </div>
  686. </div>
  687. </div>
  688. </div>
  689. </div>
  690. </div>
  691. </section>
  692. <!-- /.content -->
  693. </div>
  694. </div>
  695. <!-- /.content-wrapper -->
  696. <div class="modal center-modal fade" id="accept-modal" tabindex="-1">
  697. <div class="modal-dialog">
  698. <div class="modal-content">
  699. <div class="modal-body">
  700. <h4>{{__('label.order_settings')}}</h4>
  701. <p>{{__('label.set_time_preparing_orders')}}</p>
  702. <div class="row">
  703. <div class="col-sm-6">
  704. <div class="form-group">
  705. <label>{{__('label.preparation_minutes')}}</label>
  706. <input type="text" name="preparation_time" class="form-control" value="" />
  707. </div>
  708. </div>
  709. <div class="col-sm-6">
  710. <div class="form-group">
  711. <label>{{__('label.preparation_delivery_minutes')}}</label>
  712. <input type="text" name="preperation_delivery" class="form-control" value="" />
  713. </div>
  714. </div>
  715. <div class="col-sm-12">
  716. <div class="form-group">
  717. <label>{{__('label.type')}}</label>
  718. <select class="form-control" name="preparation_type">
  719. <option value="MINUTES">{{__('label.minutes')}}</option>
  720. <option value="HOURS">{{__('label.hours')}}</option>
  721. <option value="DAYS">{{__('label.days')}}</option>
  722. </select>
  723. </div>
  724. </div>
  725. </div>
  726. </div>
  727. <div class="modal-footer modal-footer-uniform">
  728. <button type="button" class="btn btn-danger" data-bs-dismiss="modal">{{__('label.close')}}</button>
  729. <button type="button" class="btn btn-primary float-end accept-order">{{__('label.accept')}}</button>
  730. </div>
  731. </div>
  732. </div>
  733. </div>
  734. <div id="print-recipt"> </div>
  735. @endsection
  736. @section('js')
  737. <script src="{!! env('APP_ASSETS') !!}js/jquery.jscroll.min.js"></script>
  738. <script src="{!! env('APP_ASSETS') !!}js/jquery.countdown360.min.js"></script>
  739. <script src="{!! env('APP_ASSETS') !!}vendor_components/sweetalert/sweetalert.min.js"></script>
  740. <script>
  741. var resto_id = 0;
  742. var status = "new";
  743. var counter = 0;
  744. var order_id = null;
  745. var order_object = null;
  746. var lang = "{!! $lang !!}";
  747. $(function () {
  748. $("body").on("click",".info,.close-popup",function (){
  749. $("#discount-info").toggleClass('active')
  750. });
  751. count_order_status();
  752. $("body").on("click",".back-to-orders",function () {
  753. $(".order-section").hide();
  754. });
  755. $("body").on("click",".address-actions",function(){
  756. var _actions = $(this).data("action");
  757. if(_actions=="google-map"){
  758. var map = "https://maps.google.com/?q="+order_object.geo_location;
  759. window.open(map,"_blank");
  760. return false;
  761. }
  762. if(_actions=="whatsapp"){
  763. var template = order_text_template(order_object,"whatsapp");
  764. //console.log(encodeURIComponent(template));
  765. window.open("https://api.whatsapp.com/send?text="+(template),"_blank");
  766. }
  767. if(_actions=="copy-clipboard"){
  768. var template = order_text_template(order_object,"copy-clipboard");
  769. //console.log(encodeURIComponent(template));
  770. navigator.clipboard.writeText(template);
  771. }
  772. });
  773. $("body").on("click",".print",function () {
  774. $.ajax({
  775. url:"{!! env('APP_URL') !!}show/order/detail/"+order_id+"?action=print",
  776. success:function (response) {
  777. $('#print-recipt').html(response);
  778. $('#print-recipt').printThis();
  779. }
  780. });
  781. });
  782. $("body").on("click",".load-more-order",function(){
  783. var _start_page = $(this).data('start-page');
  784. var _number_of_orders = $(this).data('number-of-items');
  785. $.ajax({
  786. url:"{!! env('APP_URL') !!}liveorders",
  787. type:"POST",
  788. data:{
  789. "_token":"{!! csrf_token() !!}",
  790. status:status,
  791. start_page:_start_page,
  792. number_of_orders:_number_of_orders
  793. },
  794. success:function (response) {
  795. // response = $.parseJSON(response);
  796. console.log(response);
  797. if(response){
  798. if(response.type=="success"){
  799. var order_num_limit = "{!! env('ORDER_NUMBER_ITEMS') !!}";
  800. order_num_limit = parseInt(order_num_limit);
  801. var _total_orders = (response.orders.pagination.total_orders);
  802. _total_orders = parseInt(_total_orders);
  803. if(_total_orders > order_num_limit){
  804. $(".load-more-order").show();
  805. $(".all-orders").removeClass('full');
  806. }
  807. else{
  808. $(".load-more-order").hide();
  809. $(".all-orders").addClass('full');
  810. }
  811. $.each(response.orders,function (i,v) {
  812. if(i!="pagination"){
  813. var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
  814. ' <div class="box '+v.box_bg+' rounded-0">\n' +
  815. ' <div class="media-list media-list-divided media-list-hover">\n' +
  816. ' <div class="media align-items-center">\n' +
  817. ' <div class="media-body">\n' +
  818. ' <p>#'+v.order_ref+'</p>\n' +
  819. ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
  820. ' </div>\n' +
  821. ' <div class="media-right gap-items">\n' +
  822. ' <div class="user-social-acount text-center">\n' +
  823. ' <p class="m-0 status">'+v.status+'</p>\n' +
  824. ' <div class="d-flex align-items-center float-end">\n' +
  825. ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
  826. ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
  827. ' Min</p>\n'+
  828. ' </div>\n' +
  829. ' </div>\n' +
  830. ' </div>\n' +
  831. ' </div>\n' +
  832. ' </div>\n' +
  833. ' </div>\n' +
  834. ' </div>\n' +
  835. '</li>';
  836. counter = counter+1;
  837. $("#orders-list").append(str);
  838. }else{
  839. $('div.load-more-order').attr('data-start-page',v.next_page);
  840. $('div.load-more-order').data('start-page',v.next_page);
  841. //$("#orders-list").append(str);
  842. }
  843. });
  844. $("span."+status).html(counter);
  845. }else{
  846. $('div.load-more-order').html("No more order found");
  847. // $("#all-orders").addClass('no-order-found');
  848. }
  849. }
  850. }
  851. });
  852. });
  853. $("#all-orders").removeClass('no-order-found');
  854. $.ajax({
  855. url:"{!! env('APP_URL') !!}liveorders",
  856. type:"POST",
  857. data:{
  858. "_token":"{!! csrf_token() !!}",
  859. status:status,
  860. start_page:1,
  861. number_of_orders:100
  862. },
  863. success:function (response) {
  864. // response = $.parseJSON(response);
  865. console.log(response);
  866. if(response){
  867. if(response.type=="success"){
  868. var order_num_limit = "{!! env('ORDER_NUMBER_ITEMS') !!}";
  869. order_num_limit = parseInt(order_num_limit);
  870. var _total_orders = (response.orders.pagination.total_orders);
  871. _total_orders = parseInt(_total_orders);
  872. if(_total_orders > order_num_limit){
  873. $(".load-more-order").show();
  874. $(".all-orders").removeClass('full');
  875. }
  876. else{
  877. $(".load-more-order").hide();
  878. $(".all-orders").addClass('full');
  879. }
  880. $.each(response.orders,function (i,v) {
  881. if(i!="pagination"){
  882. var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
  883. ' <div class="box '+v.box_bg+' rounded-0">\n' +
  884. ' <div class="media-list media-list-divided media-list-hover">\n' +
  885. ' <div class="media align-items-center">\n' +
  886. ' <div class="media-body">\n' +
  887. ' <p>#'+v.order_ref+'</p>\n' +
  888. ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
  889. ' </div>\n' +
  890. ' <div class="media-right gap-items">\n' +
  891. ' <div class="user-social-acount text-center">\n' +
  892. ' <p class="m-0 status">'+v.status+'</p>\n' +
  893. ' <div class="d-flex align-items-center float-end">\n' +
  894. ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
  895. ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
  896. ' Min</p>\n'+
  897. ' </div>\n' +
  898. ' </div>\n' +
  899. ' </div>\n' +
  900. ' </div>\n' +
  901. ' </div>\n' +
  902. ' </div>\n' +
  903. ' </div>\n' +
  904. '</li>';
  905. counter = counter+1;
  906. $("#orders-list").append(str);
  907. }else{
  908. console.log(v);
  909. $('div.load-more-order').attr('data-start-page',v.next_page);
  910. //$("#orders-list").append(str);
  911. }
  912. });
  913. $("span."+status).html(counter);
  914. }else{
  915. $("#all-orders").addClass('no-order-found');
  916. $(".load-more-order").hide();
  917. }
  918. }
  919. }
  920. });
  921. $("body").on("click",".nav-link",function () {
  922. $("#orders-list").html('');
  923. $(".no-order").show();
  924. $(".order-section").hide();
  925. $('div.load-more-order').attr('data-start-page',2);
  926. $('div.load-more-order').data('start-page',2);
  927. status = $(this).data('status');
  928. $("#all-orders").removeClass('no-order-found');
  929. var counter = 0;
  930. $.ajax({
  931. url:"{!! env('APP_URL') !!}liveorders",
  932. type:"POST",
  933. data:{
  934. "_token":"{!! csrf_token() !!}",
  935. status:status,
  936. start_page:1,
  937. number_of_orders:"{!! env('ORDER_NUMBER_ITEMS') !!}"
  938. },
  939. success:function (response) {
  940. // response = $.parseJSON(response);
  941. if(response){
  942. if(response.type=="success"){
  943. var order_num_limit = "{!! env('ORDER_NUMBER_ITEMS') !!}";
  944. order_num_limit = parseInt(order_num_limit);
  945. var _total_orders = (response.orders.pagination.total_orders);
  946. _total_orders = parseInt(_total_orders);
  947. if(_total_orders > order_num_limit){
  948. $(".load-more-order").show();
  949. $(".all-orders").removeClass('full');
  950. }
  951. else{
  952. $(".load-more-order").hide();
  953. $(".all-orders").addClass('full');
  954. }
  955. $.each(response.orders,function (i,v) {
  956. if(i!="pagination"){
  957. var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
  958. ' <div class="box '+v.box_bg+' rounded-0">\n' +
  959. ' <div class="media-list media-list-divided media-list-hover">\n' +
  960. ' <div class="media align-items-center">\n' +
  961. ' <div class="media-body">\n' +
  962. ' <p>#'+v.order_ref+'</p>\n' +
  963. ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
  964. ' </div>\n' +
  965. ' <div class="media-right gap-items">\n' +
  966. ' <div class="user-social-acount text-center">\n' +
  967. ' <p class="m-0 status">'+v.status+'</p>\n' +
  968. ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
  969. ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
  970. ' Min</p>\n'+
  971. ' </div>\n' +
  972. ' </div>\n' +
  973. ' </div>\n' +
  974. ' </div>\n' +
  975. ' </div>\n' +
  976. ' </div>\n' +
  977. '</li>';
  978. $("#orders-list").append(str);
  979. counter = counter+1;
  980. }
  981. });
  982. }else{
  983. $(".load-more-order").hide();
  984. $("#all-orders").addClass('no-order-found');
  985. }
  986. //$("span."+status).html(counter);
  987. }
  988. }
  989. });
  990. });
  991. var _already_clicked = false;
  992. $("body").on("click","li[rel=detail]",function () {
  993. if(!_already_clicked){
  994. //_already_clicked = true;
  995. var id = $(this).data("order-id");
  996. order_id = id;
  997. $(".mlist_li.selected").removeClass('selected');
  998. $("#show-recipes").html('');
  999. $(this).addClass('selected');
  1000. $(".discount_with").removeClass('active');
  1001. $(".delivery_discount_with").removeClass('active');
  1002. $("p[rel]").each(function(){
  1003. $(this).html(progress_img);
  1004. });
  1005. $("#show-recipes").html(progress_img);
  1006. $(".sub_total, .delivery_fee, .delivery_discount_total, .total_txt, .tax_info").html(progress_img);
  1007. $.ajax({
  1008. url:"{!! env('APP_URL') !!}show/order/detail/"+id,
  1009. success:function (response) {
  1010. $("p[rel]").each(function(){
  1011. $(this).html('');
  1012. });
  1013. $("#show-recipes").html('');
  1014. $(".sub_total, .delivery_fee, .delivery_discount_total, .total_txt").html('');
  1015. order_object = {
  1016. geo_location:response.customer.geo_points!=""?response.customer.geo_points:response.customer.geo_location,
  1017. order_ref:response.order_info.order_ref,
  1018. brand_name:response.business_info.business_name,
  1019. outlet_name:response.business_info.outlet_name,
  1020. customer:response.customer.customer_name,
  1021. phone:response.customer.customer_phone,
  1022. payment:response.order_info.payment,
  1023. delivery_at:response.order_info.delivery_at,
  1024. address:response.customer.deliveryAddress,
  1025. sub_total_price:response.basket.sub_total.formatted_price,
  1026. delivery_fee:response.basket.delivery_fee.formatted_price,
  1027. is_discount:response.basket.is_discount,
  1028. discounted_amount:response.basket.discounted_amount.formatted_price,
  1029. is_delivery_discount:response.basket.is_delivery_discount,
  1030. delivery_discount_fee:response.basket.delivery_discounted_amount.formatted_price,
  1031. total_price:response.basket.is_discount?response.basket.discounted_total_price.formatted_price:response.basket.grand_total.formatted_price,
  1032. delivery_update_status_url:response.delivery_boy.delivery_update_status_url,
  1033. link_expire_time:response.delivery_boy.link_expire_time
  1034. };
  1035. $("#accept-modal input[name=preparation_time]").val(response.order_info.estimated_time.preparation_time);
  1036. $("#accept-modal input[name=preperation_delivery]").val(response.order_info.estimated_time.preparation_delivery_time);
  1037. $("#accept-modal select[name=preparation_type]").val(response.order_info.estimated_time.time_type);
  1038. $(".change-status").attr('data-id',id);
  1039. $(".change-status-reject").attr('data-id',id);
  1040. var o_t = response.order_info.order_type.toLowerCase();
  1041. $(".for-delivery").hide();
  1042. $(".for-pickup").hide();
  1043. $(".for-"+o_t).show();
  1044. if(o_t=="pickup"){
  1045. $("#only-delivery").hide();
  1046. }
  1047. $("p[rel=order_placed]").html(response.order_info.order_placed);
  1048. $("p[rel=order_ref]").html(response.order_info.order_ref);
  1049. $("p[rel=brand_name]").html(response.business_info.business_name);
  1050. $("p[rel=outlet_name]").html(response.business_info.outlet_name);
  1051. $(".inkitchen-btn").removeClass('org-bg');
  1052. $(".inkitchen-btn").removeClass('bg-danger');
  1053. $(".inkitchen-btn").removeClass('green-bg');
  1054. $(".inkitchen-btn").addClass(response.order_info.bg);
  1055. $(".inkitchen-btn").html(response.order_info.status);
  1056. $("p[rel=order_type]").html(response.order_info.order_type);
  1057. if(response.order_info.status=="New"){
  1058. $(".reject").show();
  1059. $(".accept").hide();
  1060. }else{
  1061. $(".accept").show();
  1062. $(".reject").hide();
  1063. }
  1064. if(response.order_info.order_type=="Dine in"){
  1065. $("#address").hide();
  1066. $("#table").show();
  1067. $("#google-map-link").hide();
  1068. }else{
  1069. $("#address").show();
  1070. $("#table").hide();
  1071. if(response.order_info.order_type=="Delivery")
  1072. $("#google-map-link").show();
  1073. else
  1074. $("#google-map-link").hide();
  1075. }
  1076. $(".change-status").html(response.order_info.next_status_label);
  1077. $(".change-status").attr('data-status',response.order_info.next_status);
  1078. $("p[rel=delivery_at]").html(response.order_info.delivery_at);
  1079. $("p[rel=payment]").html(response.order_info.payment);
  1080. $("p[rel=channel]").html(response.order_info.channel);
  1081. $("p[rel=order_instructions]").html(response.order_info.order_instructions);
  1082. $("p[rel=recipient_name]").html(response.order_info.recipient_name);
  1083. $("p[rel=recipient_phone]").html(response.order_info.recipient_phone);
  1084. $("p[rel=greeting_message]").html(response.order_info.greeting_message);
  1085. $("p[rel=customer]").html(response.customer.customer_name);
  1086. $("p[rel=phone]").html(response.customer.customer_phone);
  1087. $("p[rel=delivery_notes]").html(response.customer.delivery_instructions);
  1088. $("p[rel=address]").html(response.customer.deliveryAddress);
  1089. //BASKET INFORMATION
  1090. var items = response.basket.items?response.basket.items:null;
  1091. if(items){
  1092. $(items).each(function(index, item){
  1093. $("#show-recipes").append(show_item(item));
  1094. });
  1095. }
  1096. var is_discount = response.basket.is_discount;
  1097. if(is_discount){
  1098. $(".discount_with").addClass('active');
  1099. $(".discount_total").html(response.basket.discounted_amount.formatted_price);
  1100. $("span[rel=discount_code]").html(response.basket.discount_info.discount_code);
  1101. $("#discount-code").html(response.basket.discount_info.discount_code);
  1102. $("#discount-amount, span[rel=discount_amount]").html(response.basket.discount_info.discount_amount);
  1103. $("#discount-name").html(response.basket.discount_info.discount_name);
  1104. $("#discount-start-datetime").html(response.basket.discount_info.start_date);
  1105. $("#discount-end-datetime").html(response.basket.discount_info.end_date);
  1106. }else{
  1107. $(".discount_with").removeClass('active');
  1108. $("#discount-amount, span[rel=discount_amount]").html('');
  1109. $(".discount_total").html(0);
  1110. $("#discount-code").html('');
  1111. $("#discount-name").html('');
  1112. $("#discount-start-datetime").html('');
  1113. $("#discount-end-datetime").html('');
  1114. }
  1115. var is_loyalty = response.basket.is_loyalty;
  1116. if(is_loyalty){
  1117. $("#only-loyalty-points").addClass('active');
  1118. $(".loyalty_amount").html(response.basket.loyalty_amount.formatted_price);
  1119. }else{
  1120. $("#only-loyalty-points").removeClass('active');
  1121. $(".loyalty_amount").html(0);
  1122. }
  1123. var is_delivery_discount = response.basket.is_delivery_discount;
  1124. if(is_delivery_discount){
  1125. $(".delivery_discount_with ").addClass('active');
  1126. $(".delivery_discount_total ").html(response.basket.delivery_discounted_amount.formatted_price);
  1127. }else{
  1128. $(".delivery_discount_with").removeClass('active');
  1129. $(".delivery_discount_total").html(0);
  1130. }
  1131. $(".sub_total").html(response.basket.sub_total.formatted_price);
  1132. $(".delivery_fee").html(response.basket.delivery_fee.formatted_price);
  1133. $(".tax_info").html(response.order_info.tax_info);
  1134. if(is_discount)
  1135. $(".total_txt").html(response.basket.discounted_total_price.formatted_price);
  1136. else
  1137. $(".total_txt").html(response.basket.grand_total.formatted_price);
  1138. },
  1139. cache: false
  1140. });
  1141. $(".no-order").hide();
  1142. $(".order-section").show();
  1143. }
  1144. });
  1145. $('ul.pagination').hide();
  1146. $('#all-orders').jscroll({
  1147. autoTrigger: true,
  1148. loadingHtml: '<img class="text-center" src="{!! env('APP_ASSETS') !!}images/preloaders/preloader.svg" alt="Loading..." />',
  1149. padding: 0,
  1150. nextSelector: '.pagination li.active + li a',
  1151. contentSelector: 'div.mlist_li',
  1152. callback: function() {
  1153. $('ul.pagination').remove();
  1154. }
  1155. });
  1156. $("body").on("click",".nav-link",function () {
  1157. $(".nav-link").removeClass('active')
  1158. $(this).addClass('active')
  1159. });
  1160. $("body").on("click",".order-row",function () {
  1161. var id = $(this).data('id');
  1162. window.location = "{!! env('APP_URL') !!}order/show/"+id;
  1163. });
  1164. $("body").on("click",".accept-order",function () {
  1165. var _this = $(this);
  1166. var preparation_time = $("input[name=preparation_time]").val();
  1167. var preperation_delivery = $("input[name=preperation_delivery]").val();
  1168. var preparation_type = $("select[name=preparation_type]").val();
  1169. if(preperation_delivery==""){
  1170. $("input[name=preperation_delivery]").focus();
  1171. return false;
  1172. }
  1173. if(preparation_time==""){
  1174. $("input[name=preparation_time]").focus();
  1175. return false;
  1176. }
  1177. _this.attr('disabled','disabled');
  1178. _this.html(progress_img);
  1179. _this.removeClass('btn-primary');
  1180. _this.addClass('btn-muted');
  1181. $.ajax({
  1182. url:"{!! env('APP_URL') !!}update/order/status",
  1183. type:"POST",
  1184. data:{
  1185. id:order_id,
  1186. status:"Accepted",
  1187. preparation_time:preparation_time,
  1188. preperation_delivery:preperation_delivery,
  1189. preparation_type:preparation_type,
  1190. "_token":"{!! csrf_token() !!}"
  1191. },
  1192. success:function (response) {
  1193. if(response.type=="error"){
  1194. // alert(response.message);
  1195. swal({
  1196. title:"Order Status",
  1197. text: response.message,
  1198. type: "error",
  1199. showCancelButton: false,
  1200. confirmButtonText: " OK!",
  1201. closeOnConfirm: true,
  1202. });
  1203. }else{
  1204. @if($is_allow_print_preview=="Enabled")
  1205. $(".print").trigger('click');
  1206. @endif
  1207. }
  1208. $("#accept-modal").modal('hide');
  1209. // alert();
  1210. $(".mlist_li.selected").remove();
  1211. //$("#orders-list").html('');
  1212. _this.removeAttr('disabled');
  1213. _this.html('Accept Order');
  1214. _this.removeClass('btn-muted');
  1215. _this.addClass('btn-primary');
  1216. count_order_status();
  1217. audio.pause();
  1218. $(".no-order").show();
  1219. $(".order-section").hide();
  1220. }
  1221. });
  1222. });
  1223. $("body").on("click",'.change-status,.change-status-reject',function (e) {
  1224. // alert();
  1225. var s = $(".nav-link.active").data('status');
  1226. var status = $(this).attr('data-status');
  1227. // alert(status); return;
  1228. if(status=="Rejected"){
  1229. swal({
  1230. title: "Are you sure?",
  1231. text: "You will not be able to recover this order!",
  1232. type: "warning",
  1233. showCancelButton: true,
  1234. confirmButtonColor: "#DD6B55",
  1235. confirmButtonText: "Yes, Reject it!",
  1236. closeOnConfirm: false
  1237. }, function(e){
  1238. if(e){
  1239. //.after('disable-this');
  1240. $(".sa-button-container .confirm").attr('disabled','disabled');
  1241. //$(".sa-button-container .confirm").html(progress_img);
  1242. $(".sa-button-container .confirm").removeClass('btn-primary');
  1243. $(".sa-button-container .confirm").addClass('btn-muted');
  1244. $.ajax({
  1245. url:"{!! env('APP_URL') !!}update/order/status",
  1246. type:"POST",
  1247. data:{
  1248. id:order_id,
  1249. status:status,
  1250. "_token":"{!! csrf_token() !!}"
  1251. },
  1252. success:function () {
  1253. //alert();
  1254. $(".sa-button-container .confirm").removeAttr('disabled');
  1255. //$(".sa-button-container .confirm").html(progress_img);
  1256. $(".sa-button-container .confirm").addClass('btn-primary');
  1257. $(".sa-button-container .confirm").removeClass('btn-muted');
  1258. swal.close()
  1259. $(".mlist_li.selected").remove();
  1260. $(".no-order").show();
  1261. $(".order-section").hide();
  1262. count_order_status();
  1263. audio.pause();
  1264. // swal("Rejected!", "Order is rejected.", "success");
  1265. }
  1266. });
  1267. }
  1268. });
  1269. return false;
  1270. }
  1271. if(status=="Accepted"){
  1272. $("#accept-modal").modal('show');
  1273. return false;
  1274. }
  1275. // alert(order_id);
  1276. $.ajax({
  1277. url:"{!! env('APP_URL') !!}update/order/status",
  1278. type:"POST",
  1279. data:{
  1280. id:order_id,
  1281. status:status,
  1282. "_token":"{!! csrf_token() !!}"
  1283. },
  1284. success:function () {
  1285. $(".mlist_li.selected").remove();
  1286. count_order_status();
  1287. if(s=="all"){
  1288. $("#orders-list").html('');
  1289. }
  1290. $(".no-order").show();
  1291. $(".order-section").hide();
  1292. }
  1293. });
  1294. e.preventDefault();
  1295. e.stopPropagation();
  1296. });
  1297. $('.table').DataTable({
  1298. "order": [[ 0, "desc" ]],
  1299. 'paging' : true,
  1300. 'lengthChange': true,
  1301. 'searching' : true,
  1302. 'ordering' : true,
  1303. 'info' : true,
  1304. 'autoWidth' : true,
  1305. /*"processing": true,
  1306. "serverSide": true,
  1307. "ajax": "{!! env('APP_URL') !!}get/ajax/orders",
  1308. "order": [[ 0, "desc", ]],*/
  1309. "lengthMenu": [ 50, 100, 150 ]
  1310. });
  1311. var min_minus = 1;
  1312. setInterval(function(){
  1313. $(".circle-div").each(function (i,v) {
  1314. var min = parseInt($(this).data('min'));
  1315. min = 1;
  1316. if((min)>0){
  1317. var new_time = (min-min_minus);
  1318. // alert(new_time);
  1319. if(new_time >= 0){
  1320. $(this).attr('data-min',new_time);
  1321. $(this).find('p.min').html(new_time+"<br />Min");
  1322. }
  1323. }
  1324. });
  1325. min_minus++;
  1326. },60000);
  1327. })
  1328. function show_recipe(recipe){
  1329. var discount_amount = parseFloat(recipe.discount_amount);
  1330. var str='<div class="box-header border-1 ">\n' +
  1331. ' <div class="ml-5">\n' +
  1332. ' <div class="d-flex justify-content-between align-items-center">\n' +
  1333. ' <p><span class="badge rounded-pill bg-secondary mx-2">'+recipe.quantity+' </span><img src="'+recipe.recipe_image+'" style="border-radius:10px; margin:0 3px" height="40px" width="40px" /> '+recipe.recipe_name+'</p>\n' ;
  1334. if(recipe.total_price > 0){
  1335. var price = parseFloat(recipe.total_price);
  1336. if(discount_amount > 0){
  1337. if(recipe.discount_type=="%"){
  1338. price = price - (price * (discount_amount/100));
  1339. price = "<span>"+price+"</span>" + "<span style='margin-left:10px; color:red'><del>"+recipe.total_price+"</del></span>";
  1340. }
  1341. }
  1342. str+= ' <p>{{ $currency }} '+price+'</p>\n';
  1343. }
  1344. if(recipe.extra_options){
  1345. str+='<dl>';
  1346. if(recipe.extra_options){
  1347. $.each(recipe.extra_options,function(c,d){
  1348. @if($business_type=="ClothsStore")
  1349. if(c=="color")
  1350. str+='<div style="width: 20px; height: 20px; background-color: '+d+'; border-radius: 20px; float:left"></div>';
  1351. if(c=="size")
  1352. str+='<div style="float:right;font-size: 14px;margin-left: 8px;font-weight: 700;"> '+d+'</div>';
  1353. @else
  1354. if(d.price && d.price!=""){
  1355. var price = parseFloat(d.price);
  1356. console.log("p: "+d.price);
  1357. if(discount_amount > 0){
  1358. if(recipe.discount_type=="%"){
  1359. price = price - (price * (discount_amount/100));
  1360. price = "<span>"+price+"</span>" + "<span style='margin-left:10px; color:red'><del>"+d.price+"</del></span>";
  1361. }
  1362. }
  1363. var extItemName = d.name;
  1364. @if($lang=='ar')
  1365. extItemName = d.name_ar;
  1366. @endif
  1367. str+="<dt>"+
  1368. extItemName
  1369. +" : {{ $currency }} "+price;
  1370. if(d.sub_items){
  1371. //str+="<ul>";
  1372. $.each(d.sub_items,function(m,n){
  1373. console.log("Sub Items");
  1374. str+="<dd>"+n.name+"</dd>";
  1375. });
  1376. //str+="</dt>";
  1377. }
  1378. str+="</li>";
  1379. }else{
  1380. var extItemName = d.name;
  1381. @if($lang=='ar')
  1382. extItemName = d.name_ar;
  1383. @endif
  1384. str+="<dt>"+
  1385. extItemName;
  1386. if(d.sub_items){
  1387. //str+="<ul>";
  1388. $.each(d.sub_items,function(m,n){
  1389. console.log("Sub Items");
  1390. str+="<dd>"+n.name+"</dd>";
  1391. });
  1392. //str+="</dt>";
  1393. }
  1394. str+="</li>";
  1395. }
  1396. @endif
  1397. });
  1398. }
  1399. str+='<dl>';
  1400. }
  1401. str+=
  1402. ' </div>\n' +
  1403. ' </div>\n' +
  1404. ' </div>';
  1405. return str;
  1406. }
  1407. function show_recipe_with_discount(recipe,with_discount){
  1408. var discount_amount = 0;
  1409. if(with_discount.discount_type=="percentage")
  1410. discount_amount = parseFloat(with_discount.discount_value)/100;
  1411. else
  1412. discount_amount = parseFloat(with_discount.discounted_amount);
  1413. var str='<div class="box-header border-1 ">\n' +
  1414. ' <div class="ml-5">\n' +
  1415. ' <div class="d-flex justify-content-between align-items-center">\n' +
  1416. ' <p><span class="badge rounded-pill bg-secondary mx-2">'+recipe.quantity+' </span><img src="'+recipe.recipe_image+'" style="border-radius:10px; margin:0 3px" height="40px" width="40px" /> '+recipe.recipe_name+'</p>\n' ;
  1417. if(recipe.total_price > 0){
  1418. var price = parseFloat(recipe.total_price);
  1419. var discounted_price = 0;
  1420. if(with_discount.discount_type=="percentage"){
  1421. discounted_price = parseFloat(price) - (parseFloat(price) * (parseFloat(with_discount.discount_value)/100));
  1422. console.log(discounted_price);
  1423. }
  1424. //price = price - (price * (discount_amount/100));
  1425. if(discounted_price > 0)
  1426. price = "<span>"+discounted_price+"</span>" +"<span style='margin-left:10px; color:red'><del>"+price+"</del></span>"+ "</span>";
  1427. else
  1428. price = "<span>"+discounted_price+"</span>" + "</span>";
  1429. str+= ' <p>{{ $currency }} '+price+'</p>\n';
  1430. }
  1431. if(recipe.extra_options){
  1432. str+='<dl>';
  1433. if(recipe.extra_options){
  1434. console.log(recipe.extra_options);
  1435. $.each(recipe.extra_options,function(c,d){
  1436. @if($business_type=="ClothsStore")
  1437. if(c=="color")
  1438. str+='<div style="width: 20px; height: 20px; background-color: '+d+'; border-radius: 20px; float:left"></div>';
  1439. if(c=="size")
  1440. str+='<div style="float:right;font-size: 14px;margin-left: 8px;font-weight: 700;"> '+d+'</div>';
  1441. @else
  1442. if(d.price && d.price!=""){
  1443. console.log('In d.price: '+d.price);
  1444. var price = parseFloat(d.price);
  1445. if(discount_amount > 0){
  1446. var _pric = parseFloat(price) - (parseFloat(price) * (parseFloat(with_discount.discount_value)/100));
  1447. price += _pric;
  1448. price = "<span>"+_pric+"</span>" + "<span style='margin-left:10px; color:red'><del>"+d.price+"</del></span>";
  1449. }
  1450. str+="<dt>"+d.name+" : {{ $currency }} "+price;
  1451. if(d.sub_items){
  1452. //str+="<ul>";
  1453. $.each(d.sub_items,function(m,n){
  1454. console.log("Sub Items");
  1455. str+="<dd>"+n.name+"</dd>";
  1456. });
  1457. //str+="</dt>";
  1458. }
  1459. str+="</li>"
  1460. }else{
  1461. str+="<dt>"+d.name+"</dt>";
  1462. }
  1463. @endif
  1464. });
  1465. }
  1466. str+='<dl>';
  1467. }
  1468. str+=
  1469. ' </div>\n' +
  1470. ' </div>\n' +
  1471. ' </div>';
  1472. return str;
  1473. }
  1474. function order_text_template(object,action){
  1475. console.log(object);
  1476. var sep = "%0A";
  1477. if(action=="copy-clipboard")
  1478. sep = "\n";
  1479. var map = "https://maps.google.com/?q="+object.geo_location;
  1480. var str = "I would like to share an order with you:"+sep+sep;
  1481. str += "*OrderID:* "+object.order_ref+' '+sep;
  1482. str += " *Business:* "+object.brand_name.replaceAll('&','%26')+' '+sep;
  1483. str += " *Outlet:* "+object.outlet_name.replaceAll('&','%26')+' '+sep;
  1484. str += " *Customer Name:* "+object.customer+' '+sep;
  1485. str += " *Customer Phone No:* "+object.phone+' '+sep;
  1486. str += " *Payment Method:* "+object.payment+' '+sep;
  1487. str += " *Delivery Date:* "+object.delivery_at+' '+sep;
  1488. str += " *Delivery Address:* "+object.address+' '+sep;
  1489. if(action=="copy-clipboard")
  1490. str += ' *Map:* '+(map)+' '+sep;
  1491. else
  1492. str += ' *Map:* '+encodeURIComponent(map)+' '+sep;
  1493. str += ' *Sub Total:* '+object.sub_total_price+sep;
  1494. if(object.is_discount){
  1495. str += ' *Discount:* '+object.discounted_amount+sep;
  1496. }
  1497. str += ' *Delivery Fee:* '+object.delivery_fee+sep;
  1498. if(object.is_delivery_discount){
  1499. str += ' *Delivery Discount:* '+object.delivery_discount_fee+sep;
  1500. }
  1501. str += ' *Total:* '+(parseFloat(object.total_price))+sep;
  1502. str += ' *Mark as delivered:* '+(object.delivery_update_status_url)+' (Link will expire at '+ object.link_expire_time +')'+sep;
  1503. return str;
  1504. }
  1505. function show_item(item){
  1506. var show_item= '<div class="item-list p-3"><div class="d-flex justify-content-between align-items-center">'+
  1507. '<p><span class="badge rounded-pill bg-secondary mx-2">'+item.quantity+' </span>'+
  1508. '<img src="'+item.item_image+'" style="border-radius:10px; margin:0 3px" height="40px" width="40px"> '+item.item_name+'</p>';
  1509. if(item.item_price.normal_price > 0)
  1510. show_item+=' <p> <span>'+item.item_price.formatted_price+'</span></p>';
  1511. show_item+=' </div>' +
  1512. sub_items(item.sub_items)
  1513. '</div>';
  1514. return show_item;
  1515. }
  1516. function sub_items(sub_items){
  1517. // console.log(sub_items.length);
  1518. var _list = "";
  1519. if(sub_items && sub_items.length > 0){
  1520. _list = '<ul class="list-group col-sm-6 list-group-flush">';
  1521. $(sub_items).each(function(index,item){
  1522. var _pull_class = (lang=="en"?"pull-right":"pull-left");
  1523. //_list+='<li class="list-group-item"><span class="badge rounded-pill bg-secondary mx-2">'+item.quantity+'</span> '+item.name+'</li>';
  1524. _list+='<li class="list-group-item"><span class="badge rounded-pill bg-secondary mx-2">'+item.quantity+'</span> '+item.name+' '+(typeof item.price !=="undefined" && item.price.formatted_price ?'<span class="fw-bold text-end '+_pull_class+'">'+item.price.formatted_price+'</span>':"")+'</li>';
  1525. });
  1526. _list+='</ul>'
  1527. }
  1528. return _list;
  1529. }
  1530. </script>
  1531. @endsection