diff --git a/app/Tables/Extensions/IconColumn.php b/app/Tables/Extensions/IconColumn.php index 9435459..2e8b790 100644 --- a/app/Tables/Extensions/IconColumn.php +++ b/app/Tables/Extensions/IconColumn.php @@ -4,10 +4,7 @@ namespace App\Tables\Extensions; use Closure; use Mmt\GenericTable\Attributes\MappedRoute; -use Mmt\GenericTable\Components\Column; -use Mmt\GenericTable\Enums\ColumnSettingFlags; use Mmt\GenericTable\Interfaces\IColumn; -use Mmt\GenericTable\Interfaces\IColumnFormatter; use Mmt\GenericTable\Interfaces\IColumnRenderer; use Str; @@ -15,8 +12,6 @@ class IconColumn implements IColumn, IColumnRenderer { public int $settings = 0; - public string $bindedRoute = ''; - public ?MappedRoute $mappedRoute = null; public ?string $databaseColumnName = 'status'; @@ -33,7 +28,9 @@ class IconColumn implements IColumn, IColumnRenderer public function renderCell(\Illuminate\Database\Eloquent\Model $rowModel): string { - $icon = $this->setIconCallback->call($this, $rowModel); + $icon = 'bi bi-arrow-up-right-circle-fill'; + if(isset($this->setIconCallback)) + $icon = $this->setIconCallback->call($this, $rowModel); return <<