Added curve radius in sticker details resource pages #54

Merged
jothi merged 1 commits from ranjith-dev into master 2025-12-23 09:53:19 +00:00

View File

@@ -20,6 +20,7 @@ use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope; use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Closure;
class StickerDetailResource extends Resource class StickerDetailResource extends Resource
{ {
@@ -94,12 +95,18 @@ class StickerDetailResource extends Resource
->label('String Y Value'), ->label('String Y Value'),
Forms\Components\Select::make('shape_name') Forms\Components\Select::make('shape_name')
->label('Shape Name') ->label('Shape Name')
->reactive()
->options([ ->options([
'Line' => 'Line', 'Line' => 'Line',
'Rectangle' => 'Rectangle', 'Rectangle' => 'Rectangle',
'CurvedRectangle' => 'CurvedRectangle',
]), ]),
Forms\Components\TextInput::make('shape_pen_size') Forms\Components\TextInput::make('shape_pen_size')
->label('Shape Pen Size'), ->label('Shape Pen Size'),
Forms\Components\TextInput::make('curve_radius')
->label('Curve Radius')
->reactive()
->visible(fn ($get) => $get('shape_name') == 'CurvedRectangle'),
Forms\Components\TextInput::make('shape_x1_value') Forms\Components\TextInput::make('shape_x1_value')
->label('Shape X1 Value'), ->label('Shape X1 Value'),
Forms\Components\TextInput::make('shape_y1_value') Forms\Components\TextInput::make('shape_y1_value')
@@ -200,6 +207,8 @@ class StickerDetailResource extends Resource
Tables\Columns\TextColumn::make('shape_pen_size') Tables\Columns\TextColumn::make('shape_pen_size')
->label('Shape Pen Size') ->label('Shape Pen Size')
->alignCenter(), ->alignCenter(),
Tables\Columns\TextColumn::make('curve_radius')
->label('Curve Radius'),
Tables\Columns\TextColumn::make('shape_x1_value') Tables\Columns\TextColumn::make('shape_x1_value')
->label('Shape X1 Value') ->label('Shape X1 Value')
->alignCenter(), ->alignCenter(),