<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="row">
        <div class="col-xl-12"></div>
        <div class="mt-4 bg-gray">
            <div class="row">
                <div class="col-xl-12 col-lg-12">
                    <div class="card shadow mb-4">
                        <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                            <h3 class="m-0 font-weight-bold text-primary">Lista de Clientes</h3>
                            <a id="btnNuevoCliente" href="javascript:void(0);" class="btn btn-dark">
                                <i class="fas fa-plus"></i> Nuevo Cliente
                            </a>
                        </div>
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-bordered table-striped table-sm" id="tblClientes" width="100%" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th>codigo_cliente</th>
                                            <th>nombre_actual</th>
                                            <th>nombre_comercial</th>
                                            <th>vendedor_asignado</th>
                                            <th>estatus</th>
                                            <th>credito_maximo_aprobado</th>
                                            <th>dias_maximo_credito</th>
                                            <th>tipo_cliente</th>
                                            <th>Acciones</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="modalClientes" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"
        backdrop="static">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Nuevo Usuario</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <div class="row" id="formCliente">
                        <div class="col-xl-4">
                            <div class="form-group">

                                <label for="codigo">Codigo</label>
                                <input type="text" class="form-control" id="codigo" name="codigo" required>
                                <input type="hidden" class="form-control" name="id" id="id">
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-4">
                            <div class="form-group">
                                <label for="nombre">Nombre</label>
                                <input type="text" class="form-control" id="nombre" name="nombre" required>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-4">
                            <div class="form-group">
                                <label for="nombre_comercial">Nombre Comercial</label>
                                <input type="text" class="form-control" id="nombre_comercial" name="nombre_comercial" required>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-4">
                            <div class="form-group">
                                <label for="departamento">Departamento</label>
                                <select name="departamento" class="form-select" id="departamento">
                                    <option value="" disabled selected>Seleccionar</option>
                                </select>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-4">
                            <div class="form-group">
                                <label for="municipio">Municipio</label>
                            <select name="municipio" class="form-select" id="municipio">
                                <option value="" disabled selected>Seleccionar</option>
                            </select>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-4">
                            <div class="form-group">
                                <label for="telefono">Telefono</label>
                                <input type="text" class="form-control" id="telefono" name="telefono" required>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-6">
                            <div class="form-group">
                                <label for="id_vendedor">Asignar Vendedor</label>
                                <select name="id_vendedor" class="form-select" id="id_vendedor">
                                    <option value="" disabled selected>Seleccionar</option>
                                </select>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-6">
                            <div class="form-group">
                                <label for="tipo_cliente">Tipo Cliente</label>
                                <input type="text" class="form-control" id="tipo_cliente" name="tipo_cliente" required>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-6">
                            <div class="form-group">
                                <label for="max_credito">Credito Maximo Aprobado</label>
                                <input type="number" min="0" class="form-control" id="max_credito" name="max_credito" required>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-6">
                            <div class="form-group">
                                <label for="dias_credito">Dias Maximo Credito</label>
                                <input type="number" min="0" class="form-control" id="dias_credito" name="dias_credito" required>
                                <span></span>
                            </div>
                        </div>
                        <div class="col-xl-12">
                            <div class="form-group">
                                <label for="direccion">Direccion</label>
                                <textarea name="direccion" class="form-control" id="direccion"></textarea>
                                <span></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Cerrar</button>
                    <button type="button" class="btn btn-dark" id="btnGuardarCliente">Guardar</button>
                </div>
            </div>
        </div>
    </div>

<script>
    const api_store_client = "<?php echo e(route('clientes.store')); ?>";
    const api_departamentos = "<?php echo e(route('obtenerDepartamentos')); ?>";
    const api_municipios = "<?php echo e(route('obtenerMunicipios')); ?>";
    const api_vendedores = "<?php echo e(route('obtenerVendedores')); ?>";
    const url_get = "<?php echo e(route('clientes.obtenerClientesDT')); ?>";
    const url_get_by_id = "<?php echo e(route('clientes.obtenerClientesById', ':id')); ?>";
</script>

<script type="module" src="<?php echo e(asset('/js/custom/clientes.js')); ?>"></script>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\proforma_app\resources\views/clientes/index.blade.php ENDPATH**/ ?>