schema([ DateTimePicker::make('fecha_recepcion')->required(), TextInput::make('cantidad') ->numeric() ->required() ->minValue(1) ->maxValue(fn () => $this->getOwnerRecord()?->faltantes ?? 0) ->helperText(fn () => 'Máximo: ' . ($this->getOwnerRecord()?->faltantes ?? 0)), Textarea::make('notas') ->helperText('Si hay prendas defectuosas, regístralas en "Arreglos" después de crear la recepción.'), ]); } public function table(Tables\Table $table): Tables\Table { return $table ->columns([ TextColumn::make('id')->label('#'), TextColumn::make('fecha_recepcion')->dateTime()->label('Fecha'), TextColumn::make('cantidad')->label('Cantidad'), TextColumn::make('usuario.name')->label('Usuario'), TextColumn::make('notas')->limit(50)->wrap(), TextColumn::make('created_at')->dateTime()->label('Creado'), ]) ->headerActions([]) ->actions([ EditAction::make(), DeleteAction::make(), ]) ->bulkActions([]); } }