232 lines
7.6 KiB
PHP
232 lines
7.6 KiB
PHP
<?php $__env->startSection('title', 'Mi perfil'); ?>
|
|
|
|
<?php $__env->startSection('content'); ?>
|
|
|
|
<style>
|
|
.custom-file-upload {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.custom-file-upload span {
|
|
font-size: 13px;
|
|
}
|
|
</style>
|
|
|
|
<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">
|
|
<h6 class="m-0 font-weight-bold text-primary">Mi perfil</h6>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (\Illuminate\Support\Facades\Blade::check('hasrole', 'Alumno')): ?>
|
|
<button onclick="Livewire.dispatch('documentos')"
|
|
class="btn btn-sm btn-success shadow-sm">
|
|
<i class="fas fa-file fa-sm text-white-50"></i> Expediente
|
|
</button>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (\Illuminate\Support\Facades\Blade::check('hasrole', 'Alumno')): ?>
|
|
|
|
<div>
|
|
<h5>Expediente</h5>
|
|
|
|
<?php
|
|
$tipos = ['curp', 'acta', 'comprobante'];
|
|
$alumno = Auth::user()->alumnos()->first();
|
|
?>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $tipos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<?php
|
|
$doc = $alumno?->documentos->firstWhere('tipo', $tipo);
|
|
?>
|
|
|
|
<div class="mb-3">
|
|
<strong><?php echo e(strtoupper($tipo)); ?></strong> :
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc): ?>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc->status == 1): ?>
|
|
<span class="badge bg-success">✔ Validado</span>
|
|
|
|
<?php elseif($doc->status == 2): ?>
|
|
<span class="badge bg-danger">❌ Rechazado</span>
|
|
|
|
<?php else: ?>
|
|
<span class="badge bg-warning">Pendiente de revision</span>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
<br>
|
|
|
|
<button
|
|
onclick="verDocumento('<?php echo e(url('documento/ver/'.$doc->id)); ?>')"
|
|
class="btn btn-sm btn-primary mt-2">
|
|
<i class="fa-duotone fa-solid fa-eye"></i> Ver documento
|
|
</button>
|
|
|
|
<?php else: ?>
|
|
<span class="text-danger">❌ Faltante</span>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
</div>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
$__split = function ($name, $params = []) {
|
|
return [$name, $params];
|
|
};
|
|
[$__name, $__params] = $__split('documentos', []);
|
|
|
|
$key = null;
|
|
|
|
$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-2827182779-0', 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
|
|
$__split = function ($name, $params = []) {
|
|
return [$name, $params];
|
|
};
|
|
[$__name, $__params] = $__split('profile.update-profile-information-form');
|
|
|
|
$key = null;
|
|
|
|
$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-2827182779-1', null);
|
|
|
|
$__html = app('livewire')->mount($__name, $__params, $key);
|
|
|
|
echo $__html;
|
|
|
|
unset($__html);
|
|
unset($__name);
|
|
unset($__params);
|
|
unset($__split);
|
|
if (isset($__slots)) unset($__slots);
|
|
?>
|
|
|
|
<hr>
|
|
|
|
<?php
|
|
$__split = function ($name, $params = []) {
|
|
return [$name, $params];
|
|
};
|
|
[$__name, $__params] = $__split('profile.update-password-form');
|
|
|
|
$key = null;
|
|
|
|
$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-2827182779-2', null);
|
|
|
|
$__html = app('livewire')->mount($__name, $__params, $key);
|
|
|
|
echo $__html;
|
|
|
|
unset($__html);
|
|
unset($__name);
|
|
unset($__params);
|
|
unset($__split);
|
|
if (isset($__slots)) unset($__slots);
|
|
?>
|
|
|
|
<hr>
|
|
|
|
<?php
|
|
$__split = function ($name, $params = []) {
|
|
return [$name, $params];
|
|
};
|
|
[$__name, $__params] = $__split('profile.logout-other-browser-sessions-form');
|
|
|
|
$key = null;
|
|
|
|
$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-2827182779-3', null);
|
|
|
|
$__html = app('livewire')->mount($__name, $__params, $key);
|
|
|
|
echo $__html;
|
|
|
|
unset($__html);
|
|
unset($__name);
|
|
unset($__params);
|
|
unset($__split);
|
|
if (isset($__slots)) unset($__slots);
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 🔥 MODAL VISOR -->
|
|
|
|
<div class="modal fade" id="visorModal" tabindex="-1">
|
|
<div class="modal-dialog modal-xl">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Vista previa</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<iframe id="visorFrame" width="100%" height="600px" style="border:none;"></iframe>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php $__env->startSection('scripts'); ?>
|
|
|
|
<script>
|
|
document.addEventListener('livewire:init', () => {
|
|
Livewire.on('open-documentos-modal', () => {
|
|
$('#exampleModal').modal('show');
|
|
});
|
|
});
|
|
|
|
// 🔥 abrir documento en modal
|
|
function verDocumento(url) {
|
|
document.getElementById('visorFrame').src = url + '?t=' + new Date().getTime();
|
|
|
|
var modal = new bootstrap.Modal(document.getElementById('visorModal'));
|
|
modal.show();
|
|
}
|
|
|
|
// 🔥 limpiar iframe al cerrar
|
|
document.getElementById('visorModal').addEventListener('hidden.bs.modal', function () {
|
|
document.getElementById('visorFrame').src = '';
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
function updateFileName(input, targetId) {
|
|
const fileName = input.files[0]?.name || 'Ningún archivo seleccionado';
|
|
document.getElementById(targetId).textContent = fileName;
|
|
}
|
|
</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/profile/show.blade.php ENDPATH**/ ?>
|