Initial commit for new repo
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s

This commit is contained in:
dhanabalan
2025-12-16 17:05:04 +05:30
commit 3f0d529640
862 changed files with 141157 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
GUARD PATROL ENTRY STATUS TABLE :
</h2>
<div class="overflow-x-auto rounded-lg shadow">
<table class="w-full w-[600px] divide-y divide-gray-200 text-sm text-center">
<thead class="bg-gray-100 text-s font-semibold uppercase text-gray-700">
<tr>
<th rowspan="2" class="border px-4 py-2" style="width: 60px;">Patrol Round</th>
<th rowspan="2" class="border px-4 py-2">Guard Name</th>
<th colspan="3" class="border px-4 py-2">Patrol</th>
@php
$newSeqNoCnt = $seqNoCnt+1;
@endphp
<th colspan="{{ $newSeqNoCnt }}" class="border px-4 py-2">Sequences</th>
</tr>
<tr>
<th class="border px-4 py-2">Start Time</th>
<th class="border px-4 py-2">End Time</th>
<th class="border px-4 py-2">Lap Time</th>
{{-- <th class="border px-4 py-2" title="<?php echo htmlspecialchars($seqTitle1); ?>">1</th> --}}
@forelse($startSeqCheckPoints as $seq => $checkpoint)
@php
$seqTitle = '';
if ($checkpoint && $checkpoint->checkPointNames1 && $checkpoint->checkPointNames2) {
$seqTitle = $checkpoint->checkPointNames1->name . " - " . $checkpoint->checkPointNames2->name;
}
@endphp
@if ($seq == 1)
<th class="border px-4 py-2" style="" title="">1</th>
@endif
<th class="border px-4 py-2" title="{{ $seqTitle }}">{{ $seq + 1 }}</th>
@empty
<th class="border px-4 py-2" title="Sequences not found!">0</th>
@endforelse
</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" title="Patrol Round">{{ $index + 1 }}</td>
{{-- <td class="text-center border px-4 py-2 whitespace-nowrap">{{ $record['created_at'] ?? '' }}</td> --}}
<td class="border px-4 py-2" title="Guard Name">{{ $record['guard_name'] ?? '' }}</td>
<td class="border px-4 py-2" title="Start Time">{{ $record['start_time'] ?? '' }}</td>
<td class="border px-4 py-2" title="End Time">{{ $record['end_time'] ?? '' }}</td>
<td class="border px-4 py-2" title="Lap Time">{{ $record['lap_time'] ?? '' }}</td>
<td class="border px-4 py-2" title="">0</td>
{{-- <td class="border px-4 py-2" style="{{ $bgStyle1 }}" title="<?php echo htmlspecialchars($seqTitle1); ?>">{{ $actualVal1 }}</td> --}}
@foreach($startSeqCheckPoints as $seq => $checkpoint)
@php
$seqTitle = '';
if ($checkpoint && $checkpoint->checkPointNames1 && $checkpoint->checkPointNames2) {
$seqTitle = $checkpoint->checkPointNames1->name . " - " . $checkpoint->checkPointNames2->name;
}
$actualVal = $record["Sequence_$seq"] ?? 'X';
$minVal = $checkpoint->min_cushioning;
$maxVal = $checkpoint->max_cushioning;// . "\n"
$seqTitTime = $seqTitle . "\n". $record["Sequence_Time_$seq"] ?? '';
if ($actualVal == 'X') {
$bgStyle = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal) && is_numeric($minVal) && is_numeric($maxVal)) {
if ($actualVal < $minVal) {
$bgStyle = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal > $maxVal) {
$bgStyle = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle = '';
}
@endphp
<td class="border px-4 py-2" style="{{ $bgStyle }}" title="{{ $seqTitTime }}">{{ $actualVal }}</td>
@endforeach
</tr>
@empty
<tr>
<td colspan="14" class="px-4 py-4 text-center text-gray-500">
No records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,219 @@
<div>
<div class="mb-4">
<h2 class="text-lg font-bold text-gray-800">
@if ($hasSearched)
SERIAL INVOICE DATA TABLE ( No of Packages to Scan : <strong>{{ $packageCount }}</strong> )
@elseif ($materialInvoice)
MATERIAL INVOICE DATA TABLE
@else
@if ($completedInvoice)
@if ($isSerial)
SERIAL INVOICE DATA TABLE ( No of Packages to Scan : <strong>{{ $packageCount }}</strong> )
@else
MATERIAL INVOICE DATA TABLE
@endif
@else
INVOICE DATA TABLE ( No of Packages to Scan : <strong>{{ $packageCount }}</strong> )
@endif
@endif
</h2>
<div class="mt-2">
<hr class="border-t-2 border-gray-300">
</div>
</div>
{{-- Modal for completed invoice--}}
@if ($completedInvoice)
<div class="text-center text-red-500">
<p>
@if ($isSerial)
Completed the scanning process for serial invoice number <strong>{{ $invoiceNumber }}</strong>.
@else
Completed the scanning process for material invoice number <strong>{{ $invoiceNumber }}</strong>.
@endif
</p>
</div>
@endif
{{-- Modal for empty invoice--}}
@if ($emptyInvoice)
<div class="text-center text-red-500">
<p>No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.</p>
</div>
@endif
{{-- Modal for serial invoice--}}
@if ($hasSearched)
<div class="overflow-x-auto overflow-y-visible" style="height: 385px;">
{{-- <table class="min-w-[1500px] text-sm text-center border border-gray-300"> --}}
{{-- <table class="table-fixed min-w-[1500px] text-sm text-center border border-gray-300"> --}}
<table class="min-w-full text-sm text-center border border-gray-300">
<thead class="bg-gray-100 font-bold">
<tr>
<th class="border px-4 py-2">No</th>
<th class="border px-4 py-2">Material Code</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Motor Scanned Status</th>
<th class="border px-4 py-2">Pump Scanned Status</th>
<th class="border px-4 py-2">Capacitor Scanned Status</th>
<th class="border px-4 py-2">Scanned Status Set</th>
<th class="border px-4 py-2">Scanned Status</th>
<th class="border px-4 py-2 w-[300px] whitespace-nowrap">Time Stamp</th>
<th class="border px-4 py-2">Operator ID</th>
<th class="border px-4 py-2">Panel Box Supplier</th>
<th class="border px-4 py-2">Panel Box Serial Number</th>
</tr>
</thead>
<tbody>
@forelse ($invoiceData as $index => $row)
<tr class="border-t">
<td class="border px-4 py-2">{{ $index + 1 }}</td>
<td class="border px-4 py-2">{{ $row['code'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['serial_number'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['motor_scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['pump_scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['capacitor_scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['scanned_status_set'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['operator_id'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['panel_box_supplier'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['panel_box_serial_number'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="12" class="text-center py-4 text-gray-500">
No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
{{-- Modal for Capacitor Input --}}
<div>
<button wire:click="$set('showCapacitorInput', true)"></button>
@if($showCapacitorInput)
<div class="fixed inset-0 z-[9999] bg-black bg-opacity-50 flex items-center justify-center">
<div style="background:white; border:4px solid orange;" class="p-6 rounded-xl shadow-2xl w-[450px]">
<h3 class="text-xl font-semibold text-orange-700 mb-4">
Scan the Panel Box Supplier/Item Code/Serial Number
</h3>
<input
type="text"
id="capacitorInput"
autocomplete="off"
wire:model.defer="capacitorInput"
wire:keydown.enter.prevent="processCapacitorInput"
class="w-full border border-orange-300 rounded px-3 py-2 focus:outline-none focus:ring-0 focus:border-orange-300"
placeholder="Scan the panel box QR code"
{{-- autofocus --}}
onload="this.focus(); this.select();"
{{-- onfocus="this.select();" --}}
/>
<div class="flex justify-end gap-2 mt-4">
<button type="button" wire:click="cancelCapacitorInput"
class="mt-6 ml-10 bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded transition">
Cancel
</button>
</div>
</div>
</div>
{{-- Add this script to focus on the input --}}
<script>
document.getElementById('capacitorInput').focus();
</script>
@endif
</div>
{{-- Modal for material invoice--}}
@if($materialInvoice)
<div class="overflow-x-auto overflow-y-visible" style="height: 385px;">
{{-- <table class="min-w-[1500px] text-sm text-center border border-gray-300"> --}}
{{-- <table class="table-fixed min-w-[1500px] text-sm text-center border border-gray-300"> --}}
<table class="min-w-full text-sm text-center border border-gray-300">
<thead class="bg-gray-100 font-bold">
<tr>
<th class="border px-4 py-2">No</th>
<th class="border px-4 py-2">Material Code</th>
<th class="border px-4 py-2">Material Type</th>
<th class="border px-4 py-2">Material Quantity</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Batch Number</th>
<th class="border px-4 py-2">TimeStamp</th>
<th class="border px-4 py-2">Operator ID</th>
</tr>
</thead>
<tbody>
@forelse ($invoiceData as $index => $row)
<tr class="border-t">
<td class="border px-4 py-2">{{ $index + 1 }}</td>
<td class="border px-4 py-2">{{ $row['code'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['material_type'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['quantity'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['serial_number'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['batch_number'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['created_at'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['operator_id'] ?? 'N/A' }}</td>
</tr>
@empty
<tr>
<td colspan="10" class="text-center py-4 text-gray-500">
No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
</div>
{{-- <script>
// Clear input and set focus on form load
document.addEventListener('DOMContentLoaded', function () {
const input = document.getElementById('capacitorInput');
input.value = ''; // Clear the input field
input.focus(); // Set focus to the input field
});
</script> --}}
<script>
window.addEventListener('focus-capacitor-input', () => {
setTimeout(() => {
const input = document.getElementById('capacitorInput');
if (input) {
input.focus();
input.select();
}
}, 50);
});
window.addEventListener('focus-serial-number', () => {
setTimeout(() => {
const container = document.getElementById('serial_number_input');
const input = container?.querySelector('input'); // gets the actual input inside
if (input) {
input.focus();
input.select();
}
}, 50);
});
window.addEventListener('focus-invoice-number', () => {
setTimeout(() => {
const container = document.getElementById('invoice_number_input');
const input = container?.querySelector('input'); // gets the actual input inside
if (input) {
input.focus();
input.select();
}
}, 50);
});
</script>

View File

@@ -0,0 +1,55 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
INVOICE DATA STATUS 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">Created By</th>
<th class="border px-4 py-2">Serial Number/Quantity</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Locator Number</th>
<th class="border px-4 py-2">Scanned Status</th>
<th class="border px-4 py-2">Scanned Datetime</th>
<th class="border px-4 py-2">Scanned By</th>
</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['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['created_by'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['serial_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['pallet_number'] ?? '' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['locator_number'] ?? '' }}</td>
<td class="border px-4 py-2">
@php
$status = $record['scanned_status'] ?? '';
@endphp
<span @class([
'text-green-600 font-semibold' => $status === 'Scanned',
'text-yellow-600 font-semibold' => $status === 'Incompleted',
'text-red-600 font-semibold' => $status === 'Not Exist',
])>
{{ $status }}
</span>
</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['scanned_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_by'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="9" class="px-4 py-4 text-center text-gray-500">
No records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,86 @@
<div class="p-4">
@if ($reworkTyp == null || $reworkTyp == '')
<h2 class="text-lg text-center font-bold mb-4 uppercase tracking-wider" style="padding-top: 10px">
Choose 'Plant and Rework Type' then scan valid 'Invoice or Pallet' number to proceed..!
</h2>
@elseif ($reworkTyp == 'invoice')
{{-- No data available for the selected plant and production order! --}}
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
REWORK INVOICE DATA 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">Created By</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Locator Number</th>
<th class="border px-4 py-2">Scanned Status</th>
<th class="border px-4 py-2">Scanned Datetime</th>
<th class="border px-4 py-2">Scanned By</th>
</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['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['created_by'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['serial_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['pallet_number'] ?? '' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['locator_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['scanned_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_by'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="9" class="px-4 py-4 text-center text-gray-500">
No records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@elseif ($reworkTyp == 'pallet')
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
REWORK PALLET DATA 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">Created By</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Scanned Datetime</th>
<th class="border px-4 py-2">Scanned By</th>
</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['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['created_by'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['serial_number'] ?? '' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['scanned_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_by'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="9" class="px-4 py-4 text-center text-gray-500">
No records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
</div>

View File

@@ -0,0 +1,44 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
LOCATOR DATA 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">Created By</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Locator Number</th>
<th class="border px-4 py-2">Locator Quantity</th>
<th class="border px-4 py-2">Updated Datetime</th>
<th class="border px-4 py-2">Updated By</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
@forelse ($locators as $index => $locator)
<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">{{ $locator['created_at']?->format('Y-m-d H:i:s') ?? '-' }}</td>
<td class="border px-4 py-2">{{ $locator['created_by'] ?? '-' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $locator['pallet_number'] ?? '-' }}</td>
<td class="border px-4 py-2">{{ $locator['serial_number'] ?? '-' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $locator['locator_number'] ?? '-' }}</td>
<td class="border px-4 py-2">{{ $locator['locator_quantity'] ?? '-' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $locator['updated_at']?->format('Y-m-d H:i:s') ?? '-' }}</td>
<td class="border px-4 py-2">{{ $locator['updated_by'] ?? '-' }}</td>
</tr>
@empty
<tr>
<td colspan="9" class="px-4 py-4 text-center text-gray-500">
No locator records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,45 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
INVOICE DATA 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">Created By</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Locator Number</th>
<th class="border px-4 py-2">Scanned Status</th>
<th class="border px-4 py-2">Scanned Datetime</th>
<th class="border px-4 py-2">Scanned By</th>
</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['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['created_by'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['serial_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['pallet_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['locator_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['scanned_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_by'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="9" class="px-4 py-4 text-center text-gray-500">
No records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,31 @@
{{-- <div>
{{-- Do your work, then step back.
</div> --}}
<div>
@push('scripts')
<script>
window.addEventListener('play-notification-sound', () => {
const audio = new Audio('/sounds/click.mp3');
audio.play().catch(() => {
console.log("Sound blocked until user interacts with the page");
});
});
window.addEventListener('play-warn-sound', () => {
const audio = new Audio('/sounds/warning.mp3');
audio.play().catch(() => {
console.log("Sound blocked until user interacts with the page");
});
});
window.addEventListener('play-beep-sound', () => {
const audio = new Audio('/sounds/scanner-beep.mp3');
audio.play().catch(() => {
console.log("Sound blocked until user interacts with the page");
});
});
</script>
@endpush
</div>

View File

@@ -0,0 +1,40 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
PALLET DATA 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">Created By</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Scanned Datetime</th>
<th class="border px-4 py-2">Scanned By</th>
</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['created_at'] ?? '-' }}</td>
<td class="border px-4 py-2">{{ $record['created_by'] ?? '-' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['pallet_number'] ?? '-' }}</td>
<td class="border px-4 py-2">{{ $record['serial_number'] ?? '-' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $record['scanned_at'] ?? '-' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_by'] ?? '-' }}</td>
</tr>
@empty
<tr>
<td colspan="7" class="px-4 py-4 text-center text-gray-500">
No pallet records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
PALLET DATA 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">Created By</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Scanned Datetime</th>
<th class="border px-4 py-2">Scanned By</th>
</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">{{ $record['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['created_by'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['pallet_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['serial_number'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $record['scanned_by'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="7" class="px-4 py-4 text-center text-gray-500">
No pallet records found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,40 @@
<div class="w-full px-2 py-2">
<table class="w-full divide-y divide-gray-200 border-1 rounded-lg overflow-hidden">
<thead class="bg-gray-100">
<tr>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">No</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Item Code</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Serial Number</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Created At</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">SAP Status</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">SAP Description</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@forelse($items as $index => $item)
<tr>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $index + 1 }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['item_code'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['serial_number'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['created_at'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['sap_status'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['sap_description'] }}</td>
</tr>
@empty
@if ($attempted)
<tr>
<td colspan="6" class="px-3 py-4 border text-center text-sm text-gray-500">
No data available for the selected plant and production order!
</td>
</tr>
@elseif ($refresh)
<tr>
<td colspan="6" class="px-3 py-4 border text-center text-sm text-gray-500">
Scan the valid production order and press enter!
</td>
</tr>
@endif
@endforelse
</tbody>
</table>
</div>

View File

@@ -0,0 +1,40 @@
<div class="w-full px-2 py-2">
<table class="w-full divide-y divide-gray-200 border-1 rounded-lg overflow-hidden">
<thead class="bg-gray-100">
<tr>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">No</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Item Code</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Serial Number</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Created At</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">SAP Status</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">SAP Description</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@forelse($items as $index => $item)
<tr>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $index + 1 }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['item_code'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['serial_number'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['created_at'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['sap_status'] }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $item['sap_description'] }}</td>
</tr>
@empty
@if ($attempted)
<tr>
<td colspan="6" class="px-3 py-4 border text-center text-sm text-gray-500">
No data available for the selected plant and production order!
</td>
</tr>
@elseif ($refresh)
<tr>
<td colspan="6" class="px-3 py-4 border text-center text-sm text-gray-500">
Scan the valid production order and press enter!
</td>
</tr>
@endif
@endforelse
</tbody>
</table>
</div>

View File

@@ -0,0 +1,118 @@
<div class="flex-none md:flex space-x-4 w-full">
<!-- First Table (08:00 AM to 19:00 PM) -->
<div class="w-full px-2 py-2">
<table class="w-full divide-y divide-gray-200 border-1 rounded-lg overflow-hidden">
<thead class="bg-gray-100">
<tr>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">No</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Time Range</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Production Quantity</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@php
// Static time range for the first 12 hours (08:00 AM to 07:00 PM)
$timeRanges = [
'08:00 AM - 09:00 AM',
'09:00 AM - 10:00 AM',
'10:00 AM - 11:00 AM',
'11:00 AM - 12:00 PM',
'12:00 PM - 13:00 PM',
'13:00 PM - 14:00 PM',
'14:00 PM - 15:00 PM',
'15:00 PM - 16:00 PM',
'16:00 PM - 17:00 PM',
'17:00 PM - 18:00 PM',
'18:00 PM - 19:00 PM',
'19:00 PM - 20:00 PM',
];
@endphp
@foreach ($timeRanges as $index => $timeRange)
<tr>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $index + 1 }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $timeRange }}</td>
<td class="px-3 py-2 border text-xs text-center whitespace-nowrap">
{{ $hourlyData[$index] ?? 0 }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="w-full px-2 py-2">
<table class="w-full divide-y divide-gray-200 border-1 rounded-lg overflow-hidden">
<thead class="bg-gray-100">
<tr>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">No</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Time Range</th>
<th class="px-2 py-2 text-center border text-xs font-bold text-gray-700 uppercase tracking-wider">Production Quantity</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@php
// Static time range for the first 12 hours (08:00 AM to 07:00 PM)
$timeRanges = [
'20:00 PM - 21:00 PM',
'21:00 PM - 22:00 PM',
'22:00 PM - 23:00 PM',
'23:00 PM - 12:00 AM',
'12:00 AM - 01:00 AM',
'01:00 AM - 02:00 AM',
'02:00 AM - 03:00 AM',
'03:00 AM - 04:00 AM',
'04:00 AM - 05:00 AM',
'05:00 AM - 06:00 AM',
'06:00 AM - 07:00 AM',
'07:00 AM - 08:00 AM',
];
@endphp
@foreach ($timeRanges as $index => $timeRange)
<tr>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $index + 13 }}</td>
<td class="px-3 py-2 border text-center text-xs whitespace-nowrap">{{ $timeRange }}</td>
<td class="px-3 py-2 border text-xs text-center whitespace-nowrap">
{{ $hourlyData[$index + 12] ?? 0 }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- Second Table (20:00 PM to 08:00 AM next day) -->
{{-- <div class="w-full px-2">
<table class="w-full divide-y divide-gray-200 border-1 rounded-lg overflow-hidden">
<thead class="bg-gray-100">
<tr>
<th class="px-3 py-2 border text-center text-xs font-bold text-gray-800 uppercase tracking-wider">No</th>
<th class="px-3 py-2 border text-center text-xs font-bold text-gray-800 uppercase tracking-wider">Time Range</th>
<th class="px-3 py-2 border text-center text-xs font-bold text-gray-800 uppercase tracking-wider">Production Quantity</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">13</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">08:00 PM - 09:00 PM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[12] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">14</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">09:00 PM - 10:00 PM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[13] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">15</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">10:00 PM - 11:00 PM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[14] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">16</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">11:00 PM - 12:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[15] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">17</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">12:00 AM - 01:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[16] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">18</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">01:00 AM - 02:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[17] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">19</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">02:00 AM - 03:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[18] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">20</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">03:00 AM - 04:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[19] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">21</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">04:00 AM - 05:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[20] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">22</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">05:00 AM - 06:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[21] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">23</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">06:00 AM - 07:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[22] }}</td></tr>
<tr><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">24</td><td class="px-3 py-2 border text-center text-xs whitespace-nowrap">07:00 AM - 08:00 AM</td><td class="px-3 py-2 border text-xs text-center whitespace-nowrap">{{ $productionQuantities[23] }}</td></tr>
</tbody>
</table>
</div> --}}
</div>

View File

@@ -0,0 +1,58 @@
<div class="p-4">
<h2 class="text-lg font-bold mb-4 text-gray-700 uppercase tracking-wider">
SERIAL LOCATOR DATA 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">Created By</th>
<th class="border px-4 py-2">Pallet Number</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Locator Number</th>
<th class="border px-4 py-2">Locator Quantity</th>
<th class="border px-4 py-2">Updated Datetime</th>
<th class="border px-4 py-2">Updated By</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
@forelse ($locators as $index => $locator)
<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">{{ $locator->created_at?->format('Y-m-d H:i:s') ?? '' }}</td>
<td class="border px-4 py-2">{{ $locator->created_by ?? '' }}</td>
<td class="border px-4 py-2">{{ $locator->pallet_number ?? '' }}</td>
<td class="border px-4 py-2">{{ $locator->serial_number ?? '' }}</td>
<td class="border px-4 py-2">{{ $locator->locator_number ?? '' }}</td>
<td class="border px-4 py-2">{{ $locator->locator_quantity ?? '' }}</td>
<td class="border px-4 py-2 whitespace-nowrap">{{ $locator->updated_at?->format('Y-m-d H:i:s') ?? '' }}</td>
<td class="border px-4 py-2">{{ $locator->updated_by ?? '' }}</td>
</tr>
@empty
<tr>
@if ($hasSearched)
<td colspan="9" class="px-4 py-4 text-center text-gray-900 font-semibold">
@if ($locatorNumber && $serialNumber)
Serial Number "{{ $serialNumber }}" and Locator Number "{{ $locatorNumber }}" not found.
@elseif ($locatorNumber)
Locator Number "{{ $locatorNumber }}" not found.
@elseif ($serialNumber)
Serial Number "{{ $serialNumber }}" not found.
@else
No records found.
@endif
</td>
@else
<td colspan="9" class="px-4 py-4 text-center text-gray-900 font-semibold">
No records found.
</td>
@endif
</tr>
@endforelse
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,209 @@
<div>
<div class="mb-4">
<h2 class="text-lg font-bold text-gray-800">
@if ($hasSearched)
SERIAL INVOICE DATA TABLE
@elseif ($materialInvoice)
MATERIAL INVOICE DATA TABLE
@else
@if ($completedInvoice)
@if ($isSerial)
SERIAL INVOICE DATA TABLE
@else
MATERIAL INVOICE DATA TABLE
@endif
@else
INVOICE DATA TABLE
@endif
@endif
</h2>
<div class="mt-2">
<hr class="border-t-2 border-gray-300">
</div>
</div>
{{-- Modal for completed invoice--}}
@if ($completedInvoice)
<div class="text-center text-red-500">
<p>
@if ($isSerial)
Completed the scanning process for serial invoice number <strong>{{ $invoiceNumber }}</strong>.
@else
Completed the scanning process for material invoice number <strong>{{ $invoiceNumber }}</strong>.
@endif
</p>
</div>
@endif
{{-- Modal for empty invoice--}}
@if ($emptyInvoice)
<div class="text-center text-red-500">
<p>No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.</p>
</div>
@endif
{{-- Modal for serial invoice--}}
@if ($hasSearched)
<div class="overflow-x-auto overflow-y-visible" style="height: 385px;">
{{-- <table class="min-w-[1500px] text-sm text-center border border-gray-300"> --}}
{{-- <table class="table-fixed min-w-[1500px] text-sm text-center border border-gray-300"> --}}
<table class="min-w-full text-sm text-center border border-gray-300">
<thead class="bg-gray-100 font-bold">
<tr>
<th class="border px-4 py-2">No</th>
<th class="border px-4 py-2">Material Code</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Motor Scanned Status</th>
<th class="border px-4 py-2">Pump Scanned Status</th>
<th class="border px-4 py-2">Capacitor Scanned Status</th>
<th class="border px-4 py-2">Scanned Status Set</th>
<th class="border px-4 py-2">Scanned Status</th>
<th class="border px-4 py-2 w-[300px] whitespace-nowrap">Time Stamp</th>
<th class="border px-4 py-2">Operator ID</th>
<th class="border px-4 py-2">Panel Box Supplier</th>
<th class="border px-4 py-2">Panel Box Serial Number</th>
</tr>
</thead>
<tbody>
@forelse ($invoiceData as $index => $row)
<tr class="border-t">
<td class="border px-4 py-2">{{ $index + 1 }}</td>
<td class="border px-4 py-2">{{ $row['code'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['serial_number'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['motor_scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['pump_scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['capacitor_scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['scanned_status_set'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['scanned_status'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['created_at'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['operator_id'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['panel_box_supplier'] ?? '' }}</td>
<td class="border px-4 py-2">{{ $row['panel_box_serial_number'] ?? '' }}</td>
</tr>
@empty
<tr>
<td colspan="12" class="text-center py-4 text-gray-500">
No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
{{-- Modal for Capacitor Input --}}
<div>
<button wire:click="$set('showCapacitorInput', true)"></button>
@if($showCapacitorInput)
<div class="fixed inset-0 z-[9999] bg-black bg-opacity-50 flex items-center justify-center">
<div style="background:white; border:4px solid orange;" class="p-6 rounded-xl shadow-2xl w-[450px]">
<h3 class="text-xl font-semibold text-orange-700 mb-4">
Scan the Panel Box Supplier/Item Code/Serial Number
</h3>
<input
type="text"
id="capacitorInput"
autocomplete="off"
wire:model.defer="capacitorInput"
wire:keydown.enter.prevent="processCapacitorInput"
class="w-full border border-orange-300 rounded px-3 py-2 focus:outline-none focus:ring-0 focus:border-orange-300"
placeholder="Scan the panel box QR code"
{{-- autofocus --}}
onload="this.focus(); this.select();"
{{-- onfocus="this.select();" --}}
/>
<div class="flex justify-end gap-2 mt-4">
<button type="button" wire:click="cancelCapacitorInput"
class="mt-6 ml-10 bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded transition">
Cancel
</button>
</div>
</div>
</div>
{{-- Add this script to focus on the input --}}
<script>
document.getElementById('capacitorInput').focus();
</script>
@endif
</div>
{{-- Modal for material invoice--}}
@if($materialInvoice)
<div class="overflow-x-auto overflow-y-visible" style="height: 385px;">
{{-- <table class="min-w-[1500px] text-sm text-center border border-gray-300"> --}}
{{-- <table class="table-fixed min-w-[1500px] text-sm text-center border border-gray-300"> --}}
<table class="min-w-full text-sm text-center border border-gray-300">
<thead class="bg-gray-100 font-bold">
<tr>
<th class="border px-4 py-2">No</th>
<th class="border px-4 py-2">Material Code</th>
<th class="border px-4 py-2">Material Type</th>
<th class="border px-4 py-2">Material Quantity</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Batch Number</th>
<th class="border px-4 py-2">TimeStamp</th>
<th class="border px-4 py-2">Operator ID</th>
</tr>
</thead>
<tbody>
@forelse ($invoiceData as $index => $row)
<tr class="border-t">
<td class="border px-4 py-2">{{ $index + 1 }}</td>
<td class="border px-4 py-2">{{ $row['code'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['material_type'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['quantity'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['serial_number'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['batch_number'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['created_at'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">{{ $row['operator_id'] ?? 'N/A' }}</td>
</tr>
@empty
<tr>
<td colspan="10" class="text-center py-4 text-gray-500">
No data found for invoice number <strong>{{ $invoiceNumber }}</strong>.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
</div>
{{-- <script>
// Clear input and set focus on form load
document.addEventListener('DOMContentLoaded', function () {
const input = document.getElementById('capacitorInput');
input.value = ''; // Clear the input field
input.focus(); // Set focus to the input field
});
</script> --}}
<script>
window.addEventListener('focus-capacitor-input', () => {
setTimeout(() => {
const input = document.getElementById('capacitorInput');
if (input) {
input.focus();
input.select();
}
}, 50);
});
window.addEventListener('focus-serial-number', () => {
setTimeout(() => {
const container = document.getElementById('serial_number_input');
const input = container?.querySelector('input'); // gets the actual input inside
if (input) {
input.focus();
input.select();
}
}, 100);
});
</script>

View File

@@ -0,0 +1,81 @@
{{-- <div class="overflow-x-auto overflow-y-visible" style="height: 385px;">
<table class="table-auto w-full border-collapse border">
<thead class="bg-gray-100">
<tr>
<th class="border p-2">No</th>
<th class="border p-2">Reference No</th>
<th class="border p-2">Serial Number</th>
<th class="border p-2">Created By</th>
</tr>
</thead>
<tbody>
@forelse($records as $index => $record)
<tr>
<td class="border p-2 text-center">{{ $index + 1 }}</td>
<td class="border p-2 text-center">{{ $refNumber }}</td>
<td class="border p-2 text-center">{{ $record['serial_number'] }}</td>
<td class="border p-2 text-center">{{ $record->created_by }}</td>
</tr>
@empty
<tr>
<td class="border p-2 text-center" colspan="4">No serial numbers found.</td>
</tr>
@endforelse
</tbody>
</table>
</div> --}}
<div>
<h3 class="text-lg font-semibold mb-2">Sticker Printing Table</h3>
<div
wire:loading.remove
@if(!$materialInvoice) style="display:none" @endif
class="overflow-x-auto overflow-y-visible"
style="height: 385px;"
>
<table class="table-auto w-full border-collapse border">
{{-- <thead class="bg-gray-100"> --}}
<thead class="bg-gray-100 text-xs">
<tr>
<th class="border p-2">No</th>
<th class="border p-2">Reference No</th>
<th class="border p-2">Serial Number</th>
<th class="border p-2">Created By</th>
</tr>
</thead>
{{-- <tbody> --}}
<tbody class="text-xs">
@forelse($records as $index => $record)
<tr>
<td class="border p-2 text-center">{{ $index + 1 }}</td>
<td class="border p-2 text-center">{{ $refNumber }}</td>
<td class="border p-2 text-center">{{ $record['serial_number'] }}</td>
<td class="border p-2 text-center">{{ $record->created_by }}</td>
</tr>
@empty
<tr>
<td class="border p-2 text-center" colspan="4">No serial numbers found.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<script>
window.addEventListener('focus-serial-number', () => {
setTimeout(() => {
const container = document.getElementById('serial_number_input');
const input = container?.querySelector('input'); // gets the actual input inside
if (input) {
input.focus();
input.select();
}
}, 50);
});
</script>