Added sticker printing livewire page for table
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / review (pull_request) Failing after 23s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Laravel Pint / pint (pull_request) Failing after 2m19s
Laravel Larastan / larastan (pull_request) Failing after 2m24s

This commit is contained in:
dhanabalan
2025-12-01 14:45:17 +05:30
parent 624e18e18d
commit 10071413a1
2 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
namespace App\Livewire;
use Livewire\Component;
use App\Models\StickerPrinting;
class StickerPrintData extends Component
{
public $plantId;
public $refNumber;
public $serialNumber;
public bool $materialInvoice = false;
public $records = [];
protected $listeners = [
'refreshEmptySticker' => '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');
}
}