@extends('Admin.layout') @section('content')
Task Details
Reopen

{{ $task->reopen_count }}

View
Hold

{{ $task->hold_count }}

View
Status

{{ ucfirst($task->task_status) }}

Task Details
{{-- Description --}} @if(!empty(strip_tags($task->task_description ?? '')))
{!! $task->task_description !!}
@endif {{-- Voice Recording --}} @if(!empty($task->voice_file)) @php $voicePath = public_path( 'uploads/task_voice/' . $task->voice_file ); $voiceUrl = asset( 'uploads/task_voice/' . $task->voice_file ); $extension = strtolower( pathinfo($task->voice_file, PATHINFO_EXTENSION) ); $mimeTypes = [ 'webm' => 'audio/webm', 'mp4' => 'audio/mp4', 'm4a' => 'audio/mp4', 'mp3' => 'audio/mpeg', 'wav' => 'audio/wav', 'ogg' => 'audio/ogg', 'oga' => 'audio/ogg', 'opus' => 'audio/opus', ]; $mimeType = $mimeTypes[$extension] ?? null; $voiceExists = file_exists($voicePath); @endphp
@if($voiceExists) Open Voice File @else
Voice recording file not found.
@endif
@endif {{-- Both Empty --}} @if( empty(strip_tags($task->task_description ?? '')) && empty($task->voice_file) )
No Description or Voice Recording Available
@endif

Task Log

Date
Type
SH
Remark
@foreach ($task->histories as $history)
{{ $history->created_at->format('d/m/Y h:i A') }}
{{ ucfirst($history->status) }}
{{ ucfirst($history->spending_hour ?? '-') }}
@if($history->status == 'reopen') {{ $history->reopen_type }}- {!! nl2br(e($history->display_remark ?? '-')) !!} @else {!! nl2br(e($history->display_remark ?? '-')) !!} @endif
@endforeach
{{-- Test Status Modal --}} {{-- Reopen Modal --}} @endsection