{{-- resources/views/news/show.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ __('labels.company_recommendation') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => __('labels.company_recommendation'), 'actionButton' => [ 'url' => route('company-recommendations.index', ['type' => 'latest']), 'text' => __('labels.back_to_list'), ], ]) {{-- News Header --}}
{{--

{{ $companyRecommendation->title }}

--}}

{{ $companyRecommendation->title }}

{{-- Quick Actions --}}
@can('update', $companyRecommendation) @endcan @can('delete', $companyRecommendation) @endcan
{{-- METADATA CARDS --}}
{{-- Audience Card --}}
{{ __('labels.audience') }}
{{ $companyRecommendation->audience === 'general' ? __('labels.general') : __('labels.group') }}
@if ($companyRecommendation->category)
{{ __('labels.category') }}
{{ $companyRecommendation->category?->title }} {{-- @if ($post->category?->description) {{ Str::limit($post->category?->description, 30, '...') }} @endif --}}
@endif {{-- Status Card --}}
{{ __('labels.status') }}
{{ $companyRecommendation->is_published ? __('labels.published') : __('labels.draft') }}
@if ($companyRecommendation->description)
{{ __('labels.description') }}
{!! nl2br(e($companyRecommendation->description)) !!}
@endif {{-- Attachments Section --}} @isset($companyRecommendation->assets) @include('components.form.file-manager.uploaded-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $companyRecommendation->assets, ]) @endisset {{-- Groups Section --}} {{-- @if ($companyRecommendation->audience === 'group' && $companyRecommendation->groups->count() > 0) @include('components.form.view-selected-groups',[ 'groups' => $companyRecommendation->groups ]) @endif --}} {{-- Comments Section --}} @if (isset($companyRecommendation)) @include('components.comments.index', [ 'commentsCount' => $companyRecommendation->comments()->approved()->count(), 'comments' => $companyRecommendation->comments ?? null, 'commentableId' => $companyRecommendation->id ?? null, 'commentableType' => 'App\Models\CompanyRecommendation', 'loadCommentsUrl' => route('comments.index', [ 'commentableType' => 'company_recommendations', 'commentableId' => $companyRecommendation->id, ]), 'isDisabled' => $companyRecommendation->is_locked || $companyRecommendation->trashed(), 'isMarkAsAnswerDisabled' => true, 'isChangeStatusDisabled' => false, 'isVotingDisabled' => true, ]) @endif {{-- Additional Metadata --}} @include('components.meta.stats', [ 'created_at' => $companyRecommendation->created_at ?? null, 'updated_at' => $companyRecommendation->updated_at ?? null, 'published_at' => $companyRecommendation->published_at ?? null, 'is_published' => $companyRecommendation->is_published ?? null, 'assetCounts' => $companyRecommendation->assets->count() ?? null, 'creater' => $companyRecommendation->author_name ?? null, ]) @endsection