@php use App\Models\Asset; @endphp @php use App\Helpers\AppHelper; @endphp @extends('layouts.master') @section('title', __('index.assets')) @section('action', __('index.lists')) @section('main-content')
@include('admin.section.flash_message')
@forelse($returnLists as $key => $value) @php $assignedDate = new DateTime($value->assigned_date); $returnedDate = !empty($value->returned_date) ? new DateTime($value->returned_date) : new DateTime(); $daysDifference = $assignedDate->diff($returnedDate)->days + 1; @endphp @empty @endforelse
# {{ __('index.employee') }} {{ __('index.asset') }} {{ __('index.returned_date') }} {{ __('index.return_condition') }} {{ __('index.action') }}
{{++$key}} {{ucfirst($value->user?->name)}} {{ucfirst($value->asset?->name)}} {{ isset($value->returned_date) ? AppHelper::formatDateForView($value->returned_date) : '' }} {{ ($daysDifference > 0) ? '(Used for:'. $daysDifference .'days)' : '' }} {{ ucfirst($value->return_condition) }}

{{ __('index.no_records_found') }}

@forelse($maintenanceLists as $key => $value) @empty @endforelse
# {{ __('index.asset') }} {{ __('index.type') }} {{ __('index.is_repaired') }} {{ __('index.action') }}
{{++$key}} {{ucfirst($value->asset?->name)}} {{ucfirst($value->asset?->type?->name)}} @can('assign_repair_update') @endcan

{{ __('index.no_records_found') }}

@include('admin.assetManagement.assetDetail.common.assignment_detail') @include('admin.assetManagement.assetDetail.show') @endsection @section('scripts') @endsection