@php
$getefile = DB::table('efileshares')->where('id', $getfileshare->id)->first();
@endphp
@php
$draftremarks = DB::table('draftremarks')->where('draft_id' , $getefile->draft_id)->get();
@endphp
@php
$getsection = DB::table('odepartments')->where('id', $getefile->department_id)->first();
@endphp
Notings
@php
$getnottingsname = DB::table('users')->where('id', $getefile->sharefrom)->first();
@endphp
@if(isset($getnottingsname->name))
@if(isset($getefile->nottings))
{{$getnottingsname->name}} ({{$getnottingsname->jobtitle}}): {!!$getefile->nottings!!}
@endif
@endif
@foreach ($draftremarks as $draftremark)
@php
$getname = DB::table('users')->where('id', $draftremark->user_id)->first();
@endphp
@if(isset($draftremark->scale_id))
@if($draftremark->touser == Auth::user()->id)
@if(isset($draftremark->remark))
@if(isset($getname->name))
{{$getname->name}} ({{$draftremark->job_title}}): {{$draftremark->remark}}
@endif
@endif
@if(isset($draftremark->notify))
@if(isset($getname->name))
{{$getname->name}} ({{$draftremark->job_title}}): {{$draftremark->notify}}
@endif
@endif
@elseif(Auth::user()->scale_level <= $draftremark->scale_id )
@if(isset($draftremark->remark))
@if(isset($getname->name))
{{$getname->name}} ({{$draftremark->job_title}}): {{$draftremark->remark}}
@endif
@endif
@if(isset($draftremark->notify))
@if(isset($getname->name))
{{$getname->name}} ({{$draftremark->job_title}}): {{$draftremark->notify}}
@endif
@endif
@endif
@endif
@endforeach
@if(Auth::user()->jobtitle == 'Secretary')
@endif
@php
$notifycheck = DB::table('draftremarks')->where('draft_id' , $getefile->draft_id)->where('job_title' , "Secretary")->where('notify' , "Notify")->get();
@endphp
@if($notifycheck->count()>0 AND Auth::user()->jobtitle == 'Draftsman')
@endif
@php
$notifycheckAS = DB::table('draftremarks')->where('draft_id' , $getefile->draft_id)->where('job_title' , "Draftsman")->where('notify' , "Notify")->get();
$getSecretary = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first();
$getexistanceSecretary = DB::table('draftshares')->where('draft_id', $getefile->id)->where('touser', $getSecretary->id)->first();
@endphp
@if($notifycheckAS->count()>0 AND Auth::user()->jobtitle == 'AS')
@elseif(isset($getexistanceSecretary) AND Auth::user()->jobtitle == 'AS')
@endif
@php
$notifycheckDS = DB::table('draftremarks')->where('draft_id' , $getefile->draft_id)->where('job_title' , "AS")->where('notify' , "Notify")->get();
$getDraftsman = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first();
$getexistanceDraftsman = DB::table('draftshares')->where('draft_id', $getefile->id)->where('touser', $getDraftsman->id)->first();
$getSecretary = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first();
$getexistanceSecretary = DB::table('draftshares')->where('draft_id', $getefile->id)->where('touser', $getSecretary->id)->first();
@endphp
@if($notifycheckDS->count()>0 AND Auth::user()->jobtitle == 'DS')
@elseif(isset($getexistanceDraftsman) AND Auth::user()->jobtitle == 'DS')
@elseif(isset($getexistanceSecretary) AND Auth::user()->jobtitle == 'DS')
@endif
@php
$notifycheckSO = DB::table('draftremarks')->where('draft_id' , $getefile->draft_id)->where('job_title' , "DS")->where('notify' , "Notify")->get();
$getAS = DB::table('users')->where('jobtitle', 'AS')->where('odep_id', Auth::user()->odep_id)->first();
$getexistanceAS = DB::table('draftshares')->where('draft_id', $getefile->id)->where('touser', $getAS->id)->first();
$getDraftsman = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first();
$getexistanceDraftsman = DB::table('draftshares')->where('draft_id', $getefile->id)->where('touser', $getDraftsman->id)->first();
$getSecretary = DB::table('users')->where('jobtitle', 'Draftsman')->where('odep_id', Auth::user()->odep_id)->first();
$getexistanceSecretary = DB::table('draftshares')->where('draft_id', $getefile->id)->where('touser', $getSecretary->id)->first();
@endphp
@if($notifycheckSO->count()>0 AND Auth::user()->jobtitle == 'SO')
@elseif(isset($getexistanceAS) AND Auth::user()->jobtitle == 'SO')
@elseif(isset($getexistanceDraftsman) AND Auth::user()->jobtitle == 'SO')
@elseif(isset($getexistanceSecretary) AND Auth::user()->jobtitle == 'SO')
@endif
@php
$quickreplies = DB::table('quickreplies')->get();
@endphp
@foreach ($quickreplies as $quickreply)
{{ $quickreply->name }}
@endforeach
@php
$getefile = DB::table('efileshares')->where('id', $getfileshare->id)->first();
@endphp