123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701 |
- @extends('layouts.app')
- @section('page-title')| Live Orders @endsection
- @section('css')
- <link href="{!! env('APP_ASSETS') !!}css/liveorder.css?v={!! time() !!}" rel="stylesheet" type="text/css">
- @endsection
- @section('content')
- <style>
- .arrow-arabic svg{
- -webkit-transform:rotate(180deg);
- -moz-transform: rotate(180deg);
- -ms-transform: rotate(180deg);
- -o-transform: rotate(180deg);
- transform: rotate(180deg);
- }
- body {
- background-color: #FFF;
- }
- #print-recipt{
- display: none; }
- .mlist_li.selected{
- color: #000;
- background-color: #f1f1f1;
- }
- #show-recipes .box-header{
- padding: 15px 1.5rem 5px;
- }
- @-webkit-keyframes special {
- from { background-color: rgba(255, 121, 77, 0.27); }
- to { background-color: inherit; }
- }
- @-moz-keyframes special {
- from { background-color: rgba(255, 121, 77, 0.27);; }
- to { background-color: inherit; }
- }
- @-o-keyframes special {
- from { background-color: rgba(255, 121, 77, 0.27);; }
- to { background-color: inherit; }
- }
- @keyframes special {
- from { background-color: rgba(255, 121, 77, 0.27);; }
- to { background-color: inherit; }
- }
- .special {
- -webkit-animation: special 1s infinite; /* Safari 4+ */
- -moz-animation: special 1s infinite; /* Fx 5+ */
- -o-animation: special 1s infinite; /* Opera 12+ */
- animation: special 1s infinite; /* IE 10+ */
- }
- .mlist_li.selected .media, .mlist_li.selected .box{
- /*background-color: transparent !important;*/
- }
- .mlist_li.selected p{
- color:#000 !important;
- }
- .labelcenter { width: auto}
- .gap-items p.status{ font-size: 12px}
- .gap-items p.min{
- line-height: 13px;
- padding-top: 11px;
- font-size: 11px;
- }
- .bg-danger p.min, .bg-danger .gap-items p.status{
- display: none;}
- .bg-danger .circle-div{ height: 10px; width: 10px; background: #fff !important; margin-right: 15px;}
- .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{
- background-color: transparent !important;
- }
- .mlist_li.selected .media-list{
- color: #000;
- background-color: #f1f1f1 !important;
- }
- .sidebar-mini.sidebar-collapse .content-wrapper {
- width: calc(100% - 60px) !important;
- margin-left: 60px !important;
- }
- .no-order-found{
- background-color: #000;
- background-image: url({!! env('APP_ASSETS') !!}images/no-order.png);
- background-repeat: no-repeat;
- background-position: center;
- ;
- }
-
- .actions{
- position:absolute; top: 20px; right: 10px;
- }
- .actions li{ margin:0 !important; padding:0}
- @media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1){
- body {
- padding: 0px !important;
- }
- }
-
- @media (max-width:767px){
- .actions {
- position: absolute;
- top: 20px;
- right: 15px;
- }
-
- .calc_div{
- padding: 14px;
- }
-
- .mlist_li.selected p {
- color: #fff!important;
- }
- .mlist_li.selected .media-list {
- color: #fff;
- background-color: transparent!important;
- }
- body.fixed {
- overflow-y:hidden;
- }
-
-
- .for-mobile{
- /* max-height: 330px; */
- max-height: 60vh;
- overflow: auto;
-
- }
-
- #show-recipes .box-header {
- padding:0rem 18px 0 12px !important;
- }
- .right-panel-footer p{margin-bottom: 5px !important;
- padding: 0 !important;}
- .button-bottom-div{margin-top: 0px !important;}
-
- }
-
- .box-header p {
- margin-bottom: 0;
- }
- .box-header {
- padding: 1.5rem 0.5rem;
- }
- @media (max-width:767px){
- .box-header {
- padding: 0.5rem 14px;
- }
- }
- @media (max-width: 1024px){
- .navbar-custom-menu .navbar-nav > li:last-child > a {
- line-height: 25px;
- margin-left: 30px !important;
- }
- }
- @media (min-width: 768px) and (max-width: 1024px) {
-
- body{
- overflow-x:hidden !important;
- overflow-y:hidden !important;
- }
- }
- </style>
- @php
- $resto = \App\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID());
- $lang = $resto->default_lang;
- app()->setLocale($lang);
- if(session('app_lang') !==null){
- $lang = session('app_lang');
- app()->setLocale($lang);
- }
- $restuarant1 = $resto;
- $resto_meta = isset($restuarant1->resto_metas)?$restuarant1->resto_metas:null;
- //dump($resto_meta);
- $resto_metas = [];
- $billing = [];
- if(isset($resto_meta)){
- foreach($resto_meta as $meta){
- if($meta->outlet_id!=""){
- continue;
- }
- $index_name = isset($meta->resto_meta_defs->parents)?$meta->resto_meta_defs->parents->meta_def_name:$meta->resto_meta_defs->meta_def_name;
-
- // dump($meta->resto_meta_defs);
- if($index_name=="BILLING_GATEWAY"){
- // dump($meta->resto_meta_defs->meta_def_name);
- // $resto_metas['BILLING_GATEWAY'][] = $meta->meta_val;
- $billing[] = array('id'=>$meta->meta_id,'value'=>$meta->meta_val);
- }
- $resto_metas[$index_name] = $meta->meta_val;
- }
- }
- $resto_metas['BILLING_GATEWAY'] = $billing;
- $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD";
- $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants";
- $is_allow_print_preview = isset($resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER'])?$resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER']:"Disabled";
-
- @endphp
- <!-- Content Wrapper. Contains page content -->
- <div class="content-wrapper">
- <div id="countdown"></div>
- <div class="container-full">
- <section class="content p-0">
- <div class="row">
- <div class="col-sm-12">
- <nav class="navbar navbar-static-top ">
- <!-- Sidebar toggle button-->
- <div class="row">
- <div class="col-md-12 tab-bar-section">
- <div class="app">
- <ul class="hs full nav nav-tabs" role="tablist">
- <li class="item nav-item d-flex align-items-start">
- <div class="gap-items-4 d-flex justify-content-end">
- <a class="nav-link p-0 active" data-bs-toggle="tab" href="#all-orders" data-status="all" role="tab">{{__('label.all')}}
- <span class="labelcenter label-default all">0</span></a>
- </div>
- </li>
- <li class="item nav-item d-flex align-items-start ">
- <div class="gap-items-4 d-flex justify-content-end">
- <a class="nav-link p-0" data-bs-toggle="tab" href="#new-orders" data-status="new" role="tab">{{__('label.new')}}
- <span class="labelcenter label-default new">0</span></a>
- </div>
- </li>
- <li class="item nav-item d-flex align-items-start">
- <div class="gap-items-4 d-flex justify-content-end">
- <a class="nav-link p-0" data-bs-toggle="tab" href="#in-kitchen" data-status="kitchen" role="tab">{{__('label.in_preparation')}}
- <span class="labelcenter label-default kitchen">0</span></a>
- </div>
- </li>
- <li class="item nav-item d-flex align-items-start">
- <div class="gap-items-4 d-flex justify-content-end">
- <a class="nav-link p-0" data-bs-toggle="tab" href="#in-route" data-status="route" role="tab" >{{__('label.in_routeready')}}
- <span class="labelcenter label-default route">0</span></a>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- <div class="app-menu"></div> -->
- <a href="#" class="d-inline-block btn right-bar-btn waves-effect waves-circle btn btn-circle btn-danger btn-sm right-close-btn">
- <i class="mdi mdi-close"></i>
- </a>
- </nav>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12 col-md-4 order-sections-list" style="background-color: #f1f1f1">
- <div class="row p-10">
- <div class="col-md-12 mt-5">
- <div class="search-bx mx-5">
- <form>
- <div class="input-group search-div">
- <input type="search" class="form-control" style="background-color: transparent" placeholder="{{__('label.search_by_order_id')}}" aria-label="Search" aria-describedby="button-addon2">
- <div class="input-group-append">
- <button class="btn btn-sarch" type="submit" id="button-addon3"><i class="ti-search"></i></button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="row mt-5 list_row">
- <div class=" col-md-12 p-0">
- <div class="tab-content">
- <div class="tab-pane fade in active all-orders" id="all-orders" role="tabpanel" style="max-height: 82vh; min-height: 82vh; overflow: auto;">
- <div class="p-0">
- <ul class="list-group list-ul list-unstyled orders-list" id="orders-list">
- {{--<li class="mlist_li p-5 mb-5 pl-15">
- <div class="d-grid gap-2 d-flex justify-content-center">
- <button class="btn btn-md btn-primary ref-btn">Refresh</button>
- </div>
- </li>--}}
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-sm-12 col-md-6 box-shadowed">
- <div class="no-order" style="padding-top: 50%; height: 90vh ;">
- <h3 class="text-center text-light">{{__('label.no_order_selected')}}</h3>
- </div>
- <div class="order-section" style="display: none; height: 90vh ; overflow-x: auto">
- <div class="row back-to-orders d-md-none d-lg-none">
- <div class="col-sm-12 text-center @if($lang=='ar') arrow-arabic @endif">
- @if($lang=="en")
- <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">
- <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)"/>
- </svg>
- {{__('label.live_orders')}}
- @else
-
- <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">
- <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)"/>
- </svg> {{__('label.live_orders')}}
-
- @endif
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <div class="boxs">
- <div class="box-header with-border">
- <div class="d-flex justify-content-between align-items-center">
- <p class="fw-bold" rel="order_ref"></p>
- <p rel="order_placed"></p>
- <span class="inkitchen-btn badge badge-warning " id="toggle"></span>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12 mt-1 text-end">
- <a href="#!" class="print">{{__('label.print')}}</a>
- </div>
- </div>
- <div class="for-mobile">
- <div class="row right-panel-box">
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div>
- <p class="text-fade mb-0">{{__('label.brand')}}</p>
- <p rel="brand_name"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div>
- <p class="text-fade mb-0">{{__('label.outlets')}}</p>
- <p rel="outlet_name"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row right-panel-box">
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div>
- <p class="text-fade mb-0">{{__('label.order_type')}}</p>
- <p>
- <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>
- <span rel="order_type"></span>
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6 for-delivery">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.delivery_at')}}</p>
- <p rel="delivery_at"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6 for-pickup" style="display:none">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.pickup_at')}}</p>
- <p rel="delivery_at"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row right-panel-box">
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.customers')}}</p>
- <p rel="customer"> <br>
- <i class="mdi mdi-crown org-color"></i>
- <small class="org-color">Ordered 5 times </small>
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.phone_number')}}</p>
- <p rel="phone"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row right-panel-box">
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.payment_mode')}}</p>
- <p rel="payment"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.channel')}}</p>
- <p rel="channel"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row right-panel-box">
- <!--<div class="col-md-6" id="address">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">Address</p>
- <p rel="address"></p>
- </div>
- </div>
- </div>
- </div>
- </div>-->
- <div class="col-6" id="table" style="display:none">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.table')}}</p>
- <p rel="for_table"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6 for-delivery">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">
- {{__('label.order_notes')}}</p>
- <p rel="delivery_notes">
- </p>
- <p rel="order_instructions">
- </p>
-
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="row right-panel-box">
- <div class="col-md-12">
- <div class="boxs" style="position: relative">
- <div class="box-body address_action_div">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.address')}}</p>
- <p rel="address" style="max-width: 80%"></p>
- </div>
- </div>
- </div>
-
- <div class="actions">
-
- <ul class="list-inline">
- <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>
- <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>
- <li class="list-inline-item">
- <a href="#!" class="address-actions" data-action="whatsapp">
- <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>
- </a>
- </li>
- </ul>
-
- </div>
- </div>
- </div>
- </div>
- @if( $business_type=="Florist")
- <div class="row right-panel-box" >
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.receiver_name')}}</p>
- <p rel="recipient_name"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-6">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.receiver_phone')}}</p>
- <p rel="recipient_phone"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- <div class="row right-panel-box" >
- <div class="col-md-12">
- <div class="boxs">
- <div class="box-body">
- <div class="d-flex align-items-start">
- <div class="">
- <p class="text-fade mb-0">{{__('label.greeting_message')}}</p>
- <p rel="greeting_message"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endif
- <div class="col-12" id="show-recipes"></div>
- <div class="col-12 calc_div">
- <div class="box-header border-0 p-15 mt-0 pb-0">
- <div class="d-flex justify-content-between align-items-center m-0">
- <p>{{__('label.sub_total')}}:</p>
- <p class="sub_total"></p>
- </div>
- <div class="d-flex justify-content-between align-items-center m-0">
- <p>{{__('label.delivery_fee')}}:</p>
- <p class="delivery_fee"></p>
- </div>
- <div class="d-flex justify-content-between align-items-center m-0">
- <p class="">{{__('label.total')}}:</p>
- <p class="total_txt"></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row mt-0 right-panel-footer footer_btn_div">
-
-
- <div class="col-12 mt-5 button-bottom-div">
- <div class="m-0 text-center">
- <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>
- <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>
- <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>
- <button type="button" class="waves-effect waves-light btn btn-default btn-w80 rounded-0 ready-collect change-status " data-status="">{{__('label.accept')}}</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- /.content -->
- </div>
- </div>
- <!-- /.content-wrapper -->
- <div class="modal center-modal fade" id="accept-modal" tabindex="-1">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-body">
- <h4>{{__('label.order_settings')}}</h4>
- <p>{{__('label.set_time_preparing_orders')}}</p>
- <div class="row">
- <div class="col-sm-6">
- <div class="form-group">
- <label>{{__('label.preparation_minutes')}}</label>
- <input type="text" name="preparation_time" class="form-control" value="15" />
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label>{{__('label.preparation_delivery_minutes')}}</label>
- <input type="text" name="preperation_delivery" class="form-control" value="40" />
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer modal-footer-uniform">
- <button type="button" class="btn btn-danger" data-bs-dismiss="modal">{{__('label.close')}}</button>
- <button type="button" class="btn btn-primary float-end accept-order">{{__('label.accept')}}</button>
- </div>
- </div>
- </div>
- </div>
- <div id="print-recipt"> </div>
- @endsection
- @section('js')
- <script src="{!! env('APP_ASSETS') !!}js/jquery.jscroll.min.js"></script>
- <script src="{!! env('APP_ASSETS') !!}js/jquery.countdown360.min.js"></script>
- <script src="{!! env('APP_ASSETS') !!}vendor_components/sweetalert/sweetalert.min.js"></script>
- <script>
- var resto_id = 0;
- var status = "all";
- var counter = 0;
- var order_id = null;
- var order_object = null;
- $(function () {
- $("body").on("click",".back-to-orders",function () {
- $(".order-section").hide();
- });
-
- $("body").on("click",".address-actions",function(){
- var _actions = $(this).data("action");
- if(_actions=="google-map"){
- var map = "https://maps.google.com/?q="+order_object.geo_location;
- window.open(map,"_blank");
- return false;
- }
-
- if(_actions=="whatsapp"){
- var template = order_text_template(order_object,"whatsapp");
- //console.log(encodeURIComponent(template));
- window.open("https://api.whatsapp.com/send?text="+(template),"_blank");
- }
-
- if(_actions=="copy-clipboard"){
- var template = order_text_template(order_object,"copy-clipboard");
- //console.log(encodeURIComponent(template));
- navigator.clipboard.writeText(template);
- }
-
-
-
- });
-
- $("body").on("click",".print",function () {
- $.ajax({
- url:"{!! env('APP_URL') !!}order/print/"+order_id,
- success:function (response) {
- $('#print-recipt').html(response);
- $('#print-recipt').printThis();
- }
- });
- });
- $.ajax({
- url: "{!! env('APP_URL') !!}order/counts",
- success: function (response) {
- // response = $.parseJSON(response);
- var total_accepted = 0;
- var total = 0;
- $.each(response,function (i,v) {
- if(v.status=="Send_to_Kitchen" || v.status=="Accepted"){
- total_accepted+=parseInt(v.status_count);
- total+=parseInt(v.status_count);
- $(".labelcenter.kitchen").text(total_accepted);
- }
- if(v.status=="On_Road"){
- $(".labelcenter.route").text(v.status_count);
- total+=parseInt(v.status_count);
- }
- if(v.status=="Placed"){
- $(".labelcenter.new").text(v.status_count);
- total+=parseInt(v.status_count);
- if(parseInt(v.status_count) > 0){
- $("#order-counter").html(v.status_count);
- $("#order-counter").show();
- }
- }
- });
- $(".labelcenter.all").text(total);
- }
- });
- $("#all-orders").removeClass('no-order-found');
- $.ajax({
- url:"{!! env('APP_URL') !!}liveorders/"+status,
- success:function (response) {
- // response = $.parseJSON(response);
- if(response){
- if(response.type=="success"){
- $.each(response.orders,function (i,v) {
- var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
- ' <div class="box '+v.box_bg+' rounded-0">\n' +
- ' <div class="media-list media-list-divided media-list-hover">\n' +
- ' <div class="media align-items-center">\n' +
- ' <div class="media-body">\n' +
- ' <p>#'+v.order_ref+'</p>\n' +
- ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
- ' </div>\n' +
- ' <div class="media-right gap-items">\n' +
- ' <div class="user-social-acount text-center">\n' +
- ' <p class="m-0 status">'+v.status+'</p>\n' +
- ' <div class="d-flex align-items-center float-end">\n' +
- ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
- ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
- ' Min</p>\n'+
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- '</li>';
- counter = counter+1;
- $("#orders-list").append(str);
- });
- $("span."+status).html(counter);
- }else{
- $("#all-orders").addClass('no-order-found');
- }
- }
- }
- });
- $("body").on("click",".nav-link",function () {
- $("#orders-list").html('');
- $(".no-order").show();
- $(".order-section").hide();
- status = $(this).data('status');
- $("#all-orders").removeClass('no-order-found');
- var counter = 0;
- $.ajax({
- url:"{!! env('APP_URL') !!}liveorders/"+status,
- success:function (response) {
- // response = $.parseJSON(response);
- if(response){
- if(response.type=="success"){
- $.each(response.orders,function (i,v) {
- var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
- ' <div class="box '+v.box_bg+' rounded-0">\n' +
- ' <div class="media-list media-list-divided media-list-hover">\n' +
- ' <div class="media align-items-center">\n' +
- ' <div class="media-body">\n' +
- ' <p>#'+v.order_ref+'</p>\n' +
- ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
- ' </div>\n' +
- ' <div class="media-right gap-items">\n' +
- ' <div class="user-social-acount text-center">\n' +
- ' <p class="m-0 status">'+v.status+'</p>\n' +
- ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
- ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
- ' Min</p>\n'+
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- '</li>';
- $("#orders-list").append(str);
- counter = counter+1;
- });
- }else{
- $("#all-orders").addClass('no-order-found');
- }
- //$("span."+status).html(counter);
- }
- }
- });
- });
-
- var _already_clicked = false;
- $("body").on("click","li[rel=detail]",function () {
-
- if(!_already_clicked){
-
- _already_clicked = true;
-
- var id = $(this).data("order-id");
- order_id = id;
- $(".mlist_li.selected").removeClass('selected');
- $("#show-recipes").html('');
- $(this).addClass('selected');
- $.ajax({
- url:"{!! env('APP_URL') !!}get/order/detail/"+id,
- success:function (response) {
- _already_clicked = false;
- response = $.parseJSON(response);
- order_object = response;
- var price = 0;
- var delivery_fee = 0;
- $(".change-status").attr('data-id',id);
- $(".change-status-reject").attr('data-id',id);
- var o_t = response.order_type.toLowerCase();
- $(".for-delivery").hide();
- $(".for-pickup").hide();
- $(".for-"+o_t).show();
- $.each(response,function (i,v) {
- $("p[rel="+i+"]").text(v);
- $("span[rel="+i+"]").text(v);
- if(i=="delivery_fee"){
- delivery_fee = v;
- $(".delivery_fee").html("{{ $currency }} "+v);
- }
- if(i=="geo_location"){
- $("p[rel=google-map-link]").html('<a target="_blank" href="https://maps.google.com/?q='+v+'">Share</a>');
- //$("p[rel=google-map-link]").html('<a target="_blank" href="https://maps.googleapis.com/maps/api/staticmap?zoom=15&size=900x500&markers=color:yellow|label:D|'+v+'&key=AIzaSyBFh6fzq8G7dgWLfz8kccvTlmPCSI_uWXQ">Share</a>');
- }
- if(i=="order_type"){
- if(v=="Dine in"){
- $("#address").hide();
- $("#table").show();
- $("#google-map-link").hide();
- }else{
- $("#address").show();
- $("#table").hide();
- if(v=="Delivery")
- $("#google-map-link").show();
- else
- $("#google-map-link").hide();
- }
-
- }
- if(i=="status"){
- $(".inkitchen-btn").html(v);
- $(".inkitchen-btn").addClass();
- if(v=="New"){
- $(".reject").show();
- $(".accept").hide();
- }else{
- $(".accept").show();
- $(".reject").hide();
- }
- }
- if(i=="bg"){
- $(".inkitchen-btn").removeClass('org-bg');
- $(".inkitchen-btn").removeClass('bg-danger');
- $(".inkitchen-btn").removeClass('green-bg');
- $(".inkitchen-btn").addClass(v);
- }
- if(i=="next_action"){
- if(v=="Accepted")
- $(".change-status").html("{{__('label.accept')}}");
- else
- $(".change-status").html(v);
- }
- if(i=="next_status"){
- $(".change-status").attr('data-status',v);
- }
- if(i=="recipes"){
- var recipes = v;
- if(recipes){
- /*$.each(recipes,function(m,n){
- console.log(n);
- $("#show-recipes").append(show_recipe(n));
- price+=parseFloat(n.total_price);
- console.log("price: "+price);
- @if($business_type!="ClothsStore")
- if(n.extra_options){
- $.each(n.extra_options,function(c,d){
- price+=(parseInt(n.quantity) * parseFloat(d.price));
- });
- }
- @endif
- });*/
-
- $.each(recipes,function(m,n){
- console.log(n);
- $("#show-recipes").append(show_recipe(n));
- var discount_amount = n.discount_amount!=""?parseFloat(n.discount_amount):0;
- var discount_type = n.discount_type!=""?n.discount_type:"";
-
- if(discount_amount > 0 && discount_type!=""){
- if(discount_type=="%"){
- var d_price = parseFloat(n.total_price) - (parseFloat(n.total_price) * (discount_amount/100));
- console.log(d_price);
- price+=d_price;
- }else{
- var d_price = parseFloat(n.total_price) - discount_amount/100;
- price+=d_price;
- }
-
- }else{
- price+=parseFloat(n.total_price);
- }
-
-
- console.log("price: "+price);
- @if($business_type!="ClothsStore")
- if(n.extra_options){
- $.each(n.extra_options,function(c,d){
- if(d.price && d.price!=""){
- if(discount_amount > 0 && discount_type!=""){
- if(discount_type=="%"){
- var d_price = parseFloat(d.price) - (parseFloat(d.price) * (discount_amount/100));
- console.log(d_price);
- price+=d_price;
- }else{
- var d_price = parseFloat(d.price) - discount_amount/100;
- price+=d_price;
- }
-
- }else{
- price+=(parseInt(n.quantity) * parseFloat(d.price));
- }
- }
-
- });
- }
- @endif
- });
- $(".sub_total").html('{{ $currency }} '+price?price:0);
- }
- }
- $(".total_txt").html("{{ $currency }} "+((price?price:0)+delivery_fee));
- });
- }
- });
- $(".no-order").hide();
- $(".order-section").show();
-
- }
- });
- $('ul.pagination').hide();
- $('#all-orders').jscroll({
- autoTrigger: true,
- loadingHtml: '<img class="text-center" src="{!! env('APP_ASSETS') !!}images/preloaders/preloader.svg" alt="Loading..." />',
- padding: 0,
- nextSelector: '.pagination li.active + li a',
- contentSelector: 'div.mlist_li',
- callback: function() {
- $('ul.pagination').remove();
- }
- });
- $("body").on("click",".nav-link",function () {
- $(".nav-link").removeClass('active')
- $(this).addClass('active')
- });
- $("body").on("click",".order-row",function () {
- var id = $(this).data('id');
- window.location = "{!! env('APP_URL') !!}order/show/"+id;
- });
- $("body").on("click",".accept-order",function () {
- var _this = $(this);
- var preparation_time = $("input[name=preparation_time]").val();
- var preperation_delivery = $("input[name=preperation_delivery]").val();
- if(preperation_delivery==""){
- $("input[name=preperation_delivery]").focus();
- return false;
- }
- if(preparation_time==""){
- $("input[name=preparation_time]").focus();
- return false;
- }
- _this.attr('disabled','disabled');
- _this.html(progress_img);
- _this.removeClass('btn-primary');
- _this.addClass('btn-muted');
- $.ajax({
- url:"{!! env('APP_URL') !!}update/order/status",
- type:"POST",
- data:{
- id:order_id,
- status:"Accepted",
- preparation_time:preparation_time,
- preperation_delivery:preperation_delivery,
- "_token":"{!! csrf_token() !!}"
- },
- success:function () {
- // alert();
- $(".mlist_li.selected").remove();
- if(status=="all"){
- $("#orders-list").html('');
- _this.removeAttr('disabled');
- _this.html('Accept Order');
- _this.removeClass('btn-muted');
- _this.addClass('btn-primary');
- /*$.ajax({
- url:"{!! env('APP_URL') !!}liveorders/"+status,
- success:function (response) {
- //response = $.parseJSON(response);
- if(response){
- $.each(response.orders,function (i,v) {
- var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
- ' <div class="box '+v.box_bg+' rounded-0">\n' +
- ' <div class="media-list media-list-divided media-list-hover">\n' +
- ' <div class="media align-items-center">\n' +
- ' <div class="media-body">\n' +
- ' <p>#'+v.order_ref+'</p>\n' +
- ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
- ' </div>\n' +
- ' <div class="media-right gap-items">\n' +
- ' <div class="user-social-acount text-center">\n' +
- ' <p class="m-0 status">'+v.status+'</p>\n' +
- ' <div class="d-flex align-items-center float-end">\n' +
- ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
- ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
- ' Min</p>\n'+
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- '</li>';
- counter = counter+1;
- $("#orders-list").append(str);
- });
- $("span."+status).html(counter);
- }
- }
- });*/
- }
- $(".no-order").show();
- $(".order-section").hide();
- /*$.ajax({
- url: "{!! env('APP_URL') !!}order/counts",
- success: function (response) {
- // response = $.parseJSON(response);
- var total_accepted = 0;
- var total = 0;
- $.each(response,function (i,v) {
- if(v.status=="Send_to_Kitchen" || v.status=="Accepted"){
- total_accepted+=parseInt(v.status_count);
- total+=parseInt(v.status_count);
- $(".labelcenter.kitchen").text(total_accepted);
- }
- if(v.status=="On_Road"){
- $(".labelcenter.route").text(v.status_count);
- total+=parseInt(v.status_count);
- }
- if(v.status=="Placed"){
- $(".labelcenter.new").html(v.status_count);
- total+=parseInt(v.status_count);
- if(parseInt(v.status_count) > 0){
- $("#order-counter").html(v.status_count);
- $("#order-counter").show();
- }else{
- audio.pause();
- $("#order-counter").html(0);
- $("#order-counter").hide();
- }
- }
- });
- $(".labelcenter.all").text(total);
- }
- });*/
- // swal("Accepted!", "Order is Accepted.", "success");
- $("#accept-modal").modal('hide');
- @if($is_allow_print_preview=="Enabled")
- $(".print").trigger('click');
- @endif
- }
- });
- });
- $("body").on("click",'.change-status,.change-status-reject',function (e) {
- // alert();
- var s = $(".nav-link.active").data('status');
- var status = $(this).attr('data-status');
- // alert(status); return;
- if(status=="Rejected"){
- swal({
- title: "Are you sure?",
- text: "You will not be able to recover this order!",
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "Yes, Reject it!",
- closeOnConfirm: false
-
- }, function(e){
- if(e){
- //.after('disable-this');
- $(".sa-button-container .confirm").attr('disabled','disabled');
- //$(".sa-button-container .confirm").html(progress_img);
- $(".sa-button-container .confirm").removeClass('btn-primary');
- $(".sa-button-container .confirm").addClass('btn-muted');
-
-
- $.ajax({
- url:"{!! env('APP_URL') !!}update/order/status",
- type:"POST",
- data:{
- id:order_id,
- status:status,
- "_token":"{!! csrf_token() !!}"
- },
- success:function () {
- //alert();
- $(".sa-button-container .confirm").removeAttr('disabled');
- //$(".sa-button-container .confirm").html(progress_img);
- $(".sa-button-container .confirm").addClass('btn-primary');
- $(".sa-button-container .confirm").removeClass('btn-muted');
- swal.close()
- $(".mlist_li.selected").remove();
- $(".no-order").show();
- $(".order-section").hide();
- $.ajax({
- url: "{!! env('APP_URL') !!}order/counts",
- success: function (response) {
- // response = $.parseJSON(response);
- var total_accepted = 0;
- var total = 0;
- $.each(response,function (i,v) {
- if(v.status=="Send_to_Kitchen" || v.status=="Accepted"){
- total_accepted+=parseInt(v.status_count);
- total+=parseInt(v.status_count);
- $(".labelcenter.kitchen").text(total_accepted);
- }
- if(v.status=="On_Road"){
- $(".labelcenter.route").text(v.status_count);
- total+=parseInt(v.status_count);
- }
- if(v.status=="Placed"){
- $(".labelcenter.new").html(v.status_count);
- total+=parseInt(v.status_count);
- if(parseInt(v.status_count) > 0){
- $("#order-counter").html(v.status_count);
- $("#order-counter").show();
- }else{
- audio.pause();
- $("#order-counter").html(0);
- $("#order-counter").hide();
- }
- }
- });
- $(".labelcenter.all").text(total);
- }
- });
- // swal("Rejected!", "Order is rejected.", "success");
- }
- });
- }
- /*$.ajax({
- url:"{!! env('APP_URL') !!}update/order/status",
- type:"POST",
- data:{
- id:order_id,
- status:status,
- "_token":"{!! csrf_token() !!}"
- },
- success:function () {
- //alert();
- $(".mlist_li.selected").remove();
- $(".no-order").show();
- $(".order-section").hide();
- $.ajax({
- url: "{!! env('APP_URL') !!}order/counts",
- success: function (response) {
- // response = $.parseJSON(response);
- var total_accepted = 0;
- var total = 0;
- $.each(response,function (i,v) {
- if(v.status=="Send_to_Kitchen" || v.status=="Accepted"){
- total_accepted+=parseInt(v.status_count);
- total+=parseInt(v.status_count);
- $(".labelcenter.kitchen").text(total_accepted);
- }
- if(v.status=="On_Road"){
- $(".labelcenter.route").text(v.status_count);
- total+=parseInt(v.status_count);
- }
- if(v.status=="Placed"){
- $(".labelcenter.new").html(v.status_count);
- total+=parseInt(v.status_count);
- if(parseInt(v.status_count) > 0){
- $("#order-counter").html(v.status_count);
- $("#order-counter").show();
- }else{
- audio.pause();
- $("#order-counter").html(0);
- $("#order-counter").hide();
- }
- }
- });
- $(".labelcenter.all").text(total);
- }
- });
- // swal("Rejected!", "Order is rejected.", "success");
- }
- });*/
- });
- return false;
- }
- if(status=="Accepted"){
- $("#accept-modal").modal('show');
- return false;
- }
- // alert(order_id);
- $.ajax({
- url:"{!! env('APP_URL') !!}update/order/status",
- type:"POST",
- data:{
- id:order_id,
- status:status,
- "_token":"{!! csrf_token() !!}"
- },
- success:function () {
- $(".mlist_li.selected").remove();
- if(s=="all"){
- $("#orders-list").html('');
- /* $.ajax({
- url:"{!! env('APP_URL') !!}liveorders/all",
- success:function (response) {
- // response = $.parseJSON(response);
- if(response){
- $.each(response.orders,function (i,v) {
- var str='<li class="mlist_li" rel="detail" data-order-id="'+v.id+'">\n' +
- ' <div class="box '+v.box_bg+' rounded-0">\n' +
- ' <div class="media-list media-list-divided media-list-hover">\n' +
- ' <div class="media align-items-center">\n' +
- ' <div class="media-body">\n' +
- ' <p>#'+v.order_ref+'</p>\n' +
- ' <p> '+(v.campaign_type!=""?v.campaign_type:"Direct")+', '+v.created_at+'</p>\n' +
- ' </div>\n' +
- ' <div class="media-right gap-items">\n' +
- ' <div class="user-social-acount text-center">\n' +
- ' <p class="m-0 status">'+v.status+'</p>\n' +
- ' <div class="d-flex align-items-center float-end">\n' +
- ' <div class="circle-div '+v.bg+' text-center" data-min="'+v.remaining_min+'" data-color="'+v.bg_color+'">\n' +
- ' <p class="mb-5 min">'+v.remaining_min+'<br />\n'+
- ' Min</p>\n'+
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- '</li>';
- counter = counter+1;
- $("#orders-list").append(str);
- });
- $("span."+status).html(counter);
- }
- }
- });*/
- }
- $(".no-order").show();
- $(".order-section").hide();
- /*$.ajax({
- url: "{!! env('APP_URL') !!}order/counts",
- success: function (response) {
- // response = $.parseJSON(response);
- var total_accepted = 0;
- var total = 0;
- $.each(response,function (i,v) {
- if(v.status=="Send_to_Kitchen" || v.status=="Accepted"){
- total_accepted+=parseInt(v.status_count);
- total+=parseInt(v.status_count);
- $(".labelcenter.kitchen").text(total_accepted);
- }
- if(v.status=="On_Road"){
- $(".labelcenter.route").text(v.status_count);
- total+=parseInt(v.status_count);
- }
- if(v.status=="Placed"){
- $(".labelcenter.new").text(v.status_count);
- total+=parseInt(v.status_count);
- }
- });
- $(".labelcenter.all").text(total);
- }
- });*/
- }
- });
- e.preventDefault();
- e.stopPropagation();
- });
- $('.table').DataTable({
- "order": [[ 0, "desc" ]],
- 'paging' : true,
- 'lengthChange': true,
- 'searching' : true,
- 'ordering' : true,
- 'info' : true,
- 'autoWidth' : true,
- /*"processing": true,
- "serverSide": true,
- "ajax": "{!! env('APP_URL') !!}get/ajax/orders",
- "order": [[ 0, "desc", ]],*/
- "lengthMenu": [ 50, 100, 150 ]
- });
- var min_minus = 1;
- setInterval(function(){
- $(".circle-div").each(function (i,v) {
- var min = parseInt($(this).data('min'));
- min = 1;
- if((min)>0){
- var new_time = (min-min_minus);
- // alert(new_time);
- if(new_time >= 0){
- $(this).attr('data-min',new_time);
- $(this).find('p.min').html(new_time+"<br />Min");
- }
- }
- });
- min_minus++;
- },60000);
- })
- /*function show_recipe(recipe){
- console.log(recipe);
- var str='<div class="box-header border-1 ">\n' +
- ' <div class="ml-5">\n' +
- ' <div class="d-flex justify-content-between align-items-center">\n' +
- ' <p>'+recipe.quantity+'x '+recipe.recipe_name+'</p>\n' ;
- if(recipe.total_price > 0)
- str+= ' <p>{{ $currency }} '+recipe.total_price+'</p>\n';
- if(recipe.extra_options){
- str+='<dl>';
- if(recipe.extra_options){
- $.each(recipe.extra_options,function(c,d){
- str+="<dt>"+d.name+" : {{ $currency }} "+d.price;
- if(d.sub_items){
- //str+="<ul>";
- $.each(d.sub_items,function(m,n){
- console.log("Sub Items");
- str+="<dd>"+n.name+"</dd>";
-
- });
- //str+="</dt>";
- }
- str+="</li>"
- });
- }
- str+='<dl>';
- }
- str+=
- ' </div>\n' +
- ' </div>\n' +
- ' </div>';
- return str;
- }*/
- /* function show_recipe(recipe){
- console.log(recipe);
- var str='<div class="box-header border-1 ">\n' +
- ' <div class="ml-5">\n' +
- ' <div class="d-flex justify-content-between align-items-center">\n' +
- ' <p><img src="'+recipe.recipe_image+'" style="border-radius:10px" height="24px" width="24px" />'+recipe.quantity+'x '+recipe.recipe_name+'</p>\n' ;
- if(recipe.total_price > 0)
- str+= ' <p>{{ $currency }} '+recipe.total_price+'</p>\n';
- if(recipe.extra_options){
- str+='<dl>';
- if(recipe.extra_options){
- console.log(recipe.extra_options);
- $.each(recipe.extra_options,function(c,d){
- @if($business_type=="ClothsStore")
-
- if(c=="color")
- str+='<div style="width: 20px; height: 20px; background-color: '+d+'; border-radius: 20px; float:left"></div>';
- if(c=="size")
- str+='<div style="float:right;font-size: 14px;margin-left: 8px;font-weight: 700;"> '+d+'</div>';
- @else
- str+="<dt>"+d.name+" : {{ $currency }} "+d.price;
- if(d.sub_items){
- //str+="<ul>";
- $.each(d.sub_items,function(m,n){
- console.log("Sub Items");
- str+="<dd>"+n.name+"</dd>";
-
- });
- //str+="</dt>";
- }
- str+="</li>"
- @endif
- });
- }
- str+='<dl>';
- }
- str+=
- ' </div>\n' +
- ' </div>\n' +
- ' </div>';
- return str;
- }*/
- function show_recipe(recipe){
- var discount_amount = parseFloat(recipe.discount_amount);
- var str='<div class="box-header border-1 ">\n' +
- ' <div class="ml-5">\n' +
- ' <div class="d-flex justify-content-between align-items-center">\n' +
- ' <p><img src="'+recipe.recipe_image+'" style="border-radius:10px" height="40px" width="40px" />'+recipe.quantity+'x '+recipe.recipe_name+'</p>\n' ;
- if(recipe.total_price > 0){
- var price = parseFloat(recipe.total_price);
- if(discount_amount > 0){
- if(recipe.discount_type=="%"){
- price = price - (price * (discount_amount/100));
- price = "<span>"+price+"</span>" + "<span style='margin-left:10px; color:red'><del>"+recipe.total_price+"</del></span>";
- }
- }
- str+= ' <p>{{ $currency }} '+price+'</p>\n';
- }
-
- if(recipe.extra_options){
- str+='<dl>';
- if(recipe.extra_options){
- console.log(recipe.extra_options);
- $.each(recipe.extra_options,function(c,d){
- @if($business_type=="ClothsStore")
-
- if(c=="color")
- str+='<div style="width: 20px; height: 20px; background-color: '+d+'; border-radius: 20px; float:left"></div>';
- if(c=="size")
- str+='<div style="float:right;font-size: 14px;margin-left: 8px;font-weight: 700;"> '+d+'</div>';
- @else
- if(d.price && d.price!=""){
- var price = parseFloat(d.price);
- if(discount_amount > 0){
- if(recipe.discount_type=="%"){
- price = price - (price * (discount_amount/100));
- price = "<span>"+price+"</span>" + "<span style='margin-left:10px; color:red'><del>"+d.price+"</del></span>";
- }
- }
- str+="<dt>"+d.name+" : {{ $currency }} "+price;
- if(d.sub_items){
- //str+="<ul>";
- $.each(d.sub_items,function(m,n){
- console.log("Sub Items");
- str+="<dd>"+n.name+"</dd>";
-
- });
- //str+="</dt>";
- }
- str+="</li>"
- }
- @endif
- });
- }
- str+='<dl>';
- }
- str+=
- ' </div>\n' +
- ' </div>\n' +
- ' </div>';
- return str;
- }
- function order_text_template(object,action){
-
- console.log(object);
-
- var sep = "%0A";
- if(action=="copy-clipboard")
- sep = "\n";
-
-
- var map = "https://maps.google.com/?q="+object.geo_location;
- var str = "I would like to share an order with you:"+sep+sep;
- str += "*OrderID:* "+object.order_ref+' '+sep;
- str += " *Business:* "+object.brand_name+' '+sep;
- str += " *Outlet:* "+object.outlet_name+' '+sep;
- str += " *Customer Name:* "+object.customer+' '+sep;
- str += " *Customer Phone No:* "+object.phone+' '+sep;
- str += " *Payment Method:* "+object.order_type+' '+sep;
- str += " *Delivery Address:* "+object.address+' '+sep;
- if(action=="copy-clipboard")
- str += ' *Map:* '+(map)+' '+sep;
- else
- str += ' *Map:* '+encodeURIComponent(map)+' '+sep;
- str += ' *Sub Total:* '+object.total_price+' {!! $currency !!} '+sep;
- str += ' *Delivery Fee:* '+object.delivery_fee+' {!! $currency !!} '+sep;
- str += ' *Total:* '+(parseFloat(object.total_price) + parseFloat(object.delivery_fee))+' {!! $currency !!} '+sep;
-
- return str;
- }
- </script>
- @endsection
|