CAMBIOS: prototito taller v0.2? Ahora con buscador de repuestos

This commit is contained in:
Bryam105
2026-01-27 17:50:53 -03:30
parent b2f2343592
commit 5b5c8b2fc6
4 changed files with 173 additions and 31 deletions
+7 -1
View File
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Appointment;
use App\Models\Client;
use App\Models\Product;
use Illuminate\Http\Request;
class TallerController extends Controller
@@ -33,7 +34,12 @@ class TallerController extends Controller
public function create()
{
$clients = Client::orderBy('name')->get();
return view('taller.create', compact('clients'));
$products = Product::whereIn('type', ['accessory'])
->where('stock_quantity', '>', 0)
->get(['id', 'name', 'price', 'sku', 'stock_quantity']); // Solo campos necesarios
return view('taller.create', compact('clients', 'products'));
}
/**