25 lines
707 B
PHP
25 lines
707 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\InventorySyncRunResource\Pages;
|
|
|
|
use App\Filament\Resources\InventorySyncRunResource;
|
|
use App\Models\InventorySyncRun;
|
|
use App\Support\OperationRunLinks;
|
|
use Filament\Resources\Pages\ViewRecord;
|
|
|
|
class ViewInventorySyncRun extends ViewRecord
|
|
{
|
|
protected static string $resource = InventorySyncRunResource::class;
|
|
|
|
public function mount(int|string $record): void
|
|
{
|
|
parent::mount($record);
|
|
|
|
$legacyRun = $this->getRecord();
|
|
|
|
if ($legacyRun instanceof InventorySyncRun && is_numeric($legacyRun->operation_run_id)) {
|
|
$this->redirect(OperationRunLinks::tenantlessView((int) $legacyRun->operation_run_id));
|
|
}
|
|
}
|
|
}
|