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

Add New Task

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

No Task Lists Available

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

Create Task List First
@else
@csrf
1

Select Task Type

Choose the type of task you want to create.

@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

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 (Optional)

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

🖼️ 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 create your task...
@endif

Save as Default Description

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

Preview:

@push('scripts') @endpush @endsection