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 @@ + +{{--
| No | +Reference No | +Serial Number | +Created By | +
|---|---|---|---|
| {{ $index + 1 }} | +{{ $refNumber }} | +{{ $record['serial_number'] }} | +{{ $record->created_by }} | +
| No serial numbers found. | +|||