@extends('layouts.app') @section('form-title') {{ __('Task') }}-{{ __('Message') }}: {{ $notification->subject }} @endsection @section('form-sub-title') @if(!empty($notification->project) && !empty($notification->client)) {{ $notification->project->title }} - {{ $notification->client->name }} @endif @endsection @section('breadcrumb') @endsection @section('content')
{{ __('Add new project') }} {{ __('Projects') }}
@csrf @method('delete')
@foreach ($notification->task->messages as $message)
@if($message->message_type === 'internal')
{{ $message->taskOwner->name }}    {{ $message->created_at }} - {{ $message->created_time }}
@endif @if($message->message_type === 'external')
{{ $message->sent_by_name }}    {{ $message->created_at }} - {{ $message->created_time }}
@endif @if($message->message_type === 'incomming')
{{ $message->sent_by_name }}    {{ $message->created_at }} - {{ $message->created_time }}
@endif
@if(!empty($message->int_note_sent_to))
{{ __('To') }}:
{!! $message->receivers($message->int_note_sent_to) !!}
@endif @if(!empty($message->msg_sent_to))
{{ __('To') }}:
@php $receivers = explode(',', $message->msg_sent_to); @endphp @foreach ($receivers as $receiver) @if($loop->last) {{ $receiver }} @else {{ $receiver }},
@endif @endforeach
@endif @if(!empty($message->cc))
{{ __('CC') }}:
@php $receivers = explode(',', $message->cc); @endphp @foreach ($receivers as $receiver) @if($loop->last) {{ $receiver }} @else {{ $receiver }},
@endif @endforeach
@endif @if(!empty($message->cc_to_collegues))
{{ __('CC to colleagues') }}:
{!! $message->receivers($message->cc_to_collegues) !!}
@endif @if(!empty($message->bcc))
{{ __('BCC') }}:
@php $receivers = explode(',', $message->bcc); @endphp @foreach ($receivers as $receiver) @if($loop->last) {{ $receiver }} @else {{ $receiver }},
@endif @endforeach
@endif @if(!empty($message->subject))
{{ __('Subject') }}:
{{ $message->subject }}
@endif
{!! $message->message !!}
@include('tasks.attachments', ['attachments' => $message->attachments])
@endforeach {{-- @if(!empty($notification->task->project) && !empty($notification->task->project->projectOwner))
{{ $notification->task->project->projectOwner->name }}    {{ $notification->task->created_at }} - {{ $notification->task->created_time }}
{{ __('To') }}: {{ $notification->task->taskOwner->name }}
{!! $notification->task->description !!}
@include('tasks.attachments', ['attachments' => $notification->task->attachments])
@endif --}}
{{ __('Task') }}
@method('put') @csrf
@if(allowedToAddUpdateProjOrg())
{!! clients('client', old('client', $notification->task->client ? $notification->task->client->id : (getAuthUser()->organisation ? getAuthUser()->organisation->id : 0))) !!}
@if($errors->has('client'))

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

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

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

@endif
{!! projectStatus('project_status', old('project_status', $notification->task->project ? $notification->task->project->status : '')) !!}
@if($errors->has('project_status'))

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

@endif
{!! projectOwner('project_owner', $notification->task->client ? $notification->task->client->id : (getAuthUser()->organisation ? getAuthUser()->organisation->id : 0), old('project_owner', $notification->task->project ? $notification->task->project->project_owner : 0)) !!}
@if($errors->has('project_owner'))

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

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

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

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

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

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

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

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

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

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

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

@endif
@endsection @push('child-scripts') @endpush