Se crean las especificaciones de los documentos a requerir por nivel, a su vez permitir al alumno subirlos

This commit is contained in:
2026-03-31 11:56:34 -06:00
parent cfd9d2ac68
commit 588a63ed24
61 changed files with 1487 additions and 326 deletions
@@ -0,0 +1,103 @@
<?php
namespace App\Http\Controllers;
use App\Models\DocumentoTipo;
use App\Models\Nivel;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
class DocumentoTipoController extends Controller
{
public function __construct() {
$this->middleware('can:documentoTipo.index')->only('index','show');
$this->middleware('can:documentoTipo.create')->only('create','store');
$this->middleware('can:documentoTipo.edit')->only('edit','update');
$this->middleware('can:documentoTipo.destroy')->only('destroy');
}
public function index()
{
$documentotipos=DocumentoTipo::all();
return view('documento.index',compact('documentotipos'));
}
public function create()
{
$nivels = Nivel::where('status','=','1')->get();
return view('Documento.create',compact('nivels'));
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$request->validate([
'name' => 'required',
'slug' => 'required|unique:documento_tipos,slug',
'extensiones' => 'required|array'
]);
$documentotipo=DocumentoTipo::create([
'name' => $request->name,
'slug' => $request->slug,
'extensiones' => $request->extensiones
]);
$documentotipo->niveles()->sync($request->nivels ?? []);
return redirect()->route('documentotipo.edit',compact('documentotipo'))->with('info','Se creó la la documentación correctamente');
}
/**
* Display the specified resource.
*/
public function show(string $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(DocumentoTipo $documentotipo)
{
$documentotipo->load('niveles');
$nivels = Nivel::where('status','=','1')->get();
return view('documento.edit',compact(['documentotipo','nivels']));
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, DocumentoTipo $documentotipo)
{
$documentotipo->update([
'name' => $request->name,
'slug' => $request->slug,
'extensiones' => $request->extensiones
]);
$documentotipo->niveles()->sync($request->nivels ?? []);
return redirect()->route('documentotipo.edit',compact('documentotipo'))->with('info','Se modificó la la documentación correctamente');
}
/**
* Remove the specified resource from storage.
*/
public function destroy(DocumentoTipo $documentotipo)
{
$documentotipo->niveles()->detach();
$documentotipo->delete();
session()->flash('swal',[
'icon'=>'success',
'title'=>'Eliminado!',
'text'=>'Se han eliminado los registros correctamente'
]);
return redirect()->route('documentotipo.index');
}
}
+28 -29
View File
@@ -2,7 +2,6 @@
namespace App\Livewire;
use App\Models\Alumno;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\On;
use Livewire\Component;
@@ -12,13 +11,10 @@ class Documentos extends Component
{
use WithFileUploads;
public $curp;
public $acta;
public $comprobante;
public $user;
public $archivos = [];
public $alumno;
public $documentosPorTipo = [];
public $tiposDocumentos = [];
#[On('documentos')]
public function documentos()
@@ -28,42 +24,47 @@ class Documentos extends Component
public function cargarDocumentos()
{
$this->alumno = Auth::user()->alumnos()->first();
$this->alumno = Auth::user()
->alumnos()
->with('nivelRel.documentosRequeridos')
->first();
if ($this->alumno) {
$this->documentosPorTipo = $this->alumno
->documentos()
->get()
->keyBy('tipo');
}
}
$this->tiposDocumentos = $this->alumno->nivelRel
? $this->alumno->nivelRel->documentosRequeridos
: collect();
}
}
public function store()
{
$this->validate([
'curp' => 'nullable|file|mimes:pdf,jpg,png',
'acta' => 'nullable|file|mimes:pdf,jpg,png',
'comprobante' => 'nullable|file|mimes:pdf,jpg,png',
]);
$alumno = Auth::user()->alumnos->first();
if (!$alumno) {
if (!$this->alumno) {
abort(404, 'Alumno no encontrado');
}
$tipos = ['curp', 'acta', 'comprobante'];
$rules = [];
foreach ($tipos as $tipo) {
foreach ($this->tiposDocumentos as $tipo) {
$rules["archivos.{$tipo->slug}"] =
'nullable|file|mimes:' . implode(',', $tipo->extensiones);
}
if ($this->$tipo) {
$this->validate($rules);
$ruta = $this->$tipo->store('documentos', 'public');
foreach ($this->tiposDocumentos as $tipo) {
$alumno->documentos()->updateOrCreate(
['tipo' => $tipo],
if (isset($this->archivos[$tipo->slug])) {
$ruta = $this->archivos[$tipo->slug]->store('documentos', 'public');
$this->alumno->documentos()->updateOrCreate(
['tipo' => $tipo->slug],
[
'archivo' => $ruta,
'status' => 0
@@ -72,10 +73,9 @@ class Documentos extends Component
}
}
// 🔥 recargar correctamente
$this->cargarDocumentos();
$this->reset(['curp', 'acta', 'comprobante']);
$this->reset('archivos');
$this->dispatch('close-documentos-modal');
@@ -85,8 +85,7 @@ class Documentos extends Component
text: 'Documentos cargados',
timer: 2000,
confirm: false,
closeModal: true,
reload: 2000
closeModal: true
);
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class DocumentoTipo extends Model
{
protected $guarded = [];
public $timestamps = false;
protected $casts = [
'extensiones' => 'array',
];
public function niveles()
{
return $this->belongsToMany(
Nivel::class,
'nivel_documento',
'documento_tipo_id',
'nivel_id'
);
}
}
+10
View File
@@ -32,4 +32,14 @@ class Nivel extends Model
->wherePivot('plantel_id', $plantelId)
->exists();
}
public function documentosRequeridos()
{
return $this->belongsToMany(
DocumentoTipo::class,
'nivel_documento',
'nivel_id',
'documento_tipo_id'
);
}
}
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('documento_tipos', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->json('extensiones')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('documento_tipos');
}
};
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('nivel_documento', function (Blueprint $table) {
$table->unsignedBigInteger('documento_tipo_id');
$table->foreign('documento_tipo_id')->references('id')->on('documento_tipos');
$table->unsignedBigInteger('nivel_id');
$table->foreign('nivel_id')->references('id')->on('nivels');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('nivel_documento');
}
};
+1
View File
@@ -28,5 +28,6 @@ class DatabaseSeeder extends Seeder
$this->call(ConceptoSeeder::class);
$this->call(MaterialSeeder::class);
$this->call(GrupoSeeder::class);
$this->call(DocumentoTipoSeeder::class);
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use App\Models\DocumentoTipo;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DocumentoTipoSeeder extends Seeder
{
public function run()
{
DocumentoTipo::insert([
['name' => 'CURP', 'slug' => 'curp','extensiones' => json_encode(['pdf'])],
['name' => 'Acta de nacimiento', 'slug' => 'acta','extensiones' => json_encode(['pdf'])],
['name' => 'Comprobante de domicilio', 'slug' => 'comprobante','extensiones' => json_encode(['pdf'])],
['name' => 'Certificado secundaria', 'slug' => 'certificado_secundaria','extensiones' => json_encode(['pdf'])],
['name' => 'Certificado preparatoria', 'slug' => 'certificado_prepa','extensiones' => json_encode(['pdf'])],
['name' => 'Certificado licenciatura', 'slug' => 'certificado_licenciatura','extensiones' => json_encode(['pdf'])],
['name' => 'Identificación oficial', 'slug' => 'ine','extensiones' => json_encode(['pdf'])],
['name' => 'Certificado médico', 'slug' => 'certificado_medico','extensiones' => json_encode(['pdf'])],
]);
}
}
+5
View File
@@ -135,5 +135,10 @@ class RoleSeeder extends Seeder
Permission::create(['name'=>'docente.create','description'=>'Crear docentes'])->syncRoles([$role1,$role6]);
Permission::create(['name'=>'docente.edit','description'=>'Editar docentes'])->syncRoles([$role1,$role6]);
Permission::create(['name'=>'docente.destroy','description'=>'Eliminar docentes'])->syncRoles([$role1,$role6]);
Permission::create(['name'=>'documentoTipo.index','description'=>'Ver documentos por nivel'])->syncRoles([$role1]);
Permission::create(['name'=>'documentoTipo.create','description'=>'Crear documentos por nivel'])->syncRoles([$role1]);
Permission::create(['name'=>'documentoTipo.edit','description'=>'Editar documentos por nivel'])->syncRoles([$role1]);
Permission::create(['name'=>'documentoTipo.destroy','description'=>'Eliminar documentos por nivel'])->syncRoles([$role1]);
}
}
@@ -0,0 +1,93 @@
@extends('layouts.landing')
@section('title',"Crear")
@section('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">
<h6 class="m-0 font-weight-bold text-primary">Crear documentación</h6>
<a href="{{route('documentotipo.index')}}" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
<h3>Crear tipo de documento</h3>
@if(session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
<form method="POST" action="{{ route('documentotipo.store') }}">
@csrf
{{-- NOMBRE --}}
<div class="mb-3">
<label>Nombre</label>
<input type="text" name="name" class="form-control" required>
</div>
{{-- SLUG --}}
<div class="mb-3">
<label>Slug</label>
<input type="text" name="slug" class="form-control" required>
</div>
{{-- EXTENSIONES --}}
<div class="mb-3">
<label>Extensiones permitidas</label>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="pdf" class="form-check-input cb">
PDF
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="jpg" class="form-check-input cb">
JPG
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="png" class="form-check-input cb">
PNG
</label>
</div>
</div>
<div class="mb-3">
<label>Niveles a impartir</label>
@foreach ($nivels as $nivel)
<div class="form-check">
<input type="checkbox" class="form-check-input cb"
id="n-{{ $nivel->id }}"
name="nivels[]" value="{{ $nivel->id }}"
>
<label class="form-check-label" for="n-{{ $nivel->id }}">
{{ $nivel->name }}
</label>
</div>
@endforeach
</div>
<button class="btn btn-primary">Guardar</button>
</form>
</div>
</div>
</div>
@endsection
+87
View File
@@ -0,0 +1,87 @@
@extends('layouts.landing')
@section('title',"Edit")
@section('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">
<h6 class="m-0 font-weight-bold text-primary">Editar documentación</h6>
<a href="{{route('documentotipo.index')}}" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
@if (session('info'))
<div class="alert alert-success">
<strong>{{session('info')}}</strong>
</div>
@endif
<form action="{{route('documentotipo.update',$documentotipo->id)}}" method="POST">
@method('PUT')
@csrf
{{-- NOMBRE --}}
<div class="mb-3">
<label>Nombre</label>
<input type="text" name="name" class="form-control" value="{{$documentotipo->name}}" required>
</div>
{{-- SLUG --}}
<div class="mb-3">
<label>Slug</label>
<input type="text" name="slug" class="form-control" value="{{$documentotipo->slug}}" required>
</div>
{{-- EXTENSIONES --}}
<div class="mb-3">
<label>Extensiones permitidas</label>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="pdf" class="form-check-input cb" {{ in_array('pdf', $documentotipo->extensiones ?? []) ? 'checked' : '' }}>
PDF
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="jpg" class="form-check-input cb" {{ in_array('jpg', $documentotipo->extensiones ?? []) ? 'checked' : '' }}>
JPG
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="png" class="form-check-input cb" {{ in_array('png', $documentotipo->extensiones ?? []) ? 'checked' : '' }}>
PNG
</label>
</div>
</div>
<div class="mb-3">
<label>Niveles a impartir</label>
@foreach ($nivels as $nivel)
<div class="form-check">
<input type="checkbox" class="form-check-input cb"
id="n-{{ $nivel->id }}"
name="nivels[]" value="{{ $nivel->id }}"
{{ $documentotipo->niveles->contains($nivel->id) ? 'checked' : '' }}
>
<label class="form-check-label" for="n-{{ $nivel->id }}">
{{ $nivel->name }}
</label>
</div>
@endforeach
</div>
<input class="btn btn-primary" type="submit" value="Actualizar">
</form>
</div>
</div>
</div>
@endsection
+70
View File
@@ -0,0 +1,70 @@
@extends('layouts.landing')
@section('head')
@include('layouts._partials.tablaStyle')
@endsection
@section('title',"Inicio")
@section('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">
<h6 class="m-0 font-weight-bold text-primary">Documentación</h6>
@can('documentoTipo.create')
<a href="{{route('documentotipo.create')}}" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Crear documentación</a>
@endcan
</div>
</div>
<div class="card-body">
<div class="container-fluid">
<table id="tcont" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
<thead>
<tr>
<th>Id</th>
<th>Nombre</th>
<th>row</th>
</tr>
</thead>
<tbody>
@forelse ($documentotipos as $row)
<tr style="width:100%">
<td>{{$row->id}}</td>
<td><a href="{{route('documentotipo.show',$row->id)}}">{{$row->name}}</a></td>
<td class="row mx-auto">
@can('documentoTipo.edit')
<div class="col-sm-6 col-md-6"><a class="btn btn-primary" href="{{route('documentotipo.edit',$row->id)}}">Edit</a></div>
@endcan
@can('documentoTipo.destroy')
<div class="col-sm-6 col-md-6">
<form class="delete-form" action="{{route('documentotipo.destroy',$row->id)}}" method="POST">
@csrf
@method('DELETE')
<input type="submit" value="DELETE" class="btn btn-danger">
</form>
</div>
@endcan
</td>
</tr>
@empty
<p>Sin documentación.</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
@include('layouts._partials.tablaScript')
@include('layouts._partials.delete')
@endsection
@@ -54,6 +54,10 @@
<a class="collapse-item" href="{{ route('nivel.index') }}" style="color:#85888e">Niveles</a>
@endcan
@can('documentoTipo.index')
<a class="collapse-item" href="{{ route('documentotipo.index') }}" style="color:#85888e">Documentación</a>
@endcan
@can('permission.index')
<a class="collapse-item" href="{{ route('permission.index') }}" style="color:#85888e">Permisos</a>
@endcan
@@ -199,17 +199,23 @@
<h5>Expediente del alumno</h5>
@php
$tipos = ['curp', 'acta', 'comprobante','certificadoPrepa','certificadoLicenciatura'];
$nivel = $prospecto->nivelRel ?? null;
$tipos = $nivel
? $nivel->documentosRequeridos
: collect();
$documentos = collect($prospecto?->documentos)->keyBy('tipo');
@endphp
@foreach($tipos as $tipo)
@php
$doc = $documentos[$tipo] ?? null;
$doc = $documentos[$tipo->slug] ?? null;
@endphp
<div class="mb-3">
<strong>{{ strtoupper($tipo) }}</strong> :
<strong>{{ strtoupper($tipo->name) }}</strong> :
@if($doc)
@@ -239,6 +245,8 @@
@endforeach
</div>
</div>
@else
+74 -73
View File
@@ -1,3 +1,43 @@
<div>
<div class="mb-4">
@foreach($tiposDocumentos as $tipo)
@php
$doc = $documentosPorTipo[$tipo->slug] ?? null;
@endphp
<div class="mb-2">
<strong>{{ strtoupper($tipo->name) }}</strong> :
@if($doc)
@if($doc->status == 1)
<span class="badge bg-success"> Validado</span>
@elseif($doc->status == 2)
<span class="badge bg-danger"> Rechazado</span>
@else
<span class="badge bg-warning">Pendiente</span>
@endif
<button
onclick="verDocumento('{{ url('documento/ver/'.$doc->id) }}', {{ $doc->id }})"
class="btn btn-sm btn-primary ms-2"
>
Ver
</button>
@else
<span class="text-danger"> Faltante</span>
@endif
</div>
@endforeach
</div>
<div wire:ignore.self
class="modal fade"
id="exampleModal"
@@ -14,10 +54,9 @@
</button>
</div>
<div class="modal-body">
@php
$pendientes = collect(['curp','acta','comprobante'])->filter(function($tipo) {
$doc = $documentosPorTipo[$tipo] ?? null;
$pendientes = $tiposDocumentos->filter(function($tipo) {
$doc = $this->documentosPorTipo[$tipo->slug] ?? null;
return !$doc || $doc->status == 2;
});
@endphp
@@ -30,98 +69,60 @@
<form wire:submit.prevent="store" enctype="multipart/form-data">
@foreach($tiposDocumentos as $tipo)
@php
$doc = $documentosPorTipo['curp'] ?? null;
$doc = $documentosPorTipo[$tipo->slug] ?? null;
@endphp
@if(!$doc || $doc->status == 2)
<div class="mb-3">
<label class="small mb-1">CURP:</label>
<div class="mb-4">
<label class="fw-bold">{{ $tipo->name }}</label>
@if($doc && $doc->status == 2)
<span class="badge bg-danger"> Rechazado</span>
<span class="badge bg-danger ms-2">Rechazado</span>
@endif
<div class="custom-file-upload" wire:ignore>
<input type="file" id="curp" hidden
onchange="updateFileName(this, 'curp-name')"
wire:model="curp">
<div class="d-flex align-items-center gap-2 mt-2">
<label for="curp" class="btn btn-outline-primary btn-sm">
{{-- input oculto --}}
<input type="file"
id="{{ $tipo->slug }}"
wire:model="archivos.{{ $tipo->slug }}"
class="d-none">
{{-- botón bonito --}}
<label for="{{ $tipo->slug }}" 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>
@endif
{{-- acta --}}
@php
$doc = $documentosPorTipo['acta'] ?? null;
@endphp
@if(!$doc || $doc->status == 2)
<div class="mb-3">
<label class="small mb-1">Acta:</label>
@if($doc && $doc->status == 2)
<span class="badge bg-danger"> Rechazado</span>
@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>
@endif
{{-- acta --}}
@php
$doc = $documentosPorTipo['comprobante'] ?? null;
@endphp
@if(!$doc || $doc->status == 2)
<div class="mb-3">
<label class="small mb-1">Comprobante de domicilio:</label>
@if($doc && $doc->status == 2)
<span class="badge bg-danger"> Rechazado</span>
@endif
<div class="custom-file-upload" wire:ignore>
<input type="file" id="comprobante" hidden
onchange="updateFileName(this, 'comprobante-name')"
wire:model="comprobante">
<label for="comprobante" class="btn btn-outline-primary btn-sm">
📄 Seleccionar archivo
</label>
<span id="comprobante-name" class="ml-2 text-muted">
Ningún archivo seleccionado
{{-- nombre dinámico --}}
<span class="text-muted small">
@if(isset($archivos[$tipo->slug]))
&nbsp;&nbsp;&nbsp; {{ $archivos[$tipo->slug]->getClientOriginalName() }}
@else
@endif
</span>
</div>
</div>
@endif
@endforeach
<button class="btn btn-primary" type="submit">Subir</button>
</form>
</div>
</div>
</div>
</div>
</div>
-39
View File
@@ -39,45 +39,6 @@
<div>
<h5>Expediente</h5>
@php
$tipos = ['curp', 'acta', 'comprobante'];
$alumno = Auth::user()->alumnos()->first();
@endphp
@foreach($tipos as $tipo)
@php
$doc = $alumno?->documentos->firstWhere('tipo', $tipo);
@endphp
<div class="mb-3">
<strong>{{ strtoupper($tipo) }}</strong> :
@if($doc)
@if($doc->status == 1)
<span class="badge bg-success"> Validado</span>
@elseif($doc->status == 2)
<span class="badge bg-danger"> Rechazado</span>
@else
<span class="badge bg-warning">Pendiente de revision</span>
@endif
<br>
<button
onclick="verDocumento('{{ 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>
@else
<span class="text-danger"> Faltante</span>
@endif
</div>
@endforeach
</div>
+3 -1
View File
@@ -10,6 +10,7 @@ use App\Http\Controllers\ChatController;
use App\Http\Controllers\CodeController;
use App\Http\Controllers\ConceptoController;
use App\Http\Controllers\DocumentoController;
use App\Http\Controllers\DocumentoTipoController;
use App\Http\Controllers\DurationController;
use App\Http\Controllers\GrupoController;
use App\Http\Controllers\HorarioController;
@@ -59,7 +60,8 @@ Route::middleware(['auth:sanctum',config('jetstream.auth_session'),'verified',
Route::post('/chat/stop-typing', function (Request $request) {broadcast(new \App\Events\UserStoppedTyping($request->conversation_id,auth()->user()))->toOthers();return response()->json();});
Route::resource('/documento',DocumentoController::class);
Route::get('/documento/ver/{id}', function ($id) { $doc = Documento::findOrFail($id); $alumno = auth()->user()->alumnos()->first(); if (!$alumno || $doc->alumno_id !== $alumno->id) { abort(403); } return response()->file( storage_path('app/public/'.$doc->archivo) ); });
Route::get('documento/ver/{id}', [DocumentoController::class, 'ver'])->name('documento.ver');
Route::get('/documento/ver/{id}', [DocumentoController::class, 'ver'])->name('documento.ver');
Route::resource('/documentotipo',DocumentoTipoController::class);
Route::resource('/duration',DurationController::class);
Route::resource('/grupo', GrupoController::class);
Route::get('/horario', [HorarioController::class, 'index'])->name('horario.index');
Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 KiB

@@ -203,17 +203,23 @@
<h5>Expediente del alumno</h5>
<?php
$tipos = ['curp', 'acta', 'comprobante','certificadoPrepa','certificadoLicenciatura'];
$nivel = $prospecto->nivelRel ?? null;
$tipos = $nivel
? $nivel->documentosRequeridos
: collect();
$documentos = collect($prospecto?->documentos)->keyBy('tipo');
?>
<?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 = $documentos[$tipo] ?? null;
$doc = $documentos[$tipo->slug] ?? null;
?>
<div class="mb-3">
<strong><?php echo e(strtoupper($tipo)); ?></strong> :
<strong><?php echo e(strtoupper($tipo->name)); ?></strong> :
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($doc): ?>
@@ -243,6 +249,8 @@
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php else: ?>
@@ -0,0 +1,29 @@
<?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">
<h6 class="m-0 font-weight-bold text-primary">Documentos</h6>
</div>
</div>
<div class="card-body">
<div class="container-fluid">
<h2>Configuración de niveles</h2>
</div>
</div>
</div>
</div>
<?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/Documento/index.blade.php ENDPATH**/ ?>
@@ -0,0 +1,61 @@
<?php $__env->startSection('title',"Edit"); ?>
<?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">
<h6 class="m-0 font-weight-bold text-primary">Editar nivel</h6>
<a href="<?php echo e(route('nivel.index')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('info')): ?>
<div class="alert alert-success">
<strong><?php echo e(session('info')); ?></strong>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<form action="<?php echo e(route('nivel.update',$nivel->id)); ?>" method="POST">
<?php echo method_field('PUT'); ?>
<?php echo csrf_field(); ?>
<div class="mb-3">
<label class="small mb-1">Nombre</label>
<input class="form-control" name="name" value="<?php echo e($nivel->name); ?>">
</div>
<div class="mb-3">
<label>Seleccionar campus</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $plantels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plantel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="form-check">
<input type="checkbox" class="form-check-input cb"
id="<?php echo e($plantel->id); ?>"
name="plantels[]" value="<?php echo e($plantel->id); ?>"
<?php echo e($nivel->existe($plantel->id) ? 'checked' : ''); ?>
>
<label class="form-check-label" for="<?php echo e($plantel->id); ?>">
<?php echo e($plantel->name); ?>
</label>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="mb-3">
<label for="status">Seleccionar status</label>
<select class="form-control" name="status" id="status" value="<?php echo e($nivel->status); ?>">
<option value="1" <?php echo e($nivel->status=='1' ? 'selected' : ''); ?>>Activo</option>
<option value="0" <?php echo e($nivel->status=='0' ? 'selected' : ''); ?>>Inactivo</option>
</select>
</div>
<input class="btn btn-primary" type="submit" value="Update">
</form>
</div>
</div>
</div>
<?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/nivel/edit.blade.php ENDPATH**/ ?>
@@ -0,0 +1,70 @@
<?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">
<h6 class="m-0 font-weight-bold text-primary">Documentación</h6>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('documentoTipo.create')): ?>
<a href="<?php echo e(route('documentotipo.create')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Crear documentación</a>
<?php endif; ?>
</div>
</div>
<div class="card-body">
<div class="container-fluid">
<table id="tcont" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
<thead>
<tr>
<th>Id</th>
<th>Nombre</th>
<th>row</th>
</tr>
</thead>
<tbody>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $documentotipos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr style="width:100%">
<td><?php echo e($row->id); ?></td>
<td><a href="<?php echo e(route('documentotipo.show',$row->id)); ?>"><?php echo e($row->name); ?></a></td>
<td class="row mx-auto">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('documentoTipo.edit')): ?>
<div class="col-sm-6 col-md-6"><a class="btn btn-primary" href="<?php echo e(route('documentotipo.edit',$row->id)); ?>">Edit</a></div>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('documentoTipo.destroy')): ?>
<div class="col-sm-6 col-md-6">
<form class="delete-form" action="<?php echo e(route('documentotipo.destroy',$row->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): ?>
<p>Sin documentación.</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</tbody>
</table>
</div>
</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(); ?>
<?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/documento/index.blade.php ENDPATH**/ ?>
@@ -54,6 +54,10 @@
<a class="collapse-item" href="<?php echo e(route('nivel.index')); ?>" style="color:#85888e">Niveles</a>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('documentoTipo.index')): ?>
<a class="collapse-item" href="<?php echo e(route('documentotipo.index')); ?>" style="color:#85888e">Documentación</a>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('permission.index')): ?>
<a class="collapse-item" href="<?php echo e(route('permission.index')); ?>" style="color:#85888e">Permisos</a>
<?php endif; ?>
@@ -0,0 +1,70 @@
<?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">
<h6 class="m-0 font-weight-bold text-primary">Niveles</h6>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('nivel.create')): ?>
<a href="<?php echo e(route('nivel.create')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Crear nivel</a>
<?php endif; ?>
</div>
</div>
<div class="card-body">
<div class="container-fluid">
<table id="tcont" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
<thead>
<tr>
<th>Id</th>
<th>Titulo</th>
<th>Opciones</th>
</tr>
</thead>
<tbody>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $nivels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nivel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr style="width:100%">
<td><?php echo e($nivel->id); ?></td>
<td><a href="<?php echo e(route('nivel.show',$nivel->id)); ?>"><?php echo e($nivel->name); ?></a></td>
<td class="row mx-auto">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('nivel.edit')): ?>
<div class="col-sm-6 col-md-6"><a class="btn btn-primary" href="<?php echo e(route('nivel.edit',$nivel->id)); ?>">Edit</a></div>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('nivel.destroy')): ?>
<div class="col-sm-6 col-md-6">
<form class="delete-form" action="<?php echo e(route('nivel.destroy',$nivel->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): ?>
<p>Sin niveles.</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</tbody>
</table>
</div>
</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(); ?>
<?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/nivel/index.blade.php ENDPATH**/ ?>
@@ -0,0 +1,39 @@
<div class="card p-4">
<h4>Configurar documentos por nivel</h4>
<div class="mb-3">
<label>Nivel</label>
<select class="form-control" wire:model="nivelSeleccionado">
<option value="">Seleccione</option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $niveles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nivel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($nivel->id); ?>"><?php echo e($nivel->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</select>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($nivelSeleccionado): ?>
<div class="mb-3">
<label>Documentos requeridos</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $documentos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div>
<input type="checkbox"
value="<?php echo e($doc->id); ?>"
wire:model="documentosSeleccionados">
<?php echo e($doc->nombre); ?>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<button class="btn btn-success" wire:click="guardar">
Guardar configuración
</button>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php /**PATH C:\proyectos\primeros\sistemaEducativo\resources\views/livewire/admin/nivel-documentos.blade.php ENDPATH**/ ?>
@@ -0,0 +1,89 @@
<?php $__env->startSection('title',"Edit"); ?>
<?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">
<h6 class="m-0 font-weight-bold text-primary">Editar documentación</h6>
<a href="<?php echo e(route('documentotipo.index')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('info')): ?>
<div class="alert alert-success">
<strong><?php echo e(session('info')); ?></strong>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<form action="<?php echo e(route('documentotipo.update',$documentotipo->id)); ?>" method="POST">
<?php echo method_field('PUT'); ?>
<?php echo csrf_field(); ?>
<div class="mb-3">
<label>Nombre</label>
<input type="text" name="name" class="form-control" value="<?php echo e($documentotipo->name); ?>" required>
</div>
<div class="mb-3">
<label>Slug</label>
<input type="text" name="slug" class="form-control" value="<?php echo e($documentotipo->slug); ?>" required>
</div>
<div class="mb-3">
<label>Extensiones permitidas</label>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="pdf" class="form-check-input cb" <?php echo e(in_array('pdf', $documentotipo->extensiones ?? []) ? 'checked' : ''); ?>>
PDF
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="jpg" class="form-check-input cb" <?php echo e(in_array('jpg', $documentotipo->extensiones ?? []) ? 'checked' : ''); ?>>
JPG
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="png" class="form-check-input cb" <?php echo e(in_array('png', $documentotipo->extensiones ?? []) ? 'checked' : ''); ?>>
PNG
</label>
</div>
</div>
<div class="mb-3">
<label>Niveles a impartir</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $nivels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nivel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="form-check">
<input type="checkbox" class="form-check-input cb"
id="n-<?php echo e($nivel->id); ?>"
name="nivels[]" value="<?php echo e($nivel->id); ?>"
<?php echo e($documentotipo->niveles->contains($nivel->id) ? 'checked' : ''); ?>
>
<label class="form-check-label" for="n-<?php echo e($nivel->id); ?>">
<?php echo e($nivel->name); ?>
</label>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<input class="btn btn-primary" type="submit" value="Actualizar">
</form>
</div>
</div>
</div>
<?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/documento/edit.blade.php ENDPATH**/ ?>
@@ -0,0 +1,5 @@
<?php $__env->startSection('title', __('Page Expired')); ?>
<?php $__env->startSection('code', '419'); ?>
<?php $__env->startSection('message', __('Page Expired')); ?>
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\proyectos\primeros\sistemaEducativo\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions/views/419.blade.php ENDPATH**/ ?>
@@ -0,0 +1,95 @@
<?php $__env->startSection('title',"Crear"); ?>
<?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">
<h6 class="m-0 font-weight-bold text-primary">Crear documentación</h6>
<a href="<?php echo e(route('documentotipo.index')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
<h3>Crear tipo de documento</h3>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('success')): ?>
<div class="alert alert-success">
<?php echo e(session('success')); ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<form method="POST" action="<?php echo e(route('documentotipo.store')); ?>">
<?php echo csrf_field(); ?>
<div class="mb-3">
<label>Nombre</label>
<input type="text" name="name" class="form-control" required>
</div>
<div class="mb-3">
<label>Slug</label>
<input type="text" name="slug" class="form-control" required>
</div>
<div class="mb-3">
<label>Extensiones permitidas</label>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="pdf" class="form-check-input cb">
PDF
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="jpg" class="form-check-input cb">
JPG
</label>
</div>
<div class="form-check">
<label>
<input type="checkbox" name="extensiones[]" value="png" class="form-check-input cb">
PNG
</label>
</div>
</div>
<div class="mb-3">
<label>Niveles a impartir</label>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $nivels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nivel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="form-check">
<input type="checkbox" class="form-check-input cb"
id="n-<?php echo e($nivel->id); ?>"
name="nivels[]" value="<?php echo e($nivel->id); ?>"
>
<label class="form-check-label" for="n-<?php echo e($nivel->id); ?>">
<?php echo e($nivel->name); ?>
</label>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<button class="btn btn-primary">Guardar</button>
</form>
</div>
</div>
</div>
<?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/Documento/create.blade.php ENDPATH**/ ?>
@@ -0,0 +1,86 @@
<?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">
<h6 class="m-0 font-weight-bold text-primary">Horarios</h6>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('horario.create')): ?>
<a href="<?php echo e(route('horario.create')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Asignar horarios a colaborador</a>
<?php endif; ?>
</div>
</div>
<div class="card-body">
<div class="container-fluid">
<table id="tcont" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
<thead>
<tr>
<th>Id</th>
<th>Colaborador</th>
<th>Campus</th>
<th>Opciones</th>
</tr>
</thead>
<tbody>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $usuarios; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $usuario): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr style="width:100%">
<td><?php echo e($usuario->id); ?></td>
<td><a href="<?php echo e(route('horario.show',$usuario->id)); ?>"><?php echo e($usuario->name); ?></a></td>
<td>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_2 = true; $__currentLoopData = $usuario->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; ?>
</td>
<td class="row mx-auto">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('horario.edit')): ?>
<div class="col-sm-6 col-md-6"><a class="btn btn-primary" href="<?php echo e(route('horario.edit',$usuario->id)); ?>">Edit</a></div>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('horario.destroy')): ?>
<div class="col-sm-6 col-md-6">
<form class="delete-form" action="<?php echo e(route('horario.destroy',$usuario->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): ?>
<p>Sin horarios cargados.</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</tbody>
</table>
</div>
</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(); ?>
<?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/horario/index.blade.php ENDPATH**/ ?>
@@ -0,0 +1,85 @@
<?php $__env->startSection('title',"Crear"); ?>
<?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">
<h6 class="m-0 font-weight-bold text-primary">Editar horario</h6>
<a href="<?php echo e(route('horario.index')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
<form action="<?php echo e(route('horario.store')); ?>" method="POST">
<?php echo csrf_field(); ?>
<div class="mb-3">
<label for="user_id">Seleccionar Colaborador</label>
<select class="form-control" name="user_id" id="user_id">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $usuarios; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($user->id); ?>"><?php echo e($user->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</select>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $dias; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $dia): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="mb-3 row">
<div class="col-md-3">
<label class="small">Día</label>
<input class="form-control"
name="horarios[<?php echo e($index); ?>][dia]"
value="<?php echo e($dia->translatedFormat('l')); ?>"
readonly>
</div>
<div class="col-md-8">
<div class="row">
<div class="col-md-3">
<label class="small">Entrada</label>
<input class="form-control" type="time"
name="horarios[<?php echo e($index); ?>][entrada]">
</div>
<div class="col-md-3">
<label class="small">Comida salida</label>
<input class="form-control" type="time"
name="horarios[<?php echo e($index); ?>][comida_salida]">
</div>
<div class="col-md-3">
<label class="small">Comida regreso</label>
<input class="form-control" type="time"
name="horarios[<?php echo e($index); ?>][comida_regreso]">
</div>
<div class="col-md-3">
<label class="small">Salida</label>
<input class="form-control" type="time"
name="horarios[<?php echo e($index); ?>][salida]">
</div>
</div>
</div>
<div class="col-md-1">
<input type="checkbox"
name="horarios[<?php echo e($index); ?>][activo]"
value="1">
<label class="small pt-5">Activo</label>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<input class="btn btn-primary" type="submit" value="Guardar">
</form>
</div>
</div>
</div>
<?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/horario/create.blade.php ENDPATH**/ ?>
@@ -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,10 +54,9 @@
</button>
</div>
<div class="modal-body">
<?php
$pendientes = collect(['curp','acta','comprobante'])->filter(function($tipo) {
$doc = $documentosPorTipo[$tipo] ?? null;
$pendientes = $tiposDocumentos->filter(function($tipo) {
$doc = $this->documentosPorTipo[$tipo->slug] ?? null;
return !$doc || $doc->status == 2;
});
?>
@@ -30,99 +69,62 @@
<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['curp'] ?? null;
$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-3">
<label class="small mb-1">CURP:</label>
<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"> Rechazado</span>
<span class="badge bg-danger ms-2">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">
<div class="d-flex align-items-center gap-2 mt-2">
<label for="curp" class="btn btn-outline-primary btn-sm">
<input type="file"
id="<?php echo e($tipo->slug); ?>"
wire:model="archivos.<?php echo e($tipo->slug); ?>"
class="d-none">
<label for="<?php echo e($tipo->slug); ?>" 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; ?>
<?php
$doc = $documentosPorTipo['acta'] ?? 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">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; ?>
<?php
$doc = $documentosPorTipo['comprobante'] ?? 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">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; ?>
<div class="custom-file-upload" wire:ignore>
<input type="file" id="comprobante" hidden
onchange="updateFileName(this, 'comprobante-name')"
wire:model="comprobante">
<label for="comprobante" class="btn btn-outline-primary btn-sm">
📄 Seleccionar archivo
</label>
<span id="comprobante-name" class="ml-2 text-muted">
Ningún archivo seleccionado
<span class="text-muted small">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(isset($archivos[$tipo->slug])): ?>
&nbsp;&nbsp;&nbsp; <?php echo e($archivos[$tipo->slug]->getClientOriginalName()); ?>
<?php else: ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</span>
</div>
</div>
<?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>
</div>
</div>
</div>
</div>
</div>
<?php /**PATH C:\proyectos\primeros\sistemaEducativo\resources\views/livewire/documentos.blade.php ENDPATH**/ ?>
@@ -0,0 +1,106 @@
<?php $__env->startSection('title',"Edit"); ?>
<?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">
<h6 class="m-0 font-weight-bold text-primary">Editar horario</h6>
<a href="<?php echo e(route('horario.index')); ?>" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Regresar</a>
</div>
</div>
<div class="card-body">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('info')): ?>
<div class="alert alert-success">
<strong><?php echo e(session('info')); ?></strong>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<form action="<?php echo e(route('horario.update', $user->id)); ?>" method="POST">
<?php echo csrf_field(); ?>
<?php echo method_field('PUT'); ?>
<div class="mb-3">
<label for="user_id">Seleccionar Colaborador</label>
<select class="form-control" name="user_id" id="user_id">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $usuarios; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $usuario): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($usuario->id); ?>"
<?php echo e($usuario->id == $user->id ? 'selected' : ''); ?>>
<?php echo e($usuario->name); ?>
</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</select>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $dias; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $dia): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$nombreDia = strtolower($dia->translatedFormat('l'));
$horario = $horarios[$nombreDia] ?? null;
?>
<div class="mb-3 row">
<div class="col-md-3">
<label class="small">Día</label>
<input class="form-control"
name="horarios[<?php echo e($index); ?>][dia]"
value="<?php echo e($nombreDia); ?>"
readonly>
</div>
<div class="col-md-2">
<label class="small">Entrada</label>
<input class="form-control"
type="time"
name="horarios[<?php echo e($index); ?>][entrada]"
value="<?php echo e($horario->entrada ?? ''); ?>">
</div>
<div class="col-md-2">
<label class="small">Comida salida</label>
<input class="form-control"
type="time"
name="horarios[<?php echo e($index); ?>][comida_salida]"
value="<?php echo e($horario->comidas ?? ''); ?>">
</div>
<div class="col-md-2">
<label class="small">Comida regreso</label>
<input class="form-control"
type="time"
name="horarios[<?php echo e($index); ?>][comida_regreso]"
value="<?php echo e($horario->comidar ?? ''); ?>">
</div>
<div class="col-md-2">
<label class="small">Salida</label>
<input class="form-control"
type="time"
name="horarios[<?php echo e($index); ?>][salida]"
value="<?php echo e($horario->salida ?? ''); ?>">
</div>
<div class="col-md-1">
<input type="checkbox"
name="horarios[<?php echo e($index); ?>][activo]"
value="1"
<?php echo e(isset($horario) && $horario->status ? 'checked' : ''); ?>>
<label class="small">Activo</label>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<input class="btn btn-primary" type="submit" value="Actualizar">
</form>
</div>
</div>
</div>
<?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/horario/edit.blade.php ENDPATH**/ ?>
@@ -37,45 +37,6 @@
<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>