@hasanyrole('BranchOwner|BranchManager|BranchStaffMember') @php $user_session = session('restaurant'); // dd( $user_session ); $pos_type = $pos_access = $payment_setup = null; $location = auth()->user()->getLocationUserData(); switch ( $user_session['restaurant_pos_type'] ) { case '0': // eaterli pos $pos_type = $restaurant->pos_type; $pos_access = $restaurant->pos_access; $payment_setup = $restaurant->payment_setup; break; case '1': // square pos $pos_type = $restaurant->pos_type; $pos_access = $restaurant->pos_access; $payment_setup = $restaurant->payment_setup; break; case '2': // clover pos $pos_type = $restaurant->pos_type; $pos_access = $location->pos_access; $payment_setup = $restaurant->payment_setup; break; case '3': // other pos $pos_type = $restaurant->pos_type; $pos_access = $restaurant->pos_access; $payment_setup = $restaurant->payment_setup; break; default: // not in use break; } @endphp @else @php $user_session = session('restaurant'); $pos_type = $pos_access = $payment_setup = null; $location = $restaurant->primary_location; switch ( $user_session['restaurant_pos_type'] ) { case '0': // eaterli pos $pos_type = $restaurant->pos_type; $pos_access = $restaurant->pos_access; $payment_setup = $restaurant->payment_setup; break; case '1': // square pos $pos_type = $restaurant->pos_type; $pos_access = $restaurant->pos_access; $payment_setup = $restaurant->payment_setup; break; case '2': // clover pos $pos_type = $restaurant->pos_type; $pos_access = $location->pos_access; $payment_setup = $restaurant->payment_setup; break; case '3': // other pos $pos_type = $restaurant->pos_type; $pos_access = $restaurant->pos_access; $payment_setup = $restaurant->payment_setup; break; default: // not in use break; } @endphp @endhasanyrole @hasanyrole('BranchOwner|BranchManager|BranchStaffMember') @php $location = auth()->user()->getLocationUserData(); $location_id = $location->id; $restaurant_id = $location->restaurant_id; @endphp @endhasanyrole {{ config('app.name', 'Eaterli') }} @include('layouts.include.react-app')
@yield('content')
@yield('script')