Merge pull request 'removed temporary table in target table' (#1144) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s

Reviewed-on: #1144
This commit was merged in pull request #1144.
This commit is contained in:
2026-09-30 11:27:01 +00:00

View File

@@ -15,6 +15,12 @@
<th class="border px-4 py-2 whitespace-nowrap">
Monthly Plan Quantity
</th>
<th class="border px-4 py-2 whitespace-nowrap">
Monthly Actual Quantity
</th>
<th class="border px-4 py-2 whitespace-nowrap">
Monthly Efficiency(%)
</th>
</tr>
</thead>
@@ -38,6 +44,12 @@
<td class="border px-4 py-2 whitespace-nowrap font-semibold">
{{ $monthlyRecords ?? 0 }}
</td>
<td class="border px-4 py-2 whitespace-nowrap font-semibold">
{{ $monthlyRecords ?? 0 }}
</td>
<td class="border px-4 py-2 whitespace-nowrap font-semibold">
{{ $monthlyRecords ?? 0 }}
</td>
</tr>
@else
@@ -53,92 +65,17 @@
</div>
</div>
<div>
<h2>Test</h2>
{{-- //.. --}}
<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" rowspan="4">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" rowspan="3">Category</th>
<p>Records: {{ count($records) }}</p>
<p>Dates: {{ count($dates) }}</p>
</div>
{{-- //.. --}}
<th class="border px-4 py-2 whitespace-nowrap" colspan="{{ count($dates) * 3 }}" class="text-center">
Production Plan Dates
</th>
</tr>
<tr>
@foreach($dates as $date)
{{-- <th colspan="3" class="text-center">
{{ $date }}
</th> --}}
<th colspan="2" class="text-center border-r-4 border-gray-400">
{{ $date }}
</th>
@endforeach
</tr>
<tr>
@foreach($dates as $date)
{{-- <th class="border px-4 py-2 whitespace-nowrap">Item Quantity</th> --}}
<th class="border px-4 py-2 whitespace-nowrap">Plan Quantity</th>
<th class="border px-4 py-2 whitespace-nowrap border-r-4 border-gray-400">
Actual Quantity
</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>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['category'] }}</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>
<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_hourly_quantity'][$date] ?? '-' }}
</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="10" class="px-4 py-4 text-center text-gray-500">
No production plan data found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>