Added characteritics type in resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Successful in 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 21s
Laravel Larastan / larastan (pull_request) Failing after 3m8s
Laravel Pint / pint (pull_request) Failing after 2m54s

This commit is contained in:
dhanabalan
2025-12-23 11:11:20 +05:30
parent 2a8e589de3
commit 37843fe427

View File

@@ -6,6 +6,7 @@ use App\Filament\Exports\StickerDetailExporter;
use App\Filament\Imports\StickerDetailImporter;
use App\Filament\Resources\StickerDetailResource\Pages;
use App\Filament\Resources\StickerDetailResource\RelationManagers;
use App\Models\ItemCharacteristic;
use App\Models\StickerDetail;
use App\Models\StickerStructureDetail;
use Filament\Tables\Actions\ExportAction;
@@ -18,6 +19,7 @@ use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Support\Facades\Schema;
class StickerDetailResource extends Resource
{
@@ -54,6 +56,28 @@ class StickerDetailResource extends Resource
'Static' => 'Static',
'Dynamic' => 'Dynamic',
]),
Forms\Components\Select::make('characteristics_type')
->label('Characteristics')
->reactive()
->options(
collect(Schema::getColumnListing('item_characteristics'))
->reject(fn ($column) => in_array($column, [
'id',
'plant_id',
'item_id',
'class',
'zz1_cn_bill_ord',
'created_at',
'updated_at',
'deleted_at',
'created_by',
'updated_by',
]))
->mapWithKeys(fn ($column) => [
$column => ucfirst(str_replace('_', ' ', $column))
])
->toArray()
),
Forms\Components\TextInput::make('string_value')
->label('String Value'),
Forms\Components\TextInput::make('string_font')
@@ -146,6 +170,9 @@ class StickerDetailResource extends Resource
Tables\Columns\TextColumn::make('element_type')
->label('Element Type')
->alignCenter(),
Tables\Columns\TextColumn::make('characteristics_type')
->label('Characteristics Type')
->alignCenter(),
Tables\Columns\TextColumn::make('string_value')
->label('String Value')
->alignCenter(),