@extends('layouts.dashboard') @section('title', 'Proj Mgr - Edit Task') @section('content')
Back to Project

Edit Task

{{ $project->name }}
@if($project->taskLists->count() === 0)

No Task Lists Available

You need to create at least one task list before you can edit tasks. Task lists help organize your work into categories like "To Do", "In Progress", etc.

Create Task List First
@else
@csrf @method('PUT')
1

Select Task Type

Choose the type of task.

@php // If project has no settings, enable all task types by default $hasSettings = isset($project->settings['taskTypes']); $enabledTaskTypes = []; $generalEnabled = $hasSettings ? (isset($project->settings['taskTypes']['general']) && $project->settings['taskTypes']['general']) : true; $equipmentEnabled = $hasSettings ? (isset($project->settings['taskTypes']['equipmentId']) && $project->settings['taskTypes']['equipmentId']) : true; $customerEnabled = $hasSettings ? (isset($project->settings['taskTypes']['customerName']) && $project->settings['taskTypes']['customerName']) : true; if ($generalEnabled) $enabledTaskTypes[] = 'general'; if ($equipmentEnabled) $enabledTaskTypes[] = 'equipmentId'; if ($customerEnabled) $enabledTaskTypes[] = 'customerName'; $enabledCount = count($enabledTaskTypes); $gridClass = $enabledCount === 3 ? 'grid-cols-3' : ($enabledCount === 2 ? 'grid-cols-2' : 'grid-cols-1'); @endphp
@if($generalEnabled)
Standard project task with manually entered details. Perfect for development, design, or administrative tasks.
@endif @if($equipmentEnabled)
Task related to specific rental equipment. Links directly to your equipment inventory and rental system.
@endif @if($customerEnabled)
Task linked to a specific customer. Perfect for customer support, follow-ups, or customer-specific projects.
@endif
@if(count($enabledTaskTypes) === 0)

No task types are enabled for this project. Please contact the project manager to enable task types in project settings.

@endif
2

@error('title')

{{ $message }}

@enderror
No equipment available
Searching customers...
No customers found
Loading orders...
No orders found

Order ID:

Email:

Customer Name:

Phone:

Company:

Billing Address:

Product:

Delivery Info:

3

Task Information

@error('description')

{{ $message }}

@enderror

Priority
@php $projectSettings = $task->project->settings ?? []; $requireApproval = $projectSettings['requireApproval'] ?? false; $canApprove = !$requireApproval || (auth()->id() === $task->project->project_manager_id); @endphp

Tasks can be assigned later if needed

@if($sprints->isEmpty())

No active sprints for this project

@endif
@error('task_list_id')

{{ $message }}

@enderror
4

Attachments

Add photos, videos, or PDF documents to support this task.

@if($task->attachments->count() > 0)

Existing Attachments ({{ $task->attachments->count() }})

@foreach($task->attachments as $attachment)
@if(str_starts_with($attachment->mime_type, 'image/')) 🖼️ @elseif(str_starts_with($attachment->mime_type, 'video/')) 🎥 @elseif($attachment->mime_type === 'application/pdf') 📄 @else 📎 @endif

{{ $attachment->original_filename }}

{{ $attachment->size > 1048576 ? number_format($attachment->size / 1048576, 2) . ' MB' : number_format($attachment->size / 1024, 1) . ' KB' }} @if($attachment->uploader) • Uploaded by {{ $attachment->uploader->first_name }} {{ $attachment->uploader->last_name }} @endif • {{ $attachment->created_at->diffForHumans() }}
Download
@endforeach
@endif
🖼️ Photos
🎥 Videos
📄 PDFs

Supported formats: JPG, PNG, GIF, WebP, MP4, MOV, AVI, WebM, PDF
Maximum size: 100MB per file • Multiple files: Supported

5

Service Call

Searching customers...
No customers found
Loading orders...
No orders found

Order ID:

Email:

Customer Name:

Phone:

Company:

Billing Address:

Product:

Delivery Info:

Please wait while we update your task...
@endif

Save as Default Description

@if($generalEnabled) @endif @if($equipmentEnabled) @endif @if($customerEnabled) @endif

Preview:

@push('scripts') @endpush @endsection