Edit Task

@if($errors->any())
@endif
@csrf @method('PUT')
@error('title')
{{ $message }}
@enderror
@php // Auto-detect task_type if not set but has related ID $detectedTaskType = $task->task_type ?? 'general'; if ($detectedTaskType == 'general') { if ($task->project_id) $detectedTaskType = 'project'; elseif ($task->service_id) $detectedTaskType = 'service'; elseif ($task->contract_id) $detectedTaskType = 'contract'; elseif ($task->support_ticket_id) $detectedTaskType = 'support'; } // Get current related ID based on task type $currentRelatedId = null; $currentRelatedName = $task->related_name ?? ''; if ($detectedTaskType == 'project' && $task->project_id) { $currentRelatedId = $task->project_id; $currentRelatedName = $task->project?->title ?? $task->related_name ?? 'Project #'.$task->project_id; } elseif ($detectedTaskType == 'service' && $task->service_id) { $currentRelatedId = $task->service_id; $currentRelatedName = $task->service?->name ?? $task->related_name ?? 'Service #'.$task->service_id; } elseif ($detectedTaskType == 'contract' && $task->contract_id) { $currentRelatedId = $task->contract_id; $currentRelatedName = $task->contract?->subject ?? $task->related_name ?? 'Contract #'.$task->contract_id; } elseif ($detectedTaskType == 'support' && $task->support_ticket_id) { $currentRelatedId = $task->support_ticket_id; $currentRelatedName = $task->supportTicket?->subject ?? $task->related_name ?? 'Ticket #'.$task->support_ticket_id; } @endphp
Status *
@php $currentStatus = $statuses->find(old('status_id', $task->status_id)); $currentStatusClass = $currentStatus ? strtolower(str_replace(' ', '', $currentStatus->label)) : ''; @endphp
@if($currentStatus) @if(strtolower($currentStatus->label) === 'backlog') @elseif(strtolower($currentStatus->label) === 'to do') @elseif(strtolower($currentStatus->label) === 'in progress') @elseif(strtolower($currentStatus->label) === 'review') @elseif(strtolower($currentStatus->label) === 'done') @elseif(strtolower($currentStatus->label) === 'blocked') @else @endif {{ $currentStatus->label }} @else Select Status @endif
@foreach($statuses as $status)
@if(strtolower($status->label) === 'backlog') @elseif(strtolower($status->label) === 'to do') @elseif(strtolower($status->label) === 'in progress') @elseif(strtolower($status->label) === 'review') @elseif(strtolower($status->label) === 'done') @elseif(strtolower($status->label) === 'blocked') @else @endif {{ $status->label }}
@endforeach
@error('status_id')
{{ $message }}
@enderror
Add details that help team members understand and complete this task
is_billable) ? 'checked' : '' }}>
Select team members who will execute this task
Select team members who will manage/oversee this task
@if($task->attachments && $task->attachments->count() > 0)
@foreach($task->attachments as $attachment)
@if($attachment->is_image) {{ $attachment->filename }} @else @endif
{{ $attachment->filename }} {{ $attachment->file_size_human }}
@endforeach
@endif
Click to upload or drag and drop
PDF, DOC, XLS, Images, ZIP (Max 1MB per file)
@error('attachments')
{{ $message }}
@enderror
@if(isset($products) && $products->count() > 0)
Product Qty Unit Price Taxes Amount

No items added yet. Click "Add Item" to add products used in this task.

@endif
Cancel