@vite('resources/css/app.css') @include('Admin.sidebar')

Projects

- Ongoing
- On Hold and Needs Approval.
- Completed.
@if ($errors->any())
{{ $errors->first('error') }}
@endif
@foreach ($projects as $project) @php $rowClass = ''; if ($project->project_status === 'Ongoing') { $rowClass = 'bg-yellow-200'; } if ( $project->project_status === 'On_Hold' || $project->project_status === 'Needs_Approval' ) { $rowClass = 'bg-orange-400'; } if ($project->project_status === 'Completed') { $rowClass = 'bg-green-300'; } $endDate = \Carbon\Carbon::parse($project->end_date); $fiveDaysFromNow = now()->addDays(5); $rowClass2 = ''; // Determine the row class based on conditions if ($endDate->lte($fiveDaysFromNow)) { $rowClass2 = 'bg-red-400'; } @endphp @endforeach
Project Name Employees Project Phase Start Date End Date Upload View Edit delete
{{ $project->project_name }}
    @foreach (explode(',', $project->employee_info) as $employee) @php $employeeParts = explode('-', trim($employee)); $userId = trim($employeeParts[0]); $employeeName = trim($employeeParts[1]); @endphp
  • {{ $employeeName }}
  • @endforeach
@csrf
{{ \Carbon\Carbon::parse($project->start_date)->format('F j, Y g:i A') }} {{ \Carbon\Carbon::parse($project->end_date)->format('F j, Y g:i A') }} @if ($endDate->isPast())
The End Date has Already Passed.
@elseif ($endDate->lte($fiveDaysFromNow))
The Deadline is Rapidly Approaching.
@endif
@csrf
@include('Admin.projectmodal')