@extends('layouts.index')
@section('contenido')
<div class="content">
	<div class="card">
        <div class="card-header header-elements-inline">
            <h5 class="card-title">LISTADO DE MATERIAL PROMOCIONAL</h5>
            <div class="header-elements">
                <div class="list-icons">
                    <a href="{{ route('marketing.crear') }}" class="btn btn-link btn-float text-default">
                        <i class="icon-file-plus2 text-primary"></i><span>Nuevo material Promocional</span>
                    </a>
                    <a class="list-icons-item" data-action="collapse"></a>
                </div>
            </div>
        </div>
        <table id="tablaJS" class="table datatable-basic">
            <thead>
                <tr>
                    <th>id</th>
                    <th>Nombre</th>
                    <th>Marca</th>
                    <th>Precio unitario</th>
                    <th>Comentario</th>
                    <th class="text-center">Acciones</th>
                </tr>
            </thead>
            <tbody>
                @foreach ($productosPromocionales as $v)
                    <tr>
                        <td>{{$v['id']}}</td>
                        <td>{{$v['nombre']}}</td>
                        <td>{{$v['marca']}}</td>
                        <td>{{$v['precio']}} </td>
                        <td>{{$v['comentario']}}</td>
                        <td class="text-center">
                            <div class="list-icons">
                                <div class="dropdown">
                                    <a href="#" class="list-icons-item" data-toggle="dropdown">
                                        <i class="icon-menu9"></i>
                                    </a>

                                    <div class="dropdown-menu dropdown-menu-right">
                                        <a href="{{ route('productos.editar_material_promocional', $v['id']) }}" class="dropdown-item"><i class="icon-pencil6"></i> Editar</a>
                                        <a href="{{ route('productos.eliminar_material_promocional', $v['id']) }}" class="dropdown-item"><i class="icon-trash"></i> Eliminar</a>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                @endforeach

            </tbody>
        </table>
    </div>
</div>
@endsection

@section('javascript')
<script>
    jQuery( document ).ready(function() {

    });
</script>
@endsection
