namespace App\Livewire;
use Livewire\Component;
use App\Models\PanImport;
class PanImportProgress extends Component
{
public $record;
public $jobStatus;
public $panImport;
public function mount($record): void
{
$this->record = $record;
$this->jobStatus = 0;
$this->checkJobStatus();
}
public function checkJobStatus(): void
{
$this->panImport = PanImport::findOrFail($this->record);
$this->jobStatus = $this->panImport->status;
}
public function render()
{
return view('livewire.pan-import-progress', [
'jobStatus' => $this->jobStatus,
]);
}
}
namespace App\Livewire;
use Livewire\Component;
use App\Models\PanImport;
class PanImportProgress extends Component
{
public $record;
public $jobStatus;
public $panImport;
public function mount($record): void
{
$this->record = $record;
$this->jobStatus = 0;
$this->checkJobStatus();
}
public function checkJobStatus(): void
{
$this->panImport = PanImport::findOrFail($this->record);
$this->jobStatus = $this->panImport->status;
}
public function render()
{
return view('livewire.pan-import-progress', [
'jobStatus' => $this->jobStatus,
]);
}
}