@extends('layouts.carpinteria') @section('title', 'Catálogo de Herrajes') @section('header_title', 'Gestión de Herrajes y Accesorios') @section('content') @php $sym = $settings->currency_symbol ?? '$'; $partLabels = [ 'drawers' => 'Gavetas / Cajones', 'doors' => 'Puertas', 'levels' => 'Niveles / Entrepaños', 'general' => 'General / Tiradores', ]; $ruleLabels = [ 'per_drawer' => 'Por gaveta/cajón', 'per_door' => 'Por puerta', 'per_level' => 'Por nivel/entrepaño', 'fixed' => 'Monto fijo por mueble', ]; $curPart = old('target_part', $editingHardware->target_part ?? 'drawers'); $curRule = old('qty_rule', $editingHardware->qty_rule ?? 'per_drawer'); $isActive = old('is_active', $editingHardware->is_active ?? 1); $existingImgUrl = !empty($editingHardware?->image) ? asset('storage/' . $editingHardware->image) : ''; $shouldOpenModal = !is_null($editingHardware) || $errors->any(); @endphp

Listado de Herrajes ({{ $hardwareItems->count() }})

Consulta, filtra o registra herrajes con su costo y fotografía.
{{-- Búsqueda avanzada AJAX --}}
@forelse($hardwareItems as $hw) @empty @endforelse
Herraje Parte Cálculo Costo Estado Acciones
@if(!empty($hw->image_url)) {{ $hw->name }} @else Sin img @endif
{{ $hw->name }} @if($hw->notes)
{{ $hw->notes }} @endif
{{ $partLabels[$hw->target_part] ?? $hw->target_part }} {{ $ruleLabels[$hw->qty_rule] ?? $hw->qty_rule }}
Unidad: {{ $hw->unit_label }}
{{ $sym }}{{ number_format($hw->unit_cost, 2) }} {{ $hw->is_active ? 'Activo' : 'Inactivo' }}
@csrf @method('DELETE')
No hay herrajes registrados con este criterio.
{{-- Modal Crear / Editar Herraje --}} @endsection