From dc27b8e45da95ce095f274d0a2c036b3de152103 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 23 Sep 2026 15:19:25 +0530 Subject: [PATCH] Rename mrp column to zmm_mrp migration, model, resource, importer and exporter pages --- .../Exports/ItemCharacteristicExporter.php | 7 +- .../Imports/ItemCharacteristicImporter.php | 11 +- .../Resources/ItemCharacteristicResource.php | 1855 +++++++++-------- app/Models/ItemCharacteristic.php | 2 +- ...umn_name_in_item_characteristics_table.php | 28 + 5 files changed, 969 insertions(+), 934 deletions(-) create mode 100644 database/migrations/2026_09_23_144608_rename_zmm_mrp_column_name_in_item_characteristics_table.php diff --git a/app/Filament/Exports/ItemCharacteristicExporter.php b/app/Filament/Exports/ItemCharacteristicExporter.php index 4204c48..a9dacdb 100644 --- a/app/Filament/Exports/ItemCharacteristicExporter.php +++ b/app/Filament/Exports/ItemCharacteristicExporter.php @@ -14,6 +14,7 @@ class ItemCharacteristicExporter extends Exporter public static function getColumns(): array { static $rowNumber = 0; + return [ ExportColumn::make('no') ->label('NO') @@ -289,6 +290,8 @@ class ItemCharacteristicExporter extends Exporter ->label('ZMM OPERATING TEMPERATURE'), ExportColumn::make('zmm_axial_force') ->label('ZMM AXIAL FORCE'), + ExportColumn::make('zmm_mrp') + ->label('ZMM MRP'), ExportColumn::make('zmm_1') ->label('ZMM 1') ->enabledByDefault(false), @@ -350,10 +353,10 @@ class ItemCharacteristicExporter extends Exporter public static function getCompletedNotificationBody(Export $export): string { - $body = 'Your item characteristic export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; + $body = 'Your item characteristic export has completed and '.number_format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.'; if ($failedRowsCount = $export->getFailedRowsCount()) { - $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; + $body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.'; } return $body; diff --git a/app/Filament/Imports/ItemCharacteristicImporter.php b/app/Filament/Imports/ItemCharacteristicImporter.php index 9f254d1..8b4b43c 100644 --- a/app/Filament/Imports/ItemCharacteristicImporter.php +++ b/app/Filament/Imports/ItemCharacteristicImporter.php @@ -556,7 +556,10 @@ class ItemCharacteristicImporter extends Importer ->label('ZMM AXIAL FORCE') ->exampleHeader('ZMM AXIAL FORCE') ->example(''), - ImportColumn::make('mrp'), + ImportColumn::make('zmm_mrp') + ->label('ZMM MRP') + ->exampleHeader('ZMM MRP') + ->example(''), ImportColumn::make('zmm_1'), ImportColumn::make('zmm_2'), ImportColumn::make('zmm_3'), @@ -584,15 +587,15 @@ class ItemCharacteristicImporter extends Importer // 'email' => $this->data['email'], // ]); - return new ItemCharacteristic(); + return new ItemCharacteristic; } public static function getCompletedNotificationBody(Import $import): string { - $body = 'Your item characteristic import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.'; + $body = 'Your item characteristic import has completed and '.number_format($import->successful_rows).' '.str('row')->plural($import->successful_rows).' imported.'; if ($failedRowsCount = $import->getFailedRowsCount()) { - $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.'; + $body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to import.'; } return $body; diff --git a/app/Filament/Resources/ItemCharacteristicResource.php b/app/Filament/Resources/ItemCharacteristicResource.php index 8a45521..b817b10 100644 --- a/app/Filament/Resources/ItemCharacteristicResource.php +++ b/app/Filament/Resources/ItemCharacteristicResource.php @@ -5,21 +5,20 @@ namespace App\Filament\Resources; use App\Filament\Exports\ItemCharacteristicExporter; use App\Filament\Imports\ItemCharacteristicImporter; use App\Filament\Resources\ItemCharacteristicResource\Pages; -use App\Filament\Resources\ItemCharacteristicResource\RelationManagers; use App\Models\Item; use App\Models\ItemCharacteristic; use App\Models\Plant; use Filament\Facades\Filament; use Filament\Forms; +use Filament\Forms\Components\Section; use Filament\Forms\Form; use Filament\Resources\Resource; use Filament\Tables; +use Filament\Tables\Actions\ExportAction; +use Filament\Tables\Actions\ImportAction; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; -use Filament\Tables\Actions\ExportAction; -use Filament\Tables\Actions\ImportAction; -use Filament\Forms\Components\Section; class ItemCharacteristicResource extends Resource { @@ -35,925 +34,927 @@ class ItemCharacteristicResource extends Resource ->schema([ Section::make('') ->schema([ - Forms\Components\Select::make('plant_id') - ->label('Plant') - ->reactive() - ->relationship('plant', 'name') - ->options(function (callable $get) { - $userHas = Filament::auth()->user()->plant_id; - return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray(); - }) - ->required(), - Forms\Components\Select::make('item_id') - ->label('Item Code') - //->relationship('item', 'id') - ->reactive() - ->searchable() - ->options(function (callable $get) { - $plantId = $get('plant_id'); - if (empty($plantId)) { - return []; - } - return Item::where('plant_id', $plantId)->pluck('code', 'id'); - }) - ->required(), - Forms\Components\TextInput::make('class') - ->label('CLASS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zz1_cn_bill_ord') - ->label('ZZ1 CN BILL ORD') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_amps') - ->label('ZMM AMPS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_brand') - ->label('ZMM BRAND') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_degreeofprotection') - ->label('ZMM DEGREE OF PROTECTION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_delivery') - ->label('ZMM DELIVERY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_dir_rot') - ->label('ZMM DIRECTION ROTATION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_discharge') - ->label('ZMM DISCHARGE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_discharge_max') - ->label('ZMM DISCHARGE MAX') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_discharge_min') - ->label('ZMM DISCHARGE MIN') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_duty') - ->label('ZMM DUTY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_eff_motor') - ->label('ZMM EFF MOTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_eff_pump') - ->label('ZMM EFF PUMP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_frequency') - ->label('ZMM FREQUENCY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_head') - ->label('ZMM HEAD') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_heading') - ->label('ZMM HEADING') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_head_max') - ->label('ZMM HEAD MAX') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_head_minimum') - ->label('ZMM HEAD MINIMUM') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_idx_eff_mtr') - ->label('ZMM IDX EFF MTR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_idx_eff_pump') - ->label('ZMM IDX EFF PUMP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_kvacode') - ->label('ZMM KVACODE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_maxambtemp') - ->label('ZMM MAX AMB TEMP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_mincoolingflow') - ->label('ZMM MIN COOLING FLOW') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_motorseries') - ->label('ZMM MOTOR SERIES') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_motor_model') - ->label('ZMM MOTOR MODEL') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_outlet') - ->label('ZMM OUTLET') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_phase') - ->label('ZMM PHASE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pressure') - ->label('ZMM PRESSURE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pumpflowtype') - ->label('ZMM PUMP FLOW TYPE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pumpseries') - ->label('ZMM PUMP SERIES') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pump_model') - ->label('ZMM PUMP MODEL') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_ratedpower') - ->label('ZMM RATED POWER') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_region') - ->label('ZMM REGION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_servicefactor') - ->label('ZMM SERVICE FACTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_servicefactormaximumamps') - ->label('ZMM SERVICE FACTOR MAXIMUM AMPS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_speed') - ->label('ZMM SPEED') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_suction') - ->label('ZMM SUCTION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_suctionxdelivery') - ->label('ZMM SUCTION X DELIVERY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_supplysource') - ->label('ZMM SUPPLY SOURCE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_temperature') - ->label('ZMM TEMPERATURE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_thrustload') - ->label('ZMM THRUST LOAD') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_volts') - ->label('ZMM VOLTS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_wire') - ->label('ZMM WIRE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_package') - ->label('ZMM PACKAGE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pvarrayrating') - ->label('ZMM PV ARRAY RATING') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isi') - ->label('ZMM ISI') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isimotor') - ->label('ZMM ISI MOTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isipump') - ->label('ZMM ISI PUMP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isipumpset') - ->label('ZMM ISI PUMP SET') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pumpset_model') - ->label('ZMM PUMP SET MODEL') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_stages') - ->label('ZMM STAGES') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_headrange') - ->label('ZMM HEAD RANGE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_overall_efficiency') - ->label('ZMM OVERALL EFFICIENCY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_connection') - ->label('ZMM CONNECTION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_min_bore_size') - ->label('ZMM MIN BORE SIZE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isireference') - ->label('ZMM ISI REFERENCE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_category') - ->label('ZMM CATEGORY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_submergence') - ->label('ZMM SUBMERGENCE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_capacitorstart') - ->label('ZMM CAPACITOR START') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_capacitorrun') - ->label('ZMM CAPACITOR RUN') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_inch') - ->label('ZMM INCH') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_motor_type') - ->label('ZMM MOTOR TYPE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_dismantle_direction') - ->label('ZMM DISMANTLE DIRECTION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_eff_ovrall') - ->label('ZMM OVERALL EFFICIENCY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_bodymoc') - ->label('ZMM BODY MOC') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_rotormoc') - ->label('ZMM ROTOR MOC') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_dlwl') - ->label('ZMM DLWL') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_inputpower') - ->label('ZMM INPUT POWER') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_imp_od') - ->label('ZMM IMP OD') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_ambtemp') - ->label('ZMM AMBIENT TEMPERATURE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_de') - ->label('ZMM DE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_dischargerange') - ->label('ZMM DISCHARGE RANGE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_efficiency_class') - ->label('ZMM EFFICIENCY CLASS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_framesize') - ->label('ZMM FRAME SIZE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_impellerdiameter') - ->label('ZMM IMPELLER DIAMETER') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_insulationclass') - ->label('ZMM INSULATION CLASS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_maxflow') - ->label('ZMM MAX FLOW') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_minhead') - ->label('ZMM MIN HEAD') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_mtrlofconst') - ->label('ZMM MOTOR LOAD CONSTANT') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_nde') - ->label('ZMM NDE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_powerfactor') - ->label('ZMM POWER FACTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_tagno') - ->label('ZMM TAGNO') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_year') - ->label('ZMM YEAR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_laser_name') - ->label('ZMM LASER NAME') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_beenote') - ->label('ZMM BEE NOTE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_beenumber') - ->label('ZMM BEE NUMBER') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_beestar') - ->label('ZMM BEE STAR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_logo_ce') - ->label('ZMM LOGO CE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_codeclass') - ->label('ZMM CODE CLASS') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_colour') - ->label('ZMM COLOUR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_logo_cp') - ->label('ZMM LOGO CP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_grade') - ->label('ZMM GRADE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_grwt_pset') - ->label('ZMM GRWT PSET') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_grwt_cable') - ->label('ZMM GRWT CABLE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_grwt_motor') - ->label('ZMM GRWT MOTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_grwt_pf') - ->label('ZMM GRWT PF') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_grwt_pump') - ->label('ZMM GRWT PUMP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isivalve') - ->label('ZMM ISI VALVE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_isi_wc') - ->label('ZMM ISI WC') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_labelperiod') - ->label('ZMM LABEL PERIOD') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_length') - ->label('ZMM LENGTH') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_license_cml_no') - ->label('ZMM LICENSE CML NO') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_mfgmonyr') - ->label('ZMM MFG MON YR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_modelyear') - ->label('ZMM MODEL YEAR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_motoridentification') - ->label('ZMM MOTOR IDENTIFICATION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_newt_pset') - ->label('ZMM NEWT PSET') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_newt_cable') - ->label('ZMM NEWT CABLE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_newt_motor') - ->label('ZMM NEWT MOTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_newt_pf') - ->label('ZMM NEWT PF') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_newt_pump') - ->label('ZMM NEWT PUMP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_logo_nsf') - ->label('ZMM LOGO NSF') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_logo_eac') - ->label('ZMM LOGO EAC') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_packtype') - ->label('ZMM PACK TYPE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_panel') - ->label('ZMM PANEL') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_performance_factor') - ->label('ZMM PERFORMANCE FACTOR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_pumpidentification') - ->label('ZMM PUMP IDENTIFICATION') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_psettype') - ->label('ZMM PSET TYPE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_size') - ->label('ZMM SIZE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_eff_ttl') - ->label('ZMM EFF TTL') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_type') - ->label('ZMM TYPE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_usp') - ->label('ZMM USP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_operating_range') - ->label('ZMM OPERATING RANGE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_intake_air') - ->label('ZMM INTAKE AIR') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_oxygen_transfer_rate') - ->label('ZMM OXYGEN TRANSFER RATE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_air_inlet_pipesize') - ->label('ZMM AIR INLET PIPESIZE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_sump_depth') - ->label('ZMM SUMP DEPTH') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_poles') - ->label('ZMM POLES') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_motor_heading') - ->label('ZMM MOTOR HEADING') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_motor_speed') - ->label('ZMM MOTOR SPEED') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zqmm_qty') - ->label('ZQMM QTY') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_operating_temperature') - ->label('ZMM OPERATING TEMPERATURE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_axial_force') - ->label('ZMM AXIAL FORCE') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('mrp') - ->label('MRP') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_1') - ->label('ZMM 1') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_2') - ->label('ZMM 2') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_3') - ->label('ZMM 3') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_4') - ->label('ZMM 4') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_5') - ->label('ZMM 5') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_6') - ->label('ZMM 6') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_7') - ->label('ZMM 7') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_8') - ->label('ZMM 8') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_9') - ->label('ZMM 9') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_10') - ->label('ZMM 10') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_11') - ->label('ZMM 11') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_12') - ->label('ZMM 12') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_13') - ->label('ZMM 13') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_14') - ->label('ZMM 14') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\TextInput::make('zmm_15') - ->label('ZMM 15') - ->reactive() - ->afterStateUpdated(function (callable $set) { - $set('updated_by', Filament::auth()->user()?->name); - }), - Forms\Components\Hidden::make('created_by') - ->label('Created By') - ->default(Filament::auth()->user()?->name), - Forms\Components\Hidden::make('updated_by') - ->label('Updated By') - ->default(Filament::auth()->user()?->name), - ]) - ->columns(3), - ]); + Forms\Components\Select::make('plant_id') + ->label('Plant') + ->reactive() + ->relationship('plant', 'name') + ->options(function (callable $get) { + $userHas = Filament::auth()->user()->plant_id; + + return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray(); + }) + ->required(), + Forms\Components\Select::make('item_id') + ->label('Item Code') + // ->relationship('item', 'id') + ->reactive() + ->searchable() + ->options(function (callable $get) { + $plantId = $get('plant_id'); + if (empty($plantId)) { + return []; + } + + return Item::where('plant_id', $plantId)->pluck('code', 'id'); + }) + ->required(), + Forms\Components\TextInput::make('class') + ->label('CLASS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zz1_cn_bill_ord') + ->label('ZZ1 CN BILL ORD') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_amps') + ->label('ZMM AMPS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_brand') + ->label('ZMM BRAND') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_degreeofprotection') + ->label('ZMM DEGREE OF PROTECTION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_delivery') + ->label('ZMM DELIVERY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_dir_rot') + ->label('ZMM DIRECTION ROTATION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_discharge') + ->label('ZMM DISCHARGE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_discharge_max') + ->label('ZMM DISCHARGE MAX') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_discharge_min') + ->label('ZMM DISCHARGE MIN') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_duty') + ->label('ZMM DUTY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_eff_motor') + ->label('ZMM EFF MOTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_eff_pump') + ->label('ZMM EFF PUMP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_frequency') + ->label('ZMM FREQUENCY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_head') + ->label('ZMM HEAD') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_heading') + ->label('ZMM HEADING') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_head_max') + ->label('ZMM HEAD MAX') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_head_minimum') + ->label('ZMM HEAD MINIMUM') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_idx_eff_mtr') + ->label('ZMM IDX EFF MTR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_idx_eff_pump') + ->label('ZMM IDX EFF PUMP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_kvacode') + ->label('ZMM KVACODE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_maxambtemp') + ->label('ZMM MAX AMB TEMP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_mincoolingflow') + ->label('ZMM MIN COOLING FLOW') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_motorseries') + ->label('ZMM MOTOR SERIES') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_motor_model') + ->label('ZMM MOTOR MODEL') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_outlet') + ->label('ZMM OUTLET') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_phase') + ->label('ZMM PHASE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pressure') + ->label('ZMM PRESSURE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pumpflowtype') + ->label('ZMM PUMP FLOW TYPE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pumpseries') + ->label('ZMM PUMP SERIES') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pump_model') + ->label('ZMM PUMP MODEL') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_ratedpower') + ->label('ZMM RATED POWER') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_region') + ->label('ZMM REGION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_servicefactor') + ->label('ZMM SERVICE FACTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_servicefactormaximumamps') + ->label('ZMM SERVICE FACTOR MAXIMUM AMPS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_speed') + ->label('ZMM SPEED') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_suction') + ->label('ZMM SUCTION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_suctionxdelivery') + ->label('ZMM SUCTION X DELIVERY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_supplysource') + ->label('ZMM SUPPLY SOURCE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_temperature') + ->label('ZMM TEMPERATURE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_thrustload') + ->label('ZMM THRUST LOAD') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_volts') + ->label('ZMM VOLTS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_wire') + ->label('ZMM WIRE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_package') + ->label('ZMM PACKAGE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pvarrayrating') + ->label('ZMM PV ARRAY RATING') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isi') + ->label('ZMM ISI') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isimotor') + ->label('ZMM ISI MOTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isipump') + ->label('ZMM ISI PUMP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isipumpset') + ->label('ZMM ISI PUMP SET') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pumpset_model') + ->label('ZMM PUMP SET MODEL') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_stages') + ->label('ZMM STAGES') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_headrange') + ->label('ZMM HEAD RANGE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_overall_efficiency') + ->label('ZMM OVERALL EFFICIENCY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_connection') + ->label('ZMM CONNECTION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_min_bore_size') + ->label('ZMM MIN BORE SIZE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isireference') + ->label('ZMM ISI REFERENCE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_category') + ->label('ZMM CATEGORY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_submergence') + ->label('ZMM SUBMERGENCE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_capacitorstart') + ->label('ZMM CAPACITOR START') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_capacitorrun') + ->label('ZMM CAPACITOR RUN') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_inch') + ->label('ZMM INCH') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_motor_type') + ->label('ZMM MOTOR TYPE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_dismantle_direction') + ->label('ZMM DISMANTLE DIRECTION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_eff_ovrall') + ->label('ZMM OVERALL EFFICIENCY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_bodymoc') + ->label('ZMM BODY MOC') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_rotormoc') + ->label('ZMM ROTOR MOC') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_dlwl') + ->label('ZMM DLWL') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_inputpower') + ->label('ZMM INPUT POWER') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_imp_od') + ->label('ZMM IMP OD') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_ambtemp') + ->label('ZMM AMBIENT TEMPERATURE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_de') + ->label('ZMM DE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_dischargerange') + ->label('ZMM DISCHARGE RANGE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_efficiency_class') + ->label('ZMM EFFICIENCY CLASS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_framesize') + ->label('ZMM FRAME SIZE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_impellerdiameter') + ->label('ZMM IMPELLER DIAMETER') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_insulationclass') + ->label('ZMM INSULATION CLASS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_maxflow') + ->label('ZMM MAX FLOW') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_minhead') + ->label('ZMM MIN HEAD') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_mtrlofconst') + ->label('ZMM MOTOR LOAD CONSTANT') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_nde') + ->label('ZMM NDE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_powerfactor') + ->label('ZMM POWER FACTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_tagno') + ->label('ZMM TAGNO') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_year') + ->label('ZMM YEAR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_laser_name') + ->label('ZMM LASER NAME') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_beenote') + ->label('ZMM BEE NOTE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_beenumber') + ->label('ZMM BEE NUMBER') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_beestar') + ->label('ZMM BEE STAR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_logo_ce') + ->label('ZMM LOGO CE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_codeclass') + ->label('ZMM CODE CLASS') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_colour') + ->label('ZMM COLOUR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_logo_cp') + ->label('ZMM LOGO CP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_grade') + ->label('ZMM GRADE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_grwt_pset') + ->label('ZMM GRWT PSET') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_grwt_cable') + ->label('ZMM GRWT CABLE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_grwt_motor') + ->label('ZMM GRWT MOTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_grwt_pf') + ->label('ZMM GRWT PF') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_grwt_pump') + ->label('ZMM GRWT PUMP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isivalve') + ->label('ZMM ISI VALVE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_isi_wc') + ->label('ZMM ISI WC') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_labelperiod') + ->label('ZMM LABEL PERIOD') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_length') + ->label('ZMM LENGTH') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_license_cml_no') + ->label('ZMM LICENSE CML NO') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_mfgmonyr') + ->label('ZMM MFG MON YR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_modelyear') + ->label('ZMM MODEL YEAR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_motoridentification') + ->label('ZMM MOTOR IDENTIFICATION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_newt_pset') + ->label('ZMM NEWT PSET') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_newt_cable') + ->label('ZMM NEWT CABLE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_newt_motor') + ->label('ZMM NEWT MOTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_newt_pf') + ->label('ZMM NEWT PF') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_newt_pump') + ->label('ZMM NEWT PUMP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_logo_nsf') + ->label('ZMM LOGO NSF') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_logo_eac') + ->label('ZMM LOGO EAC') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_packtype') + ->label('ZMM PACK TYPE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_panel') + ->label('ZMM PANEL') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_performance_factor') + ->label('ZMM PERFORMANCE FACTOR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_pumpidentification') + ->label('ZMM PUMP IDENTIFICATION') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_psettype') + ->label('ZMM PSET TYPE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_size') + ->label('ZMM SIZE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_eff_ttl') + ->label('ZMM EFF TTL') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_type') + ->label('ZMM TYPE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_usp') + ->label('ZMM USP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_operating_range') + ->label('ZMM OPERATING RANGE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_intake_air') + ->label('ZMM INTAKE AIR') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_oxygen_transfer_rate') + ->label('ZMM OXYGEN TRANSFER RATE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_air_inlet_pipesize') + ->label('ZMM AIR INLET PIPESIZE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_sump_depth') + ->label('ZMM SUMP DEPTH') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_poles') + ->label('ZMM POLES') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_motor_heading') + ->label('ZMM MOTOR HEADING') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_motor_speed') + ->label('ZMM MOTOR SPEED') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zqmm_qty') + ->label('ZQMM QTY') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_operating_temperature') + ->label('ZMM OPERATING TEMPERATURE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_axial_force') + ->label('ZMM AXIAL FORCE') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_mrp') + ->label('ZMM MRP') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_1') + ->label('ZMM 1') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_2') + ->label('ZMM 2') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_3') + ->label('ZMM 3') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_4') + ->label('ZMM 4') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_5') + ->label('ZMM 5') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_6') + ->label('ZMM 6') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_7') + ->label('ZMM 7') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_8') + ->label('ZMM 8') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_9') + ->label('ZMM 9') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_10') + ->label('ZMM 10') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_11') + ->label('ZMM 11') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_12') + ->label('ZMM 12') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_13') + ->label('ZMM 13') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_14') + ->label('ZMM 14') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\TextInput::make('zmm_15') + ->label('ZMM 15') + ->reactive() + ->afterStateUpdated(function (callable $set) { + $set('updated_by', Filament::auth()->user()?->name); + }), + Forms\Components\Hidden::make('created_by') + ->label('Created By') + ->default(Filament::auth()->user()?->name), + Forms\Components\Hidden::make('updated_by') + ->label('Updated By') + ->default(Filament::auth()->user()?->name), + ]) + ->columns(3), + ]); } public static function table(Table $table): Table @@ -1509,8 +1510,8 @@ class ItemCharacteristicResource extends Resource ->label('ZMM AXIAL FORCE') ->alignCenter() ->sortable(), - Tables\Columns\TextColumn::make('mrp') - ->label('MRP') + Tables\Columns\TextColumn::make('zmm_mrp') + ->label('ZMM MRP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_1') @@ -1614,14 +1615,14 @@ class ItemCharacteristicResource extends Resource ->label('Import Item Characteristics') ->color('warning') ->importer(ItemCharacteristicImporter::class) - ->visible(function() { + ->visible(function () { return Filament::auth()->user()->can('view import item characteristics'); }), ExportAction::make() ->label('Export Item Characteristics') ->color('warning') ->exporter(ItemCharacteristicExporter::class) - ->visible(function() { + ->visible(function () { return Filament::auth()->user()->can('view export item characteristics'); }), ]); diff --git a/app/Models/ItemCharacteristic.php b/app/Models/ItemCharacteristic.php index e15df77..08a0c42 100644 --- a/app/Models/ItemCharacteristic.php +++ b/app/Models/ItemCharacteristic.php @@ -145,7 +145,7 @@ class ItemCharacteristic extends Model 'zmm_logo_eac', 'zmm_operating_temperature', 'zmm_axial_force', - 'mrp', + 'zmm_mrp', 'zmm_1', 'zmm_2', 'zmm_3', diff --git a/database/migrations/2026_09_23_144608_rename_zmm_mrp_column_name_in_item_characteristics_table.php b/database/migrations/2026_09_23_144608_rename_zmm_mrp_column_name_in_item_characteristics_table.php new file mode 100644 index 0000000..46ecfc8 --- /dev/null +++ b/database/migrations/2026_09_23_144608_rename_zmm_mrp_column_name_in_item_characteristics_table.php @@ -0,0 +1,28 @@ +renameColumn('mrp', 'zmm_mrp'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // Schema::table('item_characteristics', function (Blueprint $table) { + // // + // }); + } +};