@push('styles') @endpush
@if (!$managePermission)
@lang('performance::app.addKeyResults')
@endif
@if ($objective->status)
{{ __('performance::app.' . $objective->status->status) }}
{{ $objective->status->objective_progress }}%
@endif

@lang('app.addedBy')

@lang('performance::app.owner')

@foreach ($objective->owners as $item) @endforeach

@lang('performance::app.totalKeyResults')

{{ count($objective->keyResults) }}

@lang('performance::app.priority')

@if ($objective->priority) {{ __('performance::app.' . $objective->priority) }} @else -- @endif

@lang('performance::app.checkInFrequency')

{{ $objective->check_in_frequency ? __('app.' . $objective->check_in_frequency) : '--' }}

@lang('app.date')

{{ \Carbon\Carbon::parse($objective->start_date)->translatedFormat(company()->date_format) }} - {{ \Carbon\Carbon::parse($objective->end_date)->translatedFormat(company()->date_format) }}
@if ($objective->project_id) @endif

@lang('app.description')

@if(strlen($objective->description) > 500)

{!! nl2br(Illuminate\Support\Str::limit($objective->description, 500, '...')) !!} @lang('performance::app.viewMore')

@else

{!! !empty($objective->description) ? nl2br($objective->description) : '--' !!}

@endif
@forelse ($objective->keyResults as $key => $keyResult)
@if ($key == 0 )
@lang('performance::app.keyResults')
@endif
{{ $key + 1 }}. {{$keyResult->title}}
@lang('app.description')
@if(strlen($keyResult->description) > 100)

{!! nl2br(Illuminate\Support\Str::limit($keyResult->description, 100, '...')) !!} @lang('performance::app.viewMore')

@else

{!! !empty($keyResult->description) ? nl2br($keyResult->description) : '--' !!}

@endif
@lang('performance::app.totalCheckIns')

{{ count($keyResult->checkIns) }}

@lang('performance::app.values')
{{ $keyResult->original_current_value !== null ? number_format((float) $keyResult->original_current_value, 2) : '--' }}
{{ $keyResult->current_value !== null ? number_format((float) $keyResult->current_value, 2) : '--' }}
{{ $keyResult->target_value !== null ? number_format((float) $keyResult->target_value, 2) : '--' }}
@lang('app.progress')
{{ $keyResult->key_percentage }}%
@lang('app.added') @lang('app.on')

{{ $keyResult->created_at ? \Carbon\Carbon::parse($keyResult->created_at)->translatedFormat(company()->date_format) : '--'}}

@lang('performance::app.lastCheckIn')

{{ $keyResult->last_check_in ? \Carbon\Carbon::parse($keyResult->last_check_in)->translatedFormat(company()->date_format) : '--'}}

@if (!$managePermission) @endif
@if (count($keyResult->checkIns) > 0)
@foreach ($keyResult->checkIns as $check => $checkIn)
@if ($check == 0)
@lang('performance::app.checkInDetails')
@endif

{{ $checkIn->current_value }}

@if($checkIn->confidence_level) {{ __('performance::app.' . $checkIn->confidence_level) }} @else {{ '--' }} @endif

{{ $checkIn->check_in_date ? \Carbon\Carbon::parse($checkIn->check_in_date)->translatedFormat(company()->date_format) : '--' }}

@lang('performance::app.progressUpdate')

{{ $checkIn->progress_update ? $checkIn->progress_update : '--' }}

@lang('performance::app.barriers')

{{ $checkIn->barriers ? $checkIn->barriers : '--' }}

@if (!$managePermission) @endif @if (!$managePermission) @endif
@endforeach
@else @endif
@empty @endforelse