diff --git a/app/Livewire/StickerPrintData.php b/app/Livewire/StickerPrintData.php new file mode 100644 index 0000000..96ccdfa --- /dev/null +++ b/app/Livewire/StickerPrintData.php @@ -0,0 +1,55 @@ + 'loadStickerData', + 'addStickerToList' => 'loadSticker' + ]; + + public function loadStickerData($plantId, $refNumber) + { + $this->plantId = $plantId; + $this->refNumber = $refNumber; + $this->materialInvoice = true; + + $this->records = StickerPrinting::where('plant_id', $plantId) + ->where('reference_number', $refNumber) + ->orderBy('created_at', 'asc') + ->get(['serial_number', 'created_by']); + + } + + public function loadSticker($plantId, $refNumber, $serialNumber) + { + + $this->plantId = $plantId; + $this->refNumber = $refNumber; + $this->materialInvoice = true; + + $this->records = StickerPrinting::where('plant_id', $plantId) + ->where('reference_number', $refNumber) + ->orderBy('created_at', 'asc') + ->get(['serial_number', 'created_by']); + } + + public function render() + { + return view('livewire.sticker-print-data'); + } +} diff --git a/resources/views/livewire/sticker-print-data.blade.php b/resources/views/livewire/sticker-print-data.blade.php new file mode 100644 index 0000000..703be25 --- /dev/null +++ b/resources/views/livewire/sticker-print-data.blade.php @@ -0,0 +1,79 @@ + +{{--
+ + + + + + + + + + + @forelse($records as $index => $record) + + + + + + + @empty + + + + @endforelse + +
NoReference NoSerial NumberCreated By
{{ $index + 1 }}{{ $refNumber }}{{ $record['serial_number'] }}{{ $record->created_by }}
No serial numbers found.
+
--}} + +
+

Sticker Printing Table

+ + + + + + +