@extends('layouts.app') @section('page-pretitle', __('Management')) @section('page-title', __('Projects')) @section('content') {{-- Flash Messages --}} @if ($errors->any()) @endif @if (session('success')) @endif {{-- Responsive Alert Styles --}}
{{-- Search Filter --}}

{{ __('Search Filter') }}

{{-- Add Button --}}
{{-- Entries Selector --}} @include('asset.entries')
{{-- Upload CSV --}} {{-- {{ __('Upload CSV') }} --}} {{-- Download All as PDF --}} {{-- Download All as Word --}} {{-- Add New Project --}} @if (auth()->user()->role == 'admin') {{ __('Add Project') }} @endif
{{-- Project Table --}}
@forelse($projects as $key => $project) {{-- --}} {{-- Assignees Modal --}} @empty @endforelse
# Description Client Received Year Start Date End Date Scope Assignees Project Progress Actions
{{ $key + $projects->firstItem() }}
{{ strtoupper($project->ref_no ?? '-') }} @if ($project->is_registration) Registered @endif
{{ $project->description }}
{{ strtoupper($project->client ? $project->client : '-') }} {{-- --}} {{ $project->received_year ? $project->received_year : '-' }} {{-- --}} {{-- --}} {{ $project->start_date ? \Carbon\Carbon::parse($project->start_date)->format('d M Y') : '-' }} {{-- --}} {{-- --}} {{ $project->end_date ? \Carbon\Carbon::parse($project->end_date)->format('d M Y') : '-' }} {{-- --}} {{ $project->scope->name ?? 'N/A' }} {{ $project->assignees->count() }} @if ($project->project_type && str_contains(strtolower($project->project_type->name), 'cancel'))
Cancelled Project
{{ $project->project_type->name }} @else
{{ $project->weighted_progress }}%
{{ $project->project_type->name ?? 'No Type' }}
@endif {{-- Show remarks box only if remarks exist --}} @if ($project->remarks)
Remarks: @php $words = explode(' ', $project->remarks); # Split remarks into words @endphp
@foreach ($words as $index => $word) {{ $word }} @if (($index + 1) % 2 == 0) {{-- Add line break after every 2 words --}}
@endif @endforeach
@endif
{{-- Dropdown --}} {{-- Bookmark --}}
@csrf
No Records
{{-- Pagination --}} @if ($projects->hasPages()) @endif
@endsection @section('script') @endsection