HeyWeb
Modal window
I have this code that allows me to open a view, but how can I make it appear in a modal view?
Thank you so much
Forms\Components\Actions::make([ Forms\Components\Actions\Action::make('view')->label('Detalles del Inmueble')
->url(fn ($record): string => InmuebleResource::getUrl('view', ['record' => $record]))
]),
3 replies
Update value
When I update the registration field it does not update the owner field, it returns a blank value
Forms\Components\Select::make('vehiculos_id')->required()->label('Matricula')
->searchable()
->relationship('vehiculos','matricula')
->afterStateUpdated(function (Set $set) {
$set('partes.vehiculos_id', null);
})
->preload()->live(), Forms\Components\TextInput::make('partes.vehiculos_id')->label('Propietario') ->formatStateUsing(function ($state, Parte $partes) { if (!empty($partes->vehiculos->clientes)) { return $partes->vehiculos->clientes->apellidos . ', ' . $partes->vehiculos->clientes->nombre; } else { return null; } }) ->disabled()->live(),
->preload()->live(), Forms\Components\TextInput::make('partes.vehiculos_id')->label('Propietario') ->formatStateUsing(function ($state, Parte $partes) { if (!empty($partes->vehiculos->clientes)) { return $partes->vehiculos->clientes->apellidos . ', ' . $partes->vehiculos->clientes->nombre; } else { return null; } }) ->disabled()->live(),
10 replies