Se crean las especificaciones de los documentos a requerir por nivel, a su vez permitir al alumno subirlos
This commit is contained in:
@@ -1,3 +1,43 @@
|
||||
<div>
|
||||
|
||||
<div class="mb-4">
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $tiposDocumentos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php
|
||||
$doc = $documentosPorTipo[$tipo->slug] ?? null;
|
||||
?>
|
||||
|
||||
<div class="mb-2">
|
||||
<strong><?php echo e(strtoupper($tipo->name)); ?></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</span>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
|
||||
<button
|
||||
onclick="verDocumento('<?php echo e(url('documento/ver/'.$doc->id)); ?>', <?php echo e($doc->id); ?>)"
|
||||
class="btn btn-sm btn-primary ms-2"
|
||||
>
|
||||
Ver
|
||||
</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>
|
||||
|
||||
<div wire:ignore.self
|
||||
class="modal fade"
|
||||
id="exampleModal"
|
||||
@@ -14,115 +54,77 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
$pendientes = $tiposDocumentos->filter(function($tipo) {
|
||||
$doc = $this->documentosPorTipo[$tipo->slug] ?? null;
|
||||
return !$doc || $doc->status == 2;
|
||||
});
|
||||
?>
|
||||
|
||||
<?php
|
||||
$pendientes = collect(['curp','acta','comprobante'])->filter(function($tipo) {
|
||||
$doc = $documentosPorTipo[$tipo] ?? null;
|
||||
return !$doc || $doc->status == 2;
|
||||
});
|
||||
?>
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($pendientes->isEmpty()): ?>
|
||||
<div class="alert alert-success">
|
||||
✔ Todos los documentos están validados
|
||||
</div>
|
||||
<?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($pendientes->isEmpty()): ?>
|
||||
<div class="alert alert-success">
|
||||
✔ Todos los documentos están validados
|
||||
</div>
|
||||
<form wire:submit.prevent="store" enctype="multipart/form-data">
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $tiposDocumentos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php
|
||||
$doc = $documentosPorTipo[$tipo->slug] ?? null;
|
||||
?>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$doc || $doc->status == 2): ?>
|
||||
|
||||
<div class="mb-4">
|
||||
|
||||
<label class="fw-bold"><?php echo e($tipo->name); ?></label>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc && $doc->status == 2): ?>
|
||||
<span class="badge bg-danger ms-2">Rechazado</span>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
|
||||
<form wire:submit.prevent="store" enctype="multipart/form-data">
|
||||
|
||||
<?php
|
||||
$doc = $documentosPorTipo['curp'] ?? null;
|
||||
?>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$doc || $doc->status == 2): ?>
|
||||
<div class="mb-3">
|
||||
<label class="small mb-1">CURP:</label>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc && $doc->status == 2): ?>
|
||||
<span class="badge bg-danger">❌ Rechazado</span>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
|
||||
<div class="custom-file-upload" wire:ignore>
|
||||
<input type="file" id="curp" hidden
|
||||
onchange="updateFileName(this, 'curp-name')"
|
||||
wire:model="curp">
|
||||
|
||||
<label for="curp" class="btn btn-outline-primary btn-sm">
|
||||
📄 Seleccionar archivo
|
||||
</label>
|
||||
|
||||
<span id="curp-name" class="ml-2 text-muted">
|
||||
Ningún archivo seleccionado
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
<div class="d-flex align-items-center gap-2 mt-2">
|
||||
|
||||
|
||||
<?php
|
||||
$doc = $documentosPorTipo['acta'] ?? null;
|
||||
?>
|
||||
<input type="file"
|
||||
id="<?php echo e($tipo->slug); ?>"
|
||||
wire:model="archivos.<?php echo e($tipo->slug); ?>"
|
||||
class="d-none">
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$doc || $doc->status == 2): ?>
|
||||
<div class="mb-3">
|
||||
<label class="small mb-1">Acta:</label>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc && $doc->status == 2): ?>
|
||||
<span class="badge bg-danger">❌ Rechazado</span>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
|
||||
<div class="custom-file-upload" wire:ignore>
|
||||
<input type="file" id="acta" hidden
|
||||
onchange="updateFileName(this, 'acta-name')"
|
||||
wire:model="acta">
|
||||
|
||||
<label for="acta" class="btn btn-outline-primary btn-sm">
|
||||
📄 Seleccionar archivo
|
||||
</label>
|
||||
|
||||
<span id="acta-name" class="ml-2 text-muted">
|
||||
Ningún archivo seleccionado
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
|
||||
<label for="<?php echo e($tipo->slug); ?>" class="btn btn-outline-primary btn-sm">
|
||||
📄 Seleccionar archivo
|
||||
</label>
|
||||
|
||||
|
||||
<span class="text-muted small">
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(isset($archivos[$tipo->slug])): ?>
|
||||
<?php echo e($archivos[$tipo->slug]->getClientOriginalName()); ?>
|
||||
|
||||
<?php
|
||||
$doc = $documentosPorTipo['comprobante'] ?? null;
|
||||
?>
|
||||
<?php else: ?>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$doc || $doc->status == 2): ?>
|
||||
<div class="mb-3">
|
||||
<label class="small mb-1">Comprobante de domicilio:</label>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc && $doc->status == 2): ?>
|
||||
<span class="badge bg-danger">❌ Rechazado</span>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
</span>
|
||||
|
||||
<div class="custom-file-upload" wire:ignore>
|
||||
<input type="file" id="comprobante" hidden
|
||||
onchange="updateFileName(this, 'comprobante-name')"
|
||||
wire:model="comprobante">
|
||||
</div>
|
||||
|
||||
<label for="comprobante" class="btn btn-outline-primary btn-sm">
|
||||
📄 Seleccionar archivo
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span id="comprobante-name" class="ml-2 text-muted">
|
||||
Ningún archivo seleccionado
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
<?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; ?>
|
||||
|
||||
<button class="btn btn-primary" type="submit">Subir</button>
|
||||
</form>
|
||||
<button class="btn btn-primary" type="submit">Subir</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<?php /**PATH C:\proyectos\primeros\sistemaEducativo\resources\views/livewire/documentos.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user