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), ]); } public static function table(Table $table): Table { return $table ->columns([ // Tables\Columns\TextColumn::make('id') // ->label('ID') // ->numeric() // ->sortable(), Tables\Columns\TextColumn::make('No.') ->label('No.') ->getStateUsing(function ($record, $livewire, $column, $rowLoop) { $paginator = $livewire->getTableRecords(); $perPage = method_exists($paginator, 'perPage') ? $paginator->perPage() : 10; $currentPage = method_exists($paginator, 'currentPage') ? $paginator->currentPage() : 1; return ($currentPage - 1) * $perPage + $rowLoop->iteration; }), Tables\Columns\TextColumn::make('plant.name') ->label('PLANT') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('item.code') ->label('ITEM CODE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('class') ->label('CLASS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zz1_cn_bill_ord') ->label('ZZ1 CN BILL ORD') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_amps') ->label('ZMM AMPS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_brand') ->label('ZMM BRAND') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_degreeofprotection') ->label('ZMM DEGREE OF PROTECTION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_delivery') ->label('ZMM DELIVERY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_dir_rot') ->label('ZMM DIRECTION ROTATION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_discharge') ->label('ZMM DISCHARGE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_discharge_max') ->label('ZMM DISCHARGE MAX') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_discharge_min') ->label('ZMM DISCHARGE MIN') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_duty') ->label('ZMM DUTY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_eff_motor') ->label('ZMM EFF MOTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_eff_pump') ->label('ZMM EFF PUMP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_frequency') ->label('ZMM FREQUENCY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_head') ->label('ZMM HEAD') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_heading') ->label('ZMM HEADING') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_head_max') ->label('ZMM HEAD MAX') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_head_minimum') ->label('ZMM HEAD MINIMUM') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_idx_eff_mtr') ->label('ZMM IDX EFF MTR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_idx_eff_pump') ->label('ZMM IDX EFF PUMP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_kvacode') ->label('ZMM KVACODE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_maxambtemp') ->label('ZMM MAX AMB TEMP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_mincoolingflow') ->label('ZMM MIN COOLING FLOW') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_motorseries') ->label('ZMM MOTOR SERIES') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_motor_model') ->label('ZMM MOTOR MODEL') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_outlet') ->label('ZMM OUTLET') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_phase') ->label('ZMM PHASE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pressure') ->label('ZMM PRESSURE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pumpflowtype') ->label('ZMM PUMP FLOW TYPE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pumpseries') ->label('ZMM PUMP SERIES') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pump_model') ->label('ZMM PUMP MODEL') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_ratedpower') ->label('ZMM RATED POWER') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_region') ->label('ZMM REGION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_servicefactor') ->label('ZMM SERVICE FACTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_servicefactormaximumamps') ->label('ZMM SERVICE FACTOR MAXIMUM AMPS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_speed') ->label('ZMM SPEED') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_suction') ->label('ZMM SUCTION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_suctionxdelivery') ->label('ZMM SUCTION X DELIVERY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_supplysource') ->label('ZMM SUPPLY SOURCE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_temperature') ->label('ZMM TEMPERATURE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_thrustload') ->label('ZMM THRUST LOAD') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_volts') ->label('ZMM VOLTS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_wire') ->label('ZMM WIRE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_package') ->label('ZMM PACKAGE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pvarrayrating') ->label('ZMM PV ARRAY RATING') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isi') ->label('ZMM ISI') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isimotor') ->label('ZMM ISI MOTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isipump') ->label('ZMM ISI PUMP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isipumpset') ->label('ZMM ISI PUMP SET') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pumpset_model') ->label('ZMM PUMP SET MODEL') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_stages') ->label('ZMM STAGES') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_headrange') ->label('ZMM HEAD RANGE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_overall_efficiency') ->label('ZMM OVERALL EFFICIENCY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_connection') ->label('ZMM CONNECTION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_min_bore_size') ->label('ZMM MIN BORE SIZE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isireference') ->label('ZMM ISI REFERENCE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_category') ->label('ZMM CATEGORY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_submergence') ->label('ZMM SUBMERGENCE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_capacitorstart') ->label('ZMM CAPACITOR START') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_capacitorrun') ->label('ZMM CAPACITOR RUN') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_inch') ->label('ZMM INCH') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_motor_type') ->label('ZMM MOTOR TYPE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_dismantle_direction') ->label('ZMM DISMANTLE DIRECTION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_eff_ovrall') ->label('ZMM OVERALL EFFICIENCY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_bodymoc') ->label('ZMM BODY MOC') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_rotormoc') ->label('ZMM ROTOR MOC') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_dlwl') ->label('ZMM DLWL') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_inputpower') ->label('ZMM INPUT POWER') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_imp_od') ->label('ZMM IMP OD') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_ambtemp') ->label('ZMM AMBIENT TEMPERATURE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_de') ->label('ZMM DE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_dischargerange') ->label('ZMM DISCHARGE RANGE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_efficiency_class') ->label('ZMM EFFICIENCY CLASS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_framesize') ->label('ZMM FRAME SIZE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_impellerdiameter') ->label('ZMM IMPPELLER DIAMETER') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_insulationclass') ->label('ZMM INSULATION CLASS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_maxflow') ->label('ZMM MAX FLOW') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_minhead') ->label('ZMM MIN HEAD') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_mtrlofconst') ->label('ZMM MOTOR LOAD CONSTANT') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_nde') ->label('ZMM NDE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_powerfactor') ->label('ZMM POWER FACTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_tagno') ->label('ZMM TAGNO') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_year') ->label('ZMM YEAR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_laser_name') ->label('ZMM LASER NAME') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_beenote') ->label('ZMM BEE NOTE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_beenumber') ->label('ZMM BEE NUMBER') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_beestar') ->label('ZMM BEE STAR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_logo_ce') ->label('ZMM LOGO CE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_codeclass') ->label('ZMM CODE CLASS') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_colour') ->label('ZMM COLOUR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_logo_cp') ->label('ZMM LOGO CP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_grade') ->label('ZMM GRADE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_grwt_pset') ->label('ZMM GRWT PSET') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_grwt_cable') ->label('ZMM GRWT CABLE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_grwt_motor') ->label('ZMM GRWT MOTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_grwt_pf') ->label('ZMM GRWT PF') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_grwt_pump') ->label('ZMM GRWT PUMP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isivalve') ->label('ZMM ISI VALVE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_isi_wc') ->label('ZMM ISI WC') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_labelperiod') ->label('ZMM LABEL PERIOD') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_length') ->label('ZMM LENGTH') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_license_cml_no') ->label('ZMM LICENSE CML NO') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_mfgmonyr') ->label('ZMM MFG MON YR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_modelyear') ->label('ZMM MODEL YEAR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_motoridentification') ->label('ZMM MOTOR IDENTIFICATION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_newt_pset') ->label('ZMM NEWT PSET') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_newt_cable') ->label('ZMM NEWT CABLE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_newt_motor') ->label('ZMM NEWT MOTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_newt_pf') ->label('ZMM NEWT PF') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_newt_pump') ->label('ZMM NEWT PUMP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_logo_nsf') ->label('ZMM LOGO NSF') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_logo_eac') ->label('ZMM LOGO EAC') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_packtype') ->label('ZMM PACK TYPE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_panel') ->label('ZMM PANEL') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_performance_factor') ->label('ZMM PERFORMANCE FACTOR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_pumpidentification') ->label('ZMM PUMP IDENTIFICATION') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_psettype') ->label('ZMM PSET TYPE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_size') ->label('ZMM SIZE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_eff_ttl') ->label('ZMM EFF TTL') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_type') ->label('ZMM TYPE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_usp') ->label('ZMM USP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_operating_range') ->label('ZMM OPERATING RANGE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_intake_air') ->label('ZMM INTAKE AIR') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_oxygen_transfer_rate') ->label('ZMM OXYGEN TRANSFER RATE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_air_inlet_pipesize') ->label('ZMM AIR INLET PIPESIZE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_sump_depth') ->label('ZMM SUMP DEPTH') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_poles') ->label('ZMM POLES') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_motor_heading') ->label('ZMM MOTOR HEADING') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_motor_speed') ->label('ZMM MOTOR SPEED') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zqmm_qty') ->label('ZMM QTY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_operating_temperature') ->label('ZMM OPERATING TEMPERATURE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_axial_force') ->label('ZMM AXIAL FORCE') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('mrp') ->label('MRP') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_1') ->label('ZMM 1') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_2') ->label('ZMM 2') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_3') ->label('ZMM 3') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_4') ->label('ZMM 4') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_5') ->label('ZMM 5') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_6') ->label('ZMM 6') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_7') ->label('ZMM 7') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_8') ->label('ZMM 8') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_9') ->label('ZMM 9') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_10') ->label('ZMM 10') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_11') ->label('ZMM 11') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_12') ->label('ZMM 12') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_13') ->label('ZMM 13') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_14') ->label('ZMM 14') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('zmm_15') ->label('ZMM 15') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('created_by') ->label('CREATED BY') ->alignCenter() ->sortable(), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('updated_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('updated_by') ->label('UPDATED BY') ->alignCenter() ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('deleted_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ Tables\Filters\TrashedFilter::make(), ]) ->actions([ Tables\Actions\ViewAction::make(), Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), Tables\Actions\ForceDeleteBulkAction::make(), Tables\Actions\RestoreBulkAction::make(), ]), ]) ->headerActions([ ImportAction::make() ->label('Import Item Characteristics') ->color('warning') ->importer(ItemCharacteristicImporter::class) ->visible(function() { return Filament::auth()->user()->can('view import item characteristics'); }), ExportAction::make() ->label('Export Item Characteristics') ->color('warning') ->exporter(ItemCharacteristicExporter::class) ->visible(function() { return Filament::auth()->user()->can('view export item characteristics'); }), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListItemCharacteristics::route('/'), 'create' => Pages\CreateItemCharacteristic::route('/create'), 'view' => Pages\ViewItemCharacteristic::route('/{record}'), 'edit' => Pages\EditItemCharacteristic::route('/{record}/edit'), ]; } public static function getEloquentQuery(): Builder { return parent::getEloquentQuery() ->withoutGlobalScopes([ SoftDeletingScope::class, ]); } }