123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- @extends('layouts.app')
- @section('page-title')| {{__('label.outlet_pause_orders')}} @endsection
- @section('css')
- <link href="{!! env('APP_ASSETS') !!}css/outlets.css?v=1.3" rel="stylesheet" type="text/css">
- @endsection
- @section('content')
- <style>
- @-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+ */
- }
- .btn-toggle.btn-sm,.btn-toggle.btn-sm > .handle{
- border-radius: 16px;
- }
- table.dataTable {
- clear: both;
- margin-top: 6px !important;
- margin-bottom: 6px !important;
- max-width: none !important;
- border-collapse: collapse !important;
- font-family: 'Open Sans';
- }
- .theme-primary .paging_simple_numbers .pagination .paginate_button.active a,.theme-primary .pagination li a:hover,.theme-primary .paging_simple_numbers .pagination .paginate_button:hover a{
- color: white !important;
- background: #ffa505 !important;
- }
- .search-outlet{
- width: 400px;
- background-color: white;
- }
- .search-buttom{
- top: 8px;
- right: 15px;
- font-size: 20px;
- color: #e1e1e1;
- }
- .btn-toggle.btn-sm:focus, .btn-toggle.btn-sm.focus, .btn-toggle.btn-sm:focus.active, .btn-toggle.btn-sm.focus.active{
- box-shadow: none;
- }
- .btn-outlet{
- }
- .btn-toggle.active{
- color: white !important;
- background: #ffa505;
- }
- .rdot {
- height: 10px;
- width: 10px;
- background-color: red;
- border-radius: 0%;
- display: inline-block;
- }
- .gdot {
- height: 10px;
- width: 10px;
- background-color: green;
- border-radius: 0%;
- display: inline-block;
- }
- .pause-order{
- padding: 10px; background-color: #fff8ec; margin-bottom: 30px;
- }
- .list-inline li{
- margin-right: 30px;
- }
- @media (max-width:641px) {
- .list-inline li{
- margin-right: 5px;
- }
- }
- </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);
- }
- @endphp
-
- @php
- $resto = \App\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID());
- $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'])?trim($resto_metas['BUSSINESS_TYPE']):"Restaurants";
-
- @endphp
- <!-- Content Wrapper. Contains page content -->
- <div class="content-wrapper">
- <div class="container-full">
- <!-- Main content -->
- <section class="content">
- <div class="row ">
- <div class="col-md-6">
- <div class="m-15">
- <h3 class="title">{{__('label.pause_orders')}}</h3>
-
- </div>
- </div>
-
- </div>
- @php
- $resto = \App\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID());
- @endphp
- @if(isset($outlets) && $outlets->count() > 0)
- @foreach($outlets as $outlet)
- <div class="pause-order">
- <div class="row">
- <div class="col-md-6"><p class="fw-normal m-0">{!! $resto->name !!}</p>
- <h5 class="m-0 fw-bold">{!! $outlet->name !!}</h5>
- </div>
- <div class="col-md-6 text-end">
- <ul class="list-inline">
- <li> @if($outlet->is_delivery=="1") <span class="gdot"></span>{{__('label.delivery')}} @else<span class="rdot"></span> {{__('label.delivery_pause')}} @endif</li>
- <li> @if($outlet->is_pickup=="1") <span class="gdot"></span> {{__('label.pickup')}} @else <span class="rdot"></span>{{__('label.pickup_pause')}} @endif</li>
- @if($business_type=="Restaurants")
- <li> @if($outlet->is_contactless_dining=="1") <span class="gdot"></span> {{__('label.dine_in')}} @else <span class="rdot"></span> {{__('label.dine_in_pause')}} @endif</li>
- @endif
- </ul>
-
- </div>
- </div>
- <div class="row mt-30">
- <div class="col-md-4">
- <button type="button" data-on-text="Open" data-type="delivery" data-off-text="Closed" class="switch-me btn-toggle btn-sm btn-outlet @if($outlet->is_delivery=="1") active @endif switch-me" data-id="{!! $outlet->id !!}" data-bs-toggle="button" aria-pressed="@if($outlet->is_delivery=="1") true @else false @endif" autocomplete="off">
- <div class="handle"></div>
- </button> {{__('label.accepting_delivery_orders')}}
- </div>
- <div class="col-md-4">
- <button type="button" data-type="pickup" data-on-text="Open" data-off-text="Closed" class="switch-me btn-toggle btn-sm btn-outlet @if($outlet->is_pickup=="1") active @endif switch-me" data-id="{!! $outlet->id !!}" data-bs-toggle="button" aria-pressed="@if($outlet->is_pickup=="1") true @else false @endif" autocomplete="off">
- <div class="handle"></div>
- </button> {{__('label.accepting_pickup_orders')}}
- </div>
- @if($business_type=="Restaurants")
- <div class="col-md-4">
- <button type="button" data-type="dine-in" data-on-text="Open" data-off-text="Closed" class="switch-me btn-toggle btn-sm btn-outlet @if($outlet->is_contactless_dining=="1") active @endif switch-me" data-id="{!! $outlet->id !!}" data-bs-toggle="button" aria-pressed="@if($outlet->is_contactless_dining=="1") true @else false @endif" autocomplete="off">
- <div class="handle"></div>
- </button>{{__('label.accepting_dine_in')}}
- </div>
- @endif
- </div>
- </div>
- @endforeach
- @endif
-
- </section>
- <!-- /.content -->
- </div>
- </div>
- <!-- /.content-wrapper -->
- @endsection
- @section('js')
- <script>
- $(function () {
-
- $("body").on("click",".switch-me",function () {
- var is_active = $(this).attr("aria-pressed");
- var id = $(this).data('id');
- var type = $(this).data('type');
- is_active = $.trim(is_active);
- var _this = $(this);
- var status = 0;
- if(is_active=="false"){
- status = 0;
- _this.parents('tr').addClass('inactive');
- }else{
- status = 1;
- _this.parents('tr').removeClass('inactive');
- }
- $.ajax({
- url:"{!! env('APP_URL') !!}outlet/feature/update/status",
- type:"POST",
- data:{
- id:id,
- status:status,
- type:type,
- "_token":'{!! csrf_token() !!}'
- },
- success:function () {
- if(is_active=="false"){
- $.toast({
- heading: 'Outlet '+type+' Status',
- text: 'Outlet '+type+' is deactive',
- position: 'top-right',
- loaderBg: '#ff6849',
- icon: 'error',
- hideAfter: 3000,
- stack: 1
- });
- }else{
- $.toast({
- heading: 'Outlet '+type+' Status',
- text: 'Outlet '+type+' is active.',
- position: 'top-right',
- loaderBg: '#ff6849',
- icon: 'success',
- hideAfter: 3000,
- stack: 1
- });
- }
- }
- });
- });
- })
- </script>
- @endsection
|