Created by: {{ $case->owner_data }} {{ str_replace(['before'], ['ago'], Carbon\Carbon::parse($case->date)->diffForHumans(false,false,true))}}

@php $hours = 0; @endphp @if($timelogs) @foreach($timelogs as $timelog) @php $hours = $hours + $timelog->time_spent @endphp @endforeach @endif

Spent Time: {{$hours}}h

{{ $case->name }}

Priority:

{{ $case->getPriorityStatus() }}

Status:

{{ $case->getStatus() }}

Cause:

{{ $case->case }}

Queue:

{!! \App\Models\Queue::getListNames($case->queue) !!}

@if($case->control==='Client')

Assigned To:

@foreach($case->skywatchAssignees as $user) {{ $user->contact->firstname.' '.$user->contact->lastname }}, @endforeach

@endif

@if(\App\Models\GmpRoles::canSeeLink(\App\Models\GmpRoles::MANAGEMENT_REQUEST_FORM)) {!! \App\Models\ChangeManagementForm::getRelatedCaseForm($case->id,true) !!} @endif

Description:

{!! $case->description !!}
@if($case->stage) @endif

Details:

@foreach(\App\Models\CaseField::where('case_id',$case->id)->get() as $k=>$v)

{{\App\Models\CaseCustomField::where('id',$v->case_custom_field_id)->first()->title}}:

{{$v->value}}

@endforeach @php $case->load('files'); @endphp @if($case->files->count() > 0)

Attachments:

@foreach($case->files as $file) @php $pathinfo = pathinfo($file->storage_path); @endphp {{-- @dd($pathinfo, $file->storage_path)--}} @isset($pathinfo['filename'], $pathinfo['extension']) {!! $file->original_name !!} @endisset @endforeach
@endif
@php $hc=0; if(isset($historys)){ foreach ($historys as $item){ if($item->note){ $hc++; } } } @endphp
@if($historys) @foreach($historys as $history)
{!! $history->description !!}
@if($history->note)
@php $note = $history->note; $intranetDomain = env('APP_INTRANET_DOMAIN'); $schema = parse_url(config('app.url'), PHP_URL_SCHEME); $note = str_replace( '"/storage', sprintf('"%s://%s/storage', $schema, $intranetDomain), $note ); @endphp {!! str_replace(['background-color:#ffffff', 'color:#000000', 'color:#222222'], '', $note) !!}
@endif
@endforeach @endif
@if($hc>0)
@if($historys) @foreach($historys as $history) @if($history->note)
@php $note = $history->note; $intranetDomain = env('APP_INTRANET_DOMAIN'); $schema = parse_url(config('app.url'), PHP_URL_SCHEME); $note = str_replace( '"/storage', sprintf('"%s://%s/storage', $schema, $intranetDomain), $note ); @endphp {!! str_replace(['background-color:#ffffff', 'color:#000000', 'color:#222222'], '', $note) !!}
@endif @endforeach @endif
@endif
@section('scripts') @endsection