Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled
86 lines
4.5 KiB
PHP
86 lines
4.5 KiB
PHP
<div class="p-4">
|
|
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
|
|
PRODUCTION PLAN TABLE:
|
|
</h2>
|
|
<div class="overflow-x-auto rounded-lg shadow">
|
|
<table class="w-full divide-y divide-gray-200 text-sm text-center">
|
|
{{-- <thead class="bg-gray-100 text-s font-semibold uppercase text-gray-700">
|
|
<tr>
|
|
<th class="border px-4 py-2">No</th>
|
|
<th class="border px-4 py-2">Created Datetime</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap">Created By</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap">Plant</th>
|
|
<th class="border px-4 py-2">Line</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap">Item Code</th>
|
|
<th class="border px-4 py-2">Production Plan Dates</th>
|
|
</tr>
|
|
</thead> --}}
|
|
<thead class="bg-gray-100 text-s font-semibold uppercase text-gray-700">
|
|
<tr>
|
|
<th class="border px-4 py-2" rowspan="3">No</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap" rowspan="3">Plant</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap" rowspan="3">Line</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap" rowspan="3">Item Code</th>
|
|
|
|
<th class="border px-4 py-2 whitespace-nowrap" colspan="{{ count($dates) * 2 }}" class="text-center">
|
|
Production Plan Dates
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
@foreach($dates as $date)
|
|
<th colspan="2" class="text-center">
|
|
{{ $date }}
|
|
</th>
|
|
@endforeach
|
|
</tr>
|
|
<tr>
|
|
@foreach($dates as $date)
|
|
<th class="border px-4 py-2 whitespace-nowrap">Target Plan</th>
|
|
<th class="border px-4 py-2 whitespace-nowrap">Produced Quantity</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody class="divide-y divide-gray-100">
|
|
@forelse ($records as $index => $record)
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="border px-4 py-2">{{ $index + 1 }}</td>
|
|
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['plant_name'] }}</td>
|
|
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['line_name'] }}</td>
|
|
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['item_code'] }}</td>
|
|
|
|
{{-- @foreach($dates as $date)
|
|
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['target_plan'][$date] ?? '-' }}</td>
|
|
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['production_plan'][$date] ?? '-' }}</td>
|
|
@endforeach --}}
|
|
|
|
@foreach($dates as $date)
|
|
@if(in_array($date, $leaveDates))
|
|
<td class="border px-4 py-2 whitespace-nowrap">-</td>
|
|
<td class="border px-4 py-2 whitespace-nowrap">-</td>
|
|
@else
|
|
{{-- <td class="border px-4 py-2 whitespace-nowrap">{{ $record['daily_target'] ?? '-' }}</td> --}}
|
|
<td class="border px-4 py-2 whitespace-nowrap">
|
|
{{ $record['daily_target_dynamic'][$date] ?? '-' }}
|
|
</td>
|
|
<td class="border px-4 py-2 whitespace-nowrap">
|
|
{{ $record['produced_quantity'][$date] ?? '-' }}
|
|
</td>
|
|
{{-- <td class="border px-4 py-2 whitespace-nowrap">{{ $record['produced_quantity'] ?? '-' }}</td> --}}
|
|
@endif
|
|
@endforeach
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="9" class="px-4 py-4 text-center text-gray-500">
|
|
No production plan data found.
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|