Update TelaResource.php

This commit is contained in:
Lizandro Guarnizo
2026-01-29 16:32:28 -05:00
parent 53b252f2ab
commit 91514c2f98
+5 -1
View File
@@ -43,7 +43,11 @@ class TelaResource extends Resource
ColorPicker::make('color')->default('#000000'),
Select::make('proveedor_id')->relationship('proveedor', 'nombre')->searchable()->preload()->required(),
Select::make('proveedor_id')
->relationship('proveedor', 'nombre', fn($q) => $q->where('categoria', 'telas'))
->searchable()
->preload()
->required(),
TextInput::make('metros_comprados')->numeric()->required()->live(onBlur: true)->afterStateUpdated(function ($state, Forms\Set $set, $get) {
$valor_total = $get('valor_total');