260 lines
15 KiB
PHP
260 lines
15 KiB
PHP
<?php $__env->startSection('head'); ?>
|
|
<?php echo $__env->make('layouts._partials.tablaStyle', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
|
|
<?php $__env->stopSection(); ?>
|
|
<?php $__env->startSection('title',"Inicio"); ?>
|
|
|
|
<?php $__env->startSection('content'); ?>
|
|
|
|
<div class="container-fluid">
|
|
<div class="card shadow mb-4">
|
|
<div class="card-header py-3">
|
|
<div class="d-sm-flex align-items-center justify-content-between">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (\Illuminate\Support\Facades\Blade::check('hasrole', 'Promotor')): ?>
|
|
<h6 class="m-0 font-weight-bold text-primary">Prospectos</h6>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (\Illuminate\Support\Facades\Blade::check('hasrole', 'Control escolar')): ?>
|
|
<h6 class="m-0 font-weight-bold text-primary">Alumnos</h6>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('alumno.create')): ?>
|
|
<button onclick="Livewire.dispatch('create-prospecto')" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Agregar</button>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-body row">
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (\Illuminate\Support\Facades\Blade::check('hasrole', 'Promotor')): ?>
|
|
<div class="col-sm-2 overflow-auto" style="height: 80vh">
|
|
<div class="list-group">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $alumno): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $alumno->alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $prospect): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<a data-prospect-id="<?php echo e($prospect->id); ?>"
|
|
class="list-group-item list-group-item-action"
|
|
onclick="Livewire.dispatch('edit-prospecto', { id: <?php echo e($prospect->id); ?>,user: <?php echo e($alumno->id); ?>})">
|
|
<div class="d-flex w-100 justify-content-between">
|
|
<h5 class="mb-1"><?php echo e($alumno->name); ?></h5>
|
|
<div class="p-3">
|
|
<i class="fa-duotone fa-regular fa-circle-user fa-2xl"></i>
|
|
</div>
|
|
</div>
|
|
<small>And some small print.</small>
|
|
</a>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
|
<a href="#" class="list-group-item list-group-item-action">
|
|
<div class="d-flex w-100 justify-content-between">
|
|
<h5 class="mb-1">Sin elementos</h5>
|
|
<div class="p-3"><i class="fa-duotone fa-solid fa-brake-warning fa-beat-fade fa-2xl" style="--fa-primary-color: #872222; --fa-secondary-color: #f00000;"></i></div>
|
|
</div>
|
|
<p class="mb-1"></p>
|
|
<small>Agrega un alumno...</small>
|
|
</a>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-10 overflow-auto" style="height: 70vh">
|
|
<?php
|
|
$__split = function ($name, $params = []) {
|
|
return [$name, $params];
|
|
};
|
|
[$__name, $__params] = $__split('data-prospecto');
|
|
|
|
$key = null;
|
|
|
|
$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-555129219-0', null);
|
|
|
|
$__html = app('livewire')->mount($__name, $__params, $key);
|
|
|
|
echo $__html;
|
|
|
|
unset($__html);
|
|
unset($__name);
|
|
unset($__params);
|
|
unset($__split);
|
|
if (isset($__slots)) unset($__slots);
|
|
?>
|
|
</div>
|
|
|
|
<?php
|
|
$__split = function ($name, $params = []) {
|
|
return [$name, $params];
|
|
};
|
|
[$__name, $__params] = $__split('modal-prospecto');
|
|
|
|
$key = null;
|
|
|
|
$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-555129219-1', null);
|
|
|
|
$__html = app('livewire')->mount($__name, $__params, $key);
|
|
|
|
echo $__html;
|
|
|
|
unset($__html);
|
|
unset($__name);
|
|
unset($__params);
|
|
unset($__split);
|
|
if (isset($__slots)) unset($__slots);
|
|
?>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (\Illuminate\Support\Facades\Blade::check('hasrole', 'Control escolar')): ?>
|
|
|
|
<table id="tcont" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
|
|
<thead>
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Alumno</th>
|
|
<th>Campus</th>
|
|
<th>Status</th>
|
|
<th>Opciones</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $alumno): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
|
<tr style="width:100%">
|
|
|
|
<td><?php echo e($alumno->id); ?></td>
|
|
|
|
<td>
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $alumno->alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<a href="<?php echo e(route('alumno.show', $alumno->id)); ?>">
|
|
<?php echo e($user->name); ?>
|
|
|
|
</a>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $alumno->alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_2 = true; $__currentLoopData = $user->plantelUsuarios; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plantel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_2 = false; ?>
|
|
<span class="badge bg-primary text-white">
|
|
<?php echo e($plantel->name); ?>
|
|
|
|
</span>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_2): ?>
|
|
<span class="text-muted">Sin plantel</span>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</td>
|
|
<td class="text-center">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($alumno->status==2): ?> <span class="badge bg-warning text-white"> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($alumno->status==3): ?> <span class="badge bg-success text-white"> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($alumno->status==4): ?> <span class="badge bg-danger text-white"> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($alumno->status==5): ?> <span class="badge bg-dark text-white"> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($alumno->status==6): ?> <span class="badge text-white" style="background-color: #630ac9"> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
<?php echo e($alumno->statusAlumno->name); ?>
|
|
|
|
</span>
|
|
</td>
|
|
|
|
<td class="row mx-auto">
|
|
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('alumno.edit')): ?>
|
|
<div class="col-sm-6 col-md-6">
|
|
<a class="btn btn-primary" href="<?php echo e(route('alumno.edit',$alumno->id)); ?>">
|
|
Edit
|
|
</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('alumno.destroy')): ?>
|
|
<div class="col-sm-6 col-md-6">
|
|
<form class="delete-form" action="<?php echo e(route('alumno.destroy',$alumno->id)); ?>" method="POST">
|
|
<?php echo csrf_field(); ?>
|
|
<?php echo method_field('DELETE'); ?>
|
|
<input type="submit" value="DELETE" class="btn btn-danger">
|
|
</form>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
|
<tr>
|
|
<td colspan="4">Sin alumnos.</td>
|
|
</tr>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
|
|
<?php $__env->startSection('scripts'); ?>
|
|
<?php echo $__env->make('layouts._partials.tablaScript', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
|
|
<?php echo $__env->make('layouts._partials.delete', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
|
|
<script>
|
|
document.addEventListener('livewire:init', () => {
|
|
Livewire.on('mark-active-prospect', ({ id }) => {
|
|
|
|
document.querySelectorAll('.list-group-item')
|
|
.forEach(item => item.classList.remove('active'));
|
|
|
|
const activeItem = document.querySelector(
|
|
`[data-prospect-id="${id}"]`
|
|
);
|
|
|
|
if (activeItem) {
|
|
activeItem.classList.add('active');
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
function verDocumento(url, docId) {
|
|
|
|
document.getElementById('visorFrame').src = url;
|
|
|
|
Livewire.dispatch('set-documento', { id: docId });
|
|
|
|
// 🔥 guardar instancia global
|
|
visorModalInstance = new bootstrap.Modal(
|
|
document.getElementById('visorModal')
|
|
);
|
|
|
|
visorModalInstance.show();
|
|
}
|
|
|
|
document.addEventListener('livewire:init', () => {
|
|
|
|
Livewire.on('cerrar-modal', () => {
|
|
|
|
if (visorModalInstance) {
|
|
visorModalInstance.hide();
|
|
}
|
|
|
|
// 🔥 limpiar iframe
|
|
document.getElementById('visorFrame').src = "";
|
|
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php echo $__env->make('layouts.landing', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\proyectos\primeros\sistemaEducativo\resources\views/alumno/index.blade.php ENDPATH**/ ?>
|