Refactor form schema in StickerMasterResource for improved clarity and organization
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\Filament\Exports\StickerMasterExporter;
|
||||
use App\Filament\Imports\ShiftImporter;
|
||||
//use App\Filament\Imports\ShiftImporter;
|
||||
use App\Filament\Imports\StickerMasterImporter;
|
||||
use App\Filament\Resources\StickerMasterResource\Pages;
|
||||
use App\Filament\Resources\StickerMasterResource\RelationManagers;
|
||||
//use App\Filament\Resources\StickerMasterResource\RelationManagers;
|
||||
use App\Models\StickerMaster;
|
||||
use Closure;
|
||||
//use Closure;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
@@ -99,7 +99,6 @@ class StickerMasterResource extends Resource
|
||||
// ->disabled(fn (Get $get) => !empty($get('id')))
|
||||
->live(debounce: 500) // Enable live updates
|
||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||
|
||||
$plantId = $get('plant_id');
|
||||
$itemId = $get('item_id');
|
||||
|
||||
@@ -176,24 +175,31 @@ class StickerMasterResource extends Resource
|
||||
->readOnly(true),
|
||||
|
||||
Forms\Components\TextInput::make('part_validation1')
|
||||
->label('Part Validation 1')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('part_validation2')
|
||||
->label('Part Validation 2')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('part_validation3')
|
||||
->label('Part Validation 3')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('part_validation4')
|
||||
->label('Part Validation 4')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('part_validation5')
|
||||
->label('Part Validation 5 (Capacitor QR)')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('laser_part_validation1')
|
||||
->label('Laser Part Validation 1')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('laser_part_validation2')
|
||||
->label('Laser Part Validation 1')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('panel_box_code')
|
||||
@@ -210,7 +216,6 @@ class StickerMasterResource extends Resource
|
||||
->integer()
|
||||
->nullable(),
|
||||
|
||||
|
||||
Forms\Components\Select::make('material_type')
|
||||
->label('Material Type')
|
||||
->options([
|
||||
@@ -425,7 +430,6 @@ class StickerMasterResource extends Resource
|
||||
Forms\Components\TextInput::make('id')
|
||||
->hidden()
|
||||
->readOnly(),
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user