{{ $editing ? $taskForm['title'] : 'Create New Task' }}

@if($editing && $taskForm['due_date'] && \Carbon\Carbon::parse($taskForm['due_date'])->isPast() && $taskForm['status'] !== 'completed') Overdue @endif
@if($editing)
{{ ucfirst(str_replace('_', ' ', $taskForm['status'])) }} Priority: {{ ucfirst($taskForm['priority']) }}
@endif @if($editing && $currentTask && $currentTask->createdBy)

Created by {{ $currentTask->createdBy->name }}

@endif
@if($editing && $canEditTask) @if($taskForm['status'] !== 'completed') @else Task Completed @endif @if(!$isEditingTaskFields) @endif @endif Back to Tasks
@if (session()->has('success'))

{{ session('success') }}

@endif @if (session()->has('error'))

{{ session('error') }}

@endif
@if($editing && !$isEditingTaskFields)
@if($canEditTask)
@if($taskForm['start_date'])

{{ \Carbon\Carbon::parse($taskForm['start_date'])->format('M j, Y') }}

@endif @if($taskForm['due_date'])

{{ \Carbon\Carbon::parse($taskForm['due_date'])->format('M j, Y') }}

@endif
@if(!empty($taskForm['description']))

{{ $taskForm['description'] }}

@endif @if($taskForm['estimated_hours'])

{{ $taskForm['estimated_hours'] }} hours

@endif @if($taskForm['actual_hours'])

{{ $taskForm['actual_hours'] }} hours

@endif
@else

Task Details

You can view basic task information and add notes.

Priority: {{ ucfirst($taskForm['priority']) }}
@if($taskForm['start_date'])
Start Date: {{ \Carbon\Carbon::parse($taskForm['start_date'])->format('M j, Y') }}
@endif @if($taskForm['estimated_hours'])
Estimated Hours: {{ $taskForm['estimated_hours'] }} hours
@endif
@endif
@else
@error('taskForm.title')

{{ $message }}

@enderror
@error('taskForm.status')

{{ $message }}

@enderror
@error('taskForm.priority')

{{ $message }}

@enderror
@error('taskForm.start_date')

{{ $message }}

@enderror
@error('taskForm.due_date')

{{ $message }}

@enderror
@if($showMentionSuggestions && !empty($mentionSuggestions))
{{ __('Suggestions:') }}
@foreach($mentionSuggestions as $suggestion) @endforeach
@endif
@error('taskForm.description')

{{ $message }}

@enderror
{{-- Estimated Hours --}} {{--
@error('taskForm.estimated_hours')

{{ $message }}

@enderror
--}} {{-- Actual Hours --}} {{--
@error('taskForm.actual_hours')

{{ $message }}

@enderror
--}}
{{-- Notes --}} {{--
@error('taskForm.notes')

{{ $message }}

@enderror
--}}
@if($canEditTask)
@error('taskType')

{{ $message }}

@enderror
@if($taskType === 'matter')
@error('selectedMatter')

{{ $message }}

@enderror
@else
@endif
@if($canEditTask)
Select users...
@foreach($this->users as $user)
{{ $user->name }}
@endforeach
@error('taskForm.assigned_to')

{{ $message }}

@enderror
@endif
@if($editing && $isEditingTaskFields) @else @endif
@endif
@endif
@if($editing)

{{ __('Task Interactions') }}

@if($currentTask) @endif
@if($currentTask && $this->allInteractions->count() > 0)
@foreach($this->allInteractions as $interaction)
{{ $interaction->interaction_date ? \Carbon\Carbon::parse($interaction->interaction_date)->format('M j, Y H:i') : '' }} {{ $interaction->user->name ?? 'Unknown' }}

{{ $interaction->description }}

@if($interaction->replies->count() > 0)
@foreach($interaction->replies as $reply)
{{ $reply->interaction_date ? \Carbon\Carbon::parse($reply->interaction_date)->format('M j, Y H:i') : '' }} {{ $reply->user->name ?? 'Unknown' }} (Reply)

{{ $reply->description }}

@endforeach
@endif
@endforeach
@else
@if($currentTask)

{{ __('No interactions yet') }}

{{ __('Get started by adding the first interaction.') }}

@else

{{ __('Task Interactions') }}

{{ __('Save the task first to add interactions.') }}

@endif
@endif
@endif
@if($showInteractionModal)

@if($replyingToInteractionId) Reply to Interaction @elseif($editingInteractionId) Edit Interaction @else Add New Interaction @endif

@endif