@extends('layouts.app') @section('form-title') {{ __('Task') }} @endsection @section('breadcrumb') @endsection {{-- --}} @section('content')
{{ __('Edit task') }}
@csrf @method('PUT')
@if(allowedToAddUpdateProjOrg())
{!! clients('client', old('client', $task->client_id ?? (getAuthUser()->organisation ? getAuthUser()->organisation->id : 0))) !!}
@if($errors->has('client'))

{{ $errors->first('client') }}

@endif
@else {{ getAuthUser()->organisation->name }} @endif
{!! projects('project', $task->client_id ?? (getAuthUser()->organisation ? getAuthUser()->organisation->id : 0), old('project', $task->project ? $task->project->id : 0)) !!}
@if($errors->has('project'))

{{ $errors->first('project') }}

@endif
{{ $task->project ? $task->project->projectStatus->translated_title : '' }}
{{ $task->project && $task->project->projectOwner ? $task->project->projectOwner->name : '' }}
{{ optional($task->project)->deadline }}
@if($errors->has('task_title'))

{{ $errors->first('task_title') }}

@endif
{!! taskOwner('task_owner', $task->client_id ?? (getAuthUser()->organisation ? getAuthUser()->organisation->id : 0), old('task_owner', $task->taskOwner ? $task->taskOwner->id : 0)) !!}
@if($errors->has('task_owner'))

{{ $errors->first('task_owner') }}

@endif
{!! taskStatus('task_status', old('task_status', $task->status)) !!} @if($errors->has('task_status'))

{{ $errors->first('task_status') }}

@endif
@if($errors->has('task_deadline'))

{{ $errors->first('task_deadline') }}

@endif
@if(hasPermissionAndModuleEnabled('view book time fields', 'time_mgt'))
:
@if($errors->has('booking_time_hours'))

{{ $errors->first('booking_time_hours') }}

@endif
@if($errors->has('booking_date'))

{{ $errors->first('booking_date') }}

@endif
@endif
@foreach ($task->attachments as $attachment) @endforeach @if(hasPermissionAndModuleEnabled('view book time fields', 'time_mgt'))
@push('child-scripts') @endpush @endif
@include('tasks.booked-time', ['booked_task_id' => $task->id, 'project' => $task->project])
@include('tasks.message_buttons', ['reply' => $reply, 'parent_message_id' => $parent_message_id])
@include('tasks.messages', ['task' => $task])
@endsection @push('child-scripts') @endpush