@php $type = class_basename($task->projectable_type ?? ''); @endphp @if($task->featured_image)
image
@endif @switch($type) @case('Invoice')
{{-- Contract & Company --}}
{{ $task->projectable->contract->subject ?? '—' }}

{{ $task->projectable->company->name ?? '—' }}

{{-- Tags --}} @if($task->tags()->exists())
@foreach($task->tagsTranslated('en')->get()->pluck('name_translated') as $tag) {{ $tag }} @endforeach
@endif
{{-- Invoice ID --}}

Invoice ID:

Claim Number:

{{ $task->projectable->getFormatedId() ?? '—' }}

{{ $task->projectable->claim_number ?? '—' }}


{{-- Financial Summary --}}

Total

Paid

Unpaid

@cMoney($task->projectable->total_invoiced, $task->projectable->currency, true)

@cMoney($task->projectable->paid_amount, $task->projectable->currency, true)

@cMoney($task->projectable->remaining_unpaid, $task->projectable->currency, true)

@break @case('Contract')
{{-- Subject & Company --}}
{{ $task->projectable->subject ?? '—' }}

{{ $task->projectable->assignable?->name ?? '—' }}

{{-- Tags --}} @if($task->tags()->exists())
@foreach($task->tagsTranslated('en')->get()->pluck('name_translated') as $tag) {{ $tag }} @endforeach
@endif
{{-- Contract Details --}}

Contract ID:

Reference ID:

{{ $task->projectable->id ?? '—' }}

{{ $task->projectable->refrence_id ?? '—' }}


{{-- Optional Financial Breakdown --}}

Contract Value

Invoiced

Paid

Advance Payment

{{ money($task->projectable->contract_value ?? 0, $task->projectable->currency) }}

{{ money($task->projectable->total_invoiced ?? 0, $task->projectable->currency) }}

{{ money($task->projectable->total_paid ?? 0, $task->projectable->currency) }}

{{ money($task->projectable->advance_payment_paid ?? 0, $task->projectable->currency) }}

@break @case('Project')

Project: {{ $task->projectable->name ?? '-' }}
Description: {{ $task->projectable->description ?? '-' }}

@break @case('StudioRequest')
{{-- Job Name & Description --}}
{{ $task->projectable->job_name ?? '—' }}

{{ $task->projectable->job_description ?? '—' }}


{{-- Requested By --}}

Requester Name:

Requester Email:

{{ $task->projectable->requester?->full_name ?? '—' }}

({{ $task->projectable->requester?->email ?? '—' }})


{{-- Sector & Department --}}

Sector:

Department:

{{ $task->projectable->sector?->name ?? '—' }}

{{ $task->projectable->department?->name ?? '—' }}

{{-- Related Job --}} @if ($task->projectable?->parent)

Related Job:

STU#{{ $task->projectable->parent->id ?? '—' }}

{{--
--}}

Related Job Details:

{{ $task->projectable->parent->projectable->job_name ?? '—' }}

{{$task->projectable->parent->projectable->job_description ?? '—' }}

@endif
{{-- Tags --}} @if($task->tags()->exists())
@foreach($task->tagsTranslated('en')->get()->pluck('name_translated') as $tag) {{ $tag }} @endforeach
@endif
@break @default

{{ $task->projectable->description ?? '-' }}

@endswitch