@if(str_contains(url()->current(), '/send-file'))
@elseif(str_contains(url()->current(), '/send-letter')) @elseif(str_contains(url()->current(), '/send-summary')) @endif @csrf
Your Received Files
@foreach ($efiles as $eaccess) @if(str_contains(url()->current(), '/send-file')) @php $efile = DB::table('efileshares')->where('doc_type' , 1)->where('id', $eaccess->draft_id)->first(); @endphp @elseif(str_contains(url()->current(), '/send-letter')) @php $efile = DB::table('efileshares')->where('doc_type' , 2)->where('id', $eaccess->draft_id)->where('sharefrom', Auth::user()->id)->first(); @endphp @elseif(str_contains(url()->current(), '/send-summary')) @php $efile = DB::table('efileshares')->where('doc_type' , 3)->where('id', $eaccess->draft_id)->first(); @endphp @endif @if(isset($efile)) @php $draftre = DB::table('draftremarks')->where('draft_id' , $efile->draft_id)->orderBy('id', 'DESC')->first(); @endphp @if(isset($draftre->user_id)) @php $getuname = DB::table('users')->where('id', $draftre->user_id)->first(); @endphp @endif @php $notifycheckSC = DB::table('draftremarks')->where('draft_id' , $efile->draft_id)->where('job_title' , "SO")->where('notify' , "Notify")->get(); $getfwdSO = DB::table('users')->where('jobtitle', 'AS')->where('odep_id', Auth::user()->odep_id)->first(); $getexistancefwdSO = DB::table('draftshares')->where('draft_id', $efile->id)->where('touser', $getfwdSO->id)->first(); $getfwdDS = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first(); $getexistancefwdDS = DB::table('draftshares')->where('draft_id', $efile->id)->where('touser', $getfwdDS->id)->first(); $getfwdAS = DB::table('users')->where('jobtitle', 'AS')->where('odep_id', Auth::user()->odep_id)->first(); $getexistancefwdAS = DB::table('draftshares')->where('draft_id', $efile->id)->where('touser', $getfwdAS->id)->first(); $getfwdDraftsman = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first(); $getexistanceDraftsman = DB::table('draftshares')->where('draft_id', $efile->id)->where('touser', $getfwdDraftsman->id)->first(); $getfwdSecretary = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first(); $getexistanceSecretary = DB::table('draftshares')->where('draft_id', $efile->id)->where('touser', $getfwdSecretary->id)->first(); @endphp @if(Auth::user()->jobtitle == 'SO') @endif @endif @endforeach
Document No. Title Status Receiving Register Created by Receiving Date
@if(isset($efile->doc_no))

{{ $efile->doc_no }}

@endif
{{ $efile->subject }}
@if(isset($getuname, $draftre)) {{$getuname->name}} ({{$getuname->jobtitle}}) @endif @php $getfileshare = DB::table('efileshares')->where('id', $efile->id)->first(); $getname = DB::table('users')->where('id', $efile->sharefrom)->first(); $getsection = DB::table('departments')->where('id', $getname->department_id)->first(); @endphp

{{ $getname->name }} ({{$getname->jobtitle}}) - @if(isset($getsection)) {{$getsection->name}} @endif

{{ $efile->created_at }}
@csrf