File tree Expand file tree Collapse file tree
Frontend/resources/views/inventarioviews/recetas Expand file tree Collapse file tree Original file line number Diff line number Diff line change 223223 <label class =" form-label fw-bold text-muted small text-uppercase" >Producto a Producir</label >
224224 <select name =" idProducto" class =" form-select shadow-sm p-3" style =" border-radius : 12px ;" required >
225225 <option value =" " >Seleccione el producto...</option >
226- {{-- ✅ La API devuelve JSON array, acceder con ['clave'] no ->propiedad --}}
227226 @foreach ($productos as $prod )
228- <option value =" {{ $prod [' idProducto' ] ?? $prod [' ID_PRODUCTO' ] ?? ' ' } }" >
229- {{ $prod [' nombreProducto' ] ?? $prod [' NOMBRE_PRODUCTO' ] ?? ' Producto sin nombre' } }
230- </option >
227+ @php
228+ // Mapeo manual para adaptarnos a lo que envía el módulo de Productos
229+ $id = $prod [' idProducto' ] ?? $prod [' ID_PRODUCTO' ] ?? $prod [' Id Producto:' ] ?? null ;
230+ $nombre = $prod [' nombreProducto' ] ?? $prod [' NOMBRE_PRODUCTO' ] ?? $prod [' Nombre Producto:' ] ?? ' Producto sin nombre' ;
231+ @endphp
232+
233+ @if ($id )
234+ <option value =" {{ $id } }" >{{ $nombre } } </option >
235+ @endif
231236 @endforeach
232237 </select >
233238 </div >
You can’t perform that action at this time.
0 commit comments