@extends('org.layout.adminPanel') @section('title', 'Item') @section('section') @php $dep_id = encode($item->parent->mainParent->dep_id); $project_id = encode($item->parent->project_id); $folder_id = encode($item->folder_id); $org_location_id = encode(App\Models\Department::where('id', decode($dep_id))->value('org_location') ?? ''); $idForPermission = encode($currentItem->item_id); $idArray = [ App\Models\User::$DIV_MANAGER => $org_location_id ?? '', App\Models\User::$DEP_MANAGER => $dep_id ?? '', App\Models\User::$PROJECT_MANAGER => $project_id ?? '', App\Models\User::$GOVE_TEAM => $folder_id ?? '', App\Models\User::$REVIEWER => $idForPermission ?? '', App\Models\User::$GUEST => $idForPermission ?? '', ]; @endphp @if (isset($registered_in) && !empty($registered_in)) Back @else @if (Helper::checkRole(['REVIEWER', 'GUEST'])) Back @else Back @endif @endif @endsection @section('css') {{-- css --}} @endsection @section('content') @php $icons = [ 'pdf' => 'bi bi-filetype-pdf', 'doc' => 'bi bi-filetype-doc', 'docx' => 'bi bi-filetype-docx', 'ppt' => 'bi bi-filetype-ppt', 'txt' => 'bi bi-filetype-txt', 'xls' => 'bi bi-filetype-xls', 'xlsx' => 'bi bi-filetype-xlsx', 'video' => 'bi bi-play-circle-fill', 'zip' => 'bi bi-file-earmark-zip', ]; @endphp {{-- content --}}
@if ( !Helper::permissionChecker('ITEM', [ 'permission' => ['comment'], 'default_return' => false, 'id' => [ App\Models\User::$DIV_MANAGER => $org_location_id ?? '', App\Models\User::$DEP_MANAGER => $dep_id ?? '', App\Models\User::$PROJECT_MANAGER => $project_id ?? '', App\Models\User::$GOVE_TEAM => $folder_id ?? '', App\Models\User::$REVIEWER => $idForPermission ?? '', App\Models\User::$GUEST => $idForPermission ?? '', ], ]) && Helper::checkRole(['REVIEWER', 'GUEST']))
@else
@if ($status != 'Complete')
{{ $status }}
@endif @endif
@if (!Helper::checkRole(['REVIEWER', 'GUEST']))
@if (!empty($item->closed_at)) {{-- null --}} @elseif (!empty($slot)) @if (isset($slot->status) && $slot->status == 'COMPLETE')

Reviewed

@else

Mark as reviewed

@endif @endif Edit @if (empty($item->closed_at)) Close item @endif
@else @if (isset($slot->status) && $slot->status == 'COMPLETE')

Reviewed

@endif @endif
{{-- --}}

{{ $currentItem->name }}

ID: {{ !empty($currentItem->reference_number) ? $currentItem->reference_number : '-' }}

Review period: @if (!empty($item->closed_at)) Closed @elseif (!empty($currentItem->expired_at) && $currentItem->expired_at < date('Y-m-d')) Expired by {{ readableTimeDiff($currentItem->expired_at) }} @elseif (empty($slot)) Unavailable @else {{ !empty($slot->start_at) ? date(DISPLAY_DATE_FORMAT, strtotime($slot->start_at)) : '-' }} to {{ !empty($slot->end_at) ? date(DISPLAY_DATE_FORMAT, strtotime($slot->end_at)) : '-' }} @endif

Reviews Scheduled To End: {{ !empty($currentItem->expired_at) ? date(DISPLAY_DATE_FORMAT_WITH_MONTH_NAME, strtotime($currentItem->expired_at)) : '-' }}

Type: {{ ucfirst(strtolower($currentItem->type)) }}

@if (strtolower($currentItem->type) == 'register') @if (!Helper::checkRole(['REVIEWER', 'GUEST']))

@endif
{{-- --}}
#Name Type Expired at Action
@else
{{-- item preivew --}} @if (strtolower($currentItem->type) == 'image' && !empty($currentItem->url)) @elseif(strtolower($currentItem->type) == 'video' && !empty($currentItem->url)) @php $videoMeta = videoData($currentItem->url); @endphp @if ($videoMeta->source == 'youtube') @elseif ($videoMeta->source == 'wistia') @else @endif @elseif (strtolower($currentItem->type) == 'document' && !empty($currentItem->url)) @elseif(strtolower($currentItem->type) == 'text') {{-- text content --}}

{{ $currentItem->text_content }}

@else No preview @endif {{-- end preview --}}
@endif

Created at: {{ !empty($currentItem->creation_at) ? date(DISPLAY_DATE_FORMAT_WITH_MONTH_NAME, strtotime($currentItem->creation_at)) : '-' }}

@if ($currentItem->type == 'hardware')

Purchase date: {{ !empty($currentItem->purchased_at) ? date(DISPLAY_DATE_FORMAT_WITH_MONTH_NAME, strtotime($currentItem->purchased_at)) : '-' }}

@endif

Review every: {{ $currentItem->review_period == 0 ? '' : $currentItem->review_period }} {{ ucfirst(strtolower($currentItem->review_period_type)) }} {{ $currentItem->review_period_type == 'ONCE' ? 'only' : '' }}

{{ $currentItem->description }}

@foreach ($item->tags as $tag)
{{ $tag->tag->name }}
@endforeach

@foreach ($item->categoryCodes as $code)
{{ str_pad($code->codeInfo->code, CODE_PAD, 0, STR_PAD_LEFT) }}: {{ $code->codeInfo->name }}
@endforeach

@if (!empty($item->uniqueCode))
**{{ str_pad($item->uniqueCode->codeInfo->code, UCODE_PAD, 0, STR_PAD_LEFT) }}** : {{ $item->uniqueCode->codeInfo->name }}
@endif
@if (Helper::permissionChecker('ITEM', [ 'permission' => ['comment'], 'default_return' => false, 'id' => [ App\Models\User::$DIV_MANAGER => $org_location_id ?? '', App\Models\User::$DEP_MANAGER => $dep_id ?? '', App\Models\User::$PROJECT_MANAGER => $project_id ?? '', App\Models\User::$GOVE_TEAM => $folder_id ?? '', App\Models\User::$REVIEWER => $idForPermission ?? '', App\Models\User::$GUEST => $idForPermission ?? '', ], ])) @if (!empty($item->closed_at)) @elseif ( // !(!empty($currentItem->expired_at) && $currentItem->expired_at < date('Y-m-d')) && !empty($slot))
@csrf Review

@if (Helper::permissionChecker('ITEM', [ 'permission' => ['internal_comment'], 'default_return' => false, 'id' => [ App\Models\User::$DIV_MANAGER => $org_location_id ?? '', App\Models\User::$DEP_MANAGER => $dep_id ?? '', App\Models\User::$PROJECT_MANAGER => $project_id ?? '', App\Models\User::$GOVE_TEAM => $folder_id ?? '', App\Models\User::$REVIEWER => $idForPermission ?? '', App\Models\User::$GUEST => $idForPermission ?? '', ], ]))
@endif
@error('comment') {{ $message }} @enderror 0/255
{{--

dsfasdfdsf.pdf

--}}

@error('attachment')
@enderror



@endif @else @endif @if (Helper::permissionChecker('ITEM', [ 'permission' => ['comment_view'], 'default_return' => false, 'id' => [ App\Models\User::$DIV_MANAGER => $org_location_id ?? '', App\Models\User::$DEP_MANAGER => $dep_id ?? '', App\Models\User::$PROJECT_MANAGER => $project_id ?? '', App\Models\User::$GOVE_TEAM => $folder_id ?? '', App\Models\User::$REVIEWER => $idForPermission ?? '', App\Models\User::$GUEST => $idForPermission ?? '', ], ]))
{{-- comments --}} {{--
Status: Change required

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

Jaypal Sapara 2023-05-13

--}}
@else @endif
@if (!Helper::checkRole(['REVIEWER', 'GUEST']))
{{-- History --}}
@endif
{{-- trash popup --}} {{-- restore popup --}} {{-- addItem popup --}} @endsection @section('js') {{-- js --}} @if (!Helper::checkRole(['REVIEWER', 'GUEST'])) @endif @if (Helper::permissionChecker('ITEM', [ 'permission' => ['comment_view'], 'default_return' => false, 'id' => [ App\Models\User::$DIV_MANAGER => $org_location_id ?? '', App\Models\User::$DEP_MANAGER => $dep_id ?? '', App\Models\User::$PROJECT_MANAGER => $project_id ?? '', App\Models\User::$GOVE_TEAM => $folder_id ?? '', App\Models\User::$REVIEWER => $idForPermission ?? '', App\Models\User::$GUEST => $idForPermission ?? '', ], ])) @endif @endsection