@if($current_route_name =='/' || empty($current_route_name))
@include('elements.topbar')
@else
@include('elements.navbar')
@endif
@php
use Carbon\Carbon;
$branchID = Auth::user()->branch_id;
$systemTime = (Carbon::now())->format('Y-m-d H:i');
$activeNotice = DB::table('gnl_notice')
->where([['is_delete',0], ['is_active',1]])
->where(function ($activeNotice) use ($systemTime){
$activeNotice->where([['start_time','<=', $systemTime], ['end_time','>=',$systemTime]])
->orWhere([['start_time', null], ['end_time', null]]);
})
->where(function ($activeNotice) use ($branchID) {
$activeNotice->where('branch_id', 'LIKE', "%,{$branchID},%")
->orWhere('branch_id', 'LIKE', "{$branchID},%")
->orWhere('branch_id', 'LIKE', "%,{$branchID}")
->orWhere('branch_id', 'LIKE', "{$branchID}");
})
->select('notice_body')
->get();
@endphp
@if(count($activeNotice) > 0)
@endif
@php
$ignoreInnerLayout = [
'/',
'',
'/login',
'/modules',
'/gnl',
'/pos',
'/acc',
'/mfn',
'/fam',
'/inv',
'/proc',
'/bill',
'/hr',
'login',
'modules',
'gnl',
'pos',
'acc',
'mfn',
'fam',
'inv',
'proc',
'bill',
'hr',
];
$routes = explode('/', $current_route_name);
// print_r($current_route_name);
@endphp
@if(in_array($current_route_name, $ignoreInnerLayout))
@yield('content')
@else
@if($errors->any())
Oopps! Something went wrong.
@foreach($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
@endif
{{-- Common Modal --}}
{{-- Common Modal --}}
@include('elements.footer')