@extends('layouts.omd.omd') @section('title', 'Project Details') @section('content')
Project Overview
Initial Documents
| Description | Attachment | Responsible | Status |
|---|---|---|---|
| {{ $doc['name'] }} |
@php
$assignedStaff = $taskAssignmentsGroup[$doc['stage']] ?? collect();
@endphp
@forelse($assignedStaff as $assignment)
{{ $assignment->staff->name }}
@empty
Unassigned
@endforelse
|
Project Execution
| Description | Attachment | Responsible | Status |
|---|---|---|---|
| {{ $label }} |
@php
$assignedStaff = $taskAssignmentsGroup[$stage] ?? collect();
@endphp
@forelse($assignedStaff as $assignment)
{{ $assignment->staff->name }}
@empty
Unassigned
@endforelse
|
Material & Tech-Sheet
| Material | Attachment | Workflow | Procurement | Responsible | Finance | PO Status | Delivery | Remarks |
|---|---|---|---|---|---|---|---|---|
|
{{ $label }}
|
|
@php
$assignedStaff = $taskAssignmentsGroup[$stage] ?? collect();
@endphp
@forelse($assignedStaff as $assignment)
{{ $assignment->staff->name }}
@empty
Unassigned
@endforelse
|
@if($order) Cleared @else Under Review @endif |
@if($order)
{{ $order->po_number }}
PO Generated
@else
Pending
@endif
|
@if($rfq && $rfq->delivery_date) {{ \Carbon\Carbon::parse($rfq->delivery_date)->format('d M Y') }} @elseif($rfq) Awaited @else - @endif | @if($rfq) RFQ completed successfully and ready for PO workflow. @else Create RFQ to start quotation and procurement workflow. @endif |
SITE REPORTS
@php // 1. Updated Array: Removed Logs/Photos, Added Erection items $postPoDocs = [ ['name' => 'AB Report'], ['name' => 'Alignment Report'], ['name' => 'Bolt Tightening Report'], ['name' => 'Roof Sheeting Report'], ['name' => 'Erection drawings'], ['name' => 'Erection work order activity'], ]; // Fetch the single project-level execution $projectExecution = \App\Models\Order::with(['execution.documents']) ->where('project_id', $project->id) ->whereHas('execution') ->latest() ->first() ?->execution; @endphp @if(!$projectExecution)| Description | Attachment | Status | Responsible | {{-- 2. New OMD Approval Column --}}OMD Approval |
|---|---|---|---|---|
| {{ $doc['name'] }} | {{ $file ? 'Uploaded' : 'Pending' }} |
@php
$assignedStaff = $taskAssignmentsGroup[$doc['name']] ?? collect();
@endphp
@forelse($assignedStaff as $assignment)
{{ $assignment->staff->name }}
@empty
Unassigned
@endforelse
|
{{-- OMD Approval Logic --}}
Awaiting Upload |
| Date | Manpower | Equipment Used | Fuel (Liters) |
|---|---|---|---|
| {{ \Carbon\Carbon::parse($log->log_date)->format('d M, Y') }} | {{ $log->manpower }} People | {{ $log->equipment ?? '-' }} | {{ $log->fuel ? $log->fuel . ' L' : '-' }} |
| No daily logs have been saved yet. | |||
Client Receivable Scheduler
| Scheduler | Task | Responsible Person | Expected Milestone | Completion Date | Status | Action |
|---|---|---|---|---|---|---|
| {{ $receivable->category_name }} | {{ $receivable->stage_name }} | @php $stageTasks = array_map('trim', explode(',', $receivable->stage_name)); $assignments = $taskAssignments->filter(function ($item) use ($stageTasks) { return in_array($item->task_name, $stageTasks); }); $groupedByTask = $assignments->groupBy('task_name'); @endphp
@if($groupedByTask->count())
@foreach($groupedByTask as $taskName => $taskAssigns)
@php
$staffEntries = $taskAssigns->filter(fn($a) => $a->staff);
@endphp
@else
{{-- This handles your brand new custom schedulers or any unassigned tasks --}}
{{ $taskName }}
@endforeach
@forelse($staffEntries as $assignment)
{{ $assignment->staff->name }}
@empty
Staff Not Allotted
@endforelse
@foreach($stageTasks as $task)
@endif
{{ $task }}
@endforeach
Staff Not Allotted
|
₹{{ number_format($receivable->amount, 2) }} | {{ \Carbon\Carbon::parse($receivable->due_date)->format('d M Y') }} | @if($status == 'paid') Paid @elseif($status == 'partially_paid') Partial @elseif($status == 'overdue') Overdue @else Pending @endif | @if($receivable->status != 'paid') @endif |
| No receivable schedules created yet. | ||||||