Se crean las especificaciones de los documentos a requerir por nivel, a su vez permitir al alumno subirlos
@@ -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');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Livewire;
|
namespace App\Livewire;
|
||||||
|
|
||||||
use App\Models\Alumno;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Livewire\Attributes\On;
|
use Livewire\Attributes\On;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
@@ -12,13 +11,10 @@ class Documentos extends Component
|
|||||||
{
|
{
|
||||||
use WithFileUploads;
|
use WithFileUploads;
|
||||||
|
|
||||||
public $curp;
|
public $archivos = [];
|
||||||
public $acta;
|
|
||||||
public $comprobante;
|
|
||||||
public $user;
|
|
||||||
|
|
||||||
public $alumno;
|
public $alumno;
|
||||||
public $documentosPorTipo = [];
|
public $documentosPorTipo = [];
|
||||||
|
public $tiposDocumentos = [];
|
||||||
|
|
||||||
#[On('documentos')]
|
#[On('documentos')]
|
||||||
public function documentos()
|
public function documentos()
|
||||||
@@ -27,73 +23,76 @@ class Documentos extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function cargarDocumentos()
|
public function cargarDocumentos()
|
||||||
{
|
{
|
||||||
$this->alumno = Auth::user()->alumnos()->first();
|
$this->alumno = Auth::user()
|
||||||
|
->alumnos()
|
||||||
|
->with('nivelRel.documentosRequeridos')
|
||||||
|
->first();
|
||||||
|
|
||||||
if ($this->alumno) {
|
if ($this->alumno) {
|
||||||
$this->documentosPorTipo = $this->alumno
|
|
||||||
->documentos()
|
$this->documentosPorTipo = $this->alumno
|
||||||
->get()
|
->documentos()
|
||||||
->keyBy('tipo');
|
->get()
|
||||||
|
->keyBy('tipo');
|
||||||
|
|
||||||
|
$this->tiposDocumentos = $this->alumno->nivelRel
|
||||||
|
? $this->alumno->nivelRel->documentosRequeridos
|
||||||
|
: collect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function store()
|
public function store()
|
||||||
{
|
{
|
||||||
|
if (!$this->alumno) {
|
||||||
$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) {
|
|
||||||
abort(404, 'Alumno no encontrado');
|
abort(404, 'Alumno no encontrado');
|
||||||
}
|
}
|
||||||
|
|
||||||
$tipos = ['curp', 'acta', 'comprobante'];
|
$rules = [];
|
||||||
|
|
||||||
foreach ($tipos as $tipo) {
|
foreach ($this->tiposDocumentos as $tipo) {
|
||||||
|
$rules["archivos.{$tipo->slug}"] =
|
||||||
if ($this->$tipo) {
|
'nullable|file|mimes:' . implode(',', $tipo->extensiones);
|
||||||
|
|
||||||
$ruta = $this->$tipo->store('documentos', 'public');
|
|
||||||
|
|
||||||
$alumno->documentos()->updateOrCreate(
|
|
||||||
['tipo' => $tipo],
|
|
||||||
[
|
|
||||||
'archivo' => $ruta,
|
|
||||||
'status' => 0
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 🔥 recargar correctamente
|
$this->validate($rules);
|
||||||
$this->cargarDocumentos();
|
|
||||||
|
|
||||||
$this->reset(['curp', 'acta', 'comprobante']);
|
foreach ($this->tiposDocumentos as $tipo) {
|
||||||
|
|
||||||
$this->dispatch('close-documentos-modal');
|
if (isset($this->archivos[$tipo->slug])) {
|
||||||
|
|
||||||
$this->dispatch('swal',
|
$ruta = $this->archivos[$tipo->slug]->store('documentos', 'public');
|
||||||
icon: 'success',
|
|
||||||
title: 'Éxito!',
|
$this->alumno->documentos()->updateOrCreate(
|
||||||
text: 'Documentos cargados',
|
['tipo' => $tipo->slug],
|
||||||
timer: 2000,
|
[
|
||||||
confirm: false,
|
'archivo' => $ruta,
|
||||||
closeModal: true,
|
'status' => 0
|
||||||
reload: 2000
|
]
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->cargarDocumentos();
|
||||||
|
|
||||||
|
$this->reset('archivos');
|
||||||
|
|
||||||
|
$this->dispatch('close-documentos-modal');
|
||||||
|
|
||||||
|
$this->dispatch('swal',
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Éxito!',
|
||||||
|
text: 'Documentos cargados',
|
||||||
|
timer: 2000,
|
||||||
|
confirm: false,
|
||||||
|
closeModal: true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->cargarDocumentos();
|
$this->cargarDocumentos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,4 +32,14 @@ class Nivel extends Model
|
|||||||
->wherePivot('plantel_id', $plantelId)
|
->wherePivot('plantel_id', $plantelId)
|
||||||
->exists();
|
->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');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -28,5 +28,6 @@ class DatabaseSeeder extends Seeder
|
|||||||
$this->call(ConceptoSeeder::class);
|
$this->call(ConceptoSeeder::class);
|
||||||
$this->call(MaterialSeeder::class);
|
$this->call(MaterialSeeder::class);
|
||||||
$this->call(GrupoSeeder::class);
|
$this->call(GrupoSeeder::class);
|
||||||
|
$this->call(DocumentoTipoSeeder::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'])],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -135,5 +135,10 @@ class RoleSeeder extends Seeder
|
|||||||
Permission::create(['name'=>'docente.create','description'=>'Crear docentes'])->syncRoles([$role1,$role6]);
|
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.edit','description'=>'Editar docentes'])->syncRoles([$role1,$role6]);
|
||||||
Permission::create(['name'=>'docente.destroy','description'=>'Eliminar 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
|
||||||
@@ -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
|
||||||
@@ -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>
|
<a class="collapse-item" href="{{ route('nivel.index') }}" style="color:#85888e">Niveles</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@can('documentoTipo.index')
|
||||||
|
<a class="collapse-item" href="{{ route('documentotipo.index') }}" style="color:#85888e">Documentación</a>
|
||||||
|
@endcan
|
||||||
|
|
||||||
@can('permission.index')
|
@can('permission.index')
|
||||||
<a class="collapse-item" href="{{ route('permission.index') }}" style="color:#85888e">Permisos</a>
|
<a class="collapse-item" href="{{ route('permission.index') }}" style="color:#85888e">Permisos</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|||||||
@@ -199,17 +199,23 @@
|
|||||||
<h5>Expediente del alumno</h5>
|
<h5>Expediente del alumno</h5>
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$tipos = ['curp', 'acta', 'comprobante','certificadoPrepa','certificadoLicenciatura'];
|
$nivel = $prospecto->nivelRel ?? null;
|
||||||
|
|
||||||
|
$tipos = $nivel
|
||||||
|
? $nivel->documentosRequeridos
|
||||||
|
: collect();
|
||||||
|
|
||||||
$documentos = collect($prospecto?->documentos)->keyBy('tipo');
|
$documentos = collect($prospecto?->documentos)->keyBy('tipo');
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@foreach($tipos as $tipo)
|
@foreach($tipos as $tipo)
|
||||||
@php
|
|
||||||
$doc = $documentos[$tipo] ?? null;
|
@php
|
||||||
@endphp
|
$doc = $documentos[$tipo->slug] ?? null;
|
||||||
|
@endphp
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<strong>{{ strtoupper($tipo) }}</strong> :
|
<strong>{{ strtoupper($tipo->name) }}</strong> :
|
||||||
|
|
||||||
@if($doc)
|
@if($doc)
|
||||||
|
|
||||||
@@ -239,6 +245,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
|
|||||||
@@ -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
|
<div wire:ignore.self
|
||||||
class="modal fade"
|
class="modal fade"
|
||||||
id="exampleModal"
|
id="exampleModal"
|
||||||
@@ -14,114 +54,75 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
@php
|
||||||
|
$pendientes = $tiposDocumentos->filter(function($tipo) {
|
||||||
|
$doc = $this->documentosPorTipo[$tipo->slug] ?? null;
|
||||||
|
return !$doc || $doc->status == 2;
|
||||||
|
});
|
||||||
|
@endphp
|
||||||
|
|
||||||
@php
|
@if($pendientes->isEmpty())
|
||||||
$pendientes = collect(['curp','acta','comprobante'])->filter(function($tipo) {
|
<div class="alert alert-success">
|
||||||
$doc = $documentosPorTipo[$tipo] ?? null;
|
✔ Todos los documentos están validados
|
||||||
return !$doc || $doc->status == 2;
|
</div>
|
||||||
});
|
@endif
|
||||||
@endphp
|
|
||||||
|
|
||||||
@if($pendientes->isEmpty())
|
<form wire:submit.prevent="store" enctype="multipart/form-data">
|
||||||
<div class="alert alert-success">
|
|
||||||
✔ Todos los documentos están validados
|
@foreach($tiposDocumentos as $tipo)
|
||||||
</div>
|
|
||||||
|
@php
|
||||||
|
$doc = $documentosPorTipo[$tipo->slug] ?? null;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if(!$doc || $doc->status == 2)
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
|
||||||
|
<label class="fw-bold">{{ $tipo->name }}</label>
|
||||||
|
|
||||||
|
@if($doc && $doc->status == 2)
|
||||||
|
<span class="badge bg-danger ms-2">Rechazado</span>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form wire:submit.prevent="store" enctype="multipart/form-data">
|
<div class="d-flex align-items-center gap-2 mt-2">
|
||||||
|
|
||||||
@php
|
{{-- input oculto --}}
|
||||||
$doc = $documentosPorTipo['curp'] ?? null;
|
<input type="file"
|
||||||
@endphp
|
id="{{ $tipo->slug }}"
|
||||||
|
wire:model="archivos.{{ $tipo->slug }}"
|
||||||
|
class="d-none">
|
||||||
|
|
||||||
@if(!$doc || $doc->status == 2)
|
{{-- botón bonito --}}
|
||||||
<div class="mb-3">
|
<label for="{{ $tipo->slug }}" class="btn btn-outline-primary btn-sm">
|
||||||
<label class="small mb-1">CURP:</label>
|
📄 Seleccionar archivo
|
||||||
|
</label>
|
||||||
|
|
||||||
|
{{-- nombre dinámico --}}
|
||||||
|
<span class="text-muted small">
|
||||||
|
@if(isset($archivos[$tipo->slug]))
|
||||||
|
{{ $archivos[$tipo->slug]->getClientOriginalName() }}
|
||||||
|
@else
|
||||||
|
|
||||||
@if($doc && $doc->status == 2)
|
|
||||||
<span class="badge bg-danger">❌ Rechazado</span>
|
|
||||||
@endif
|
@endif
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="custom-file-upload" wire:ignore>
|
</div>
|
||||||
<input type="file" id="curp" hidden
|
|
||||||
onchange="updateFileName(this, 'curp-name')"
|
|
||||||
wire:model="curp">
|
|
||||||
|
|
||||||
<label for="curp" class="btn btn-outline-primary btn-sm">
|
</div>
|
||||||
📄 Seleccionar archivo
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<span id="curp-name" class="ml-2 text-muted">
|
@endif
|
||||||
Ningún archivo seleccionado
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{{-- acta --}}
|
@endforeach
|
||||||
@php
|
|
||||||
$doc = $documentosPorTipo['acta'] ?? null;
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
@if(!$doc || $doc->status == 2)
|
<button class="btn btn-primary" type="submit">Subir</button>
|
||||||
<div class="mb-3">
|
|
||||||
<label class="small mb-1">Acta:</label>
|
|
||||||
|
|
||||||
@if($doc && $doc->status == 2)
|
</form>
|
||||||
<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
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
<button class="btn btn-primary" type="submit">Subir</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -39,45 +39,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<h5>Expediente</h5>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use App\Http\Controllers\ChatController;
|
|||||||
use App\Http\Controllers\CodeController;
|
use App\Http\Controllers\CodeController;
|
||||||
use App\Http\Controllers\ConceptoController;
|
use App\Http\Controllers\ConceptoController;
|
||||||
use App\Http\Controllers\DocumentoController;
|
use App\Http\Controllers\DocumentoController;
|
||||||
|
use App\Http\Controllers\DocumentoTipoController;
|
||||||
use App\Http\Controllers\DurationController;
|
use App\Http\Controllers\DurationController;
|
||||||
use App\Http\Controllers\GrupoController;
|
use App\Http\Controllers\GrupoController;
|
||||||
use App\Http\Controllers\HorarioController;
|
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::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::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}', 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('/duration',DurationController::class);
|
||||||
Route::resource('/grupo', GrupoController::class);
|
Route::resource('/grupo', GrupoController::class);
|
||||||
Route::get('/horario', [HorarioController::class, 'index'])->name('horario.index');
|
Route::get('/horario', [HorarioController::class, 'index'])->name('horario.index');
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 716 KiB After Width: | Height: | Size: 716 KiB |
|
Before Width: | Height: | Size: 694 KiB After Width: | Height: | Size: 694 KiB |
|
Before Width: | Height: | Size: 694 KiB After Width: | Height: | Size: 694 KiB |
|
Before Width: | Height: | Size: 716 KiB |
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 275 KiB |
|
Before Width: | Height: | Size: 694 KiB After Width: | Height: | Size: 694 KiB |
|
After Width: | Height: | Size: 694 KiB |
@@ -203,17 +203,23 @@
|
|||||||
<h5>Expediente del alumno</h5>
|
<h5>Expediente del alumno</h5>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$tipos = ['curp', 'acta', 'comprobante','certificadoPrepa','certificadoLicenciatura'];
|
$nivel = $prospecto->nivelRel ?? null;
|
||||||
|
|
||||||
|
$tipos = $nivel
|
||||||
|
? $nivel->documentosRequeridos
|
||||||
|
: collect();
|
||||||
|
|
||||||
$documentos = collect($prospecto?->documentos)->keyBy('tipo');
|
$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 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;
|
<?php
|
||||||
?>
|
$doc = $documentos[$tipo->slug] ?? null;
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="mb-3">
|
<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): ?>
|
<?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; ?>
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php else: ?>
|
<?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>
|
<a class="collapse-item" href="<?php echo e(route('nivel.index')); ?>" style="color:#85888e">Niveles</a>
|
||||||
<?php endif; ?>
|
<?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')): ?>
|
<?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>
|
<a class="collapse-item" href="<?php echo e(route('permission.index')); ?>" style="color:#85888e">Permisos</a>
|
||||||
<?php endif; ?>
|
<?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
|
<div wire:ignore.self
|
||||||
class="modal fade"
|
class="modal fade"
|
||||||
id="exampleModal"
|
id="exampleModal"
|
||||||
@@ -14,115 +54,77 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<?php
|
||||||
|
$pendientes = $tiposDocumentos->filter(function($tipo) {
|
||||||
|
$doc = $this->documentosPorTipo[$tipo->slug] ?? null;
|
||||||
|
return !$doc || $doc->status == 2;
|
||||||
|
});
|
||||||
|
?>
|
||||||
|
|
||||||
<?php
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($pendientes->isEmpty()): ?>
|
||||||
$pendientes = collect(['curp','acta','comprobante'])->filter(function($tipo) {
|
<div class="alert alert-success">
|
||||||
$doc = $documentosPorTipo[$tipo] ?? null;
|
✔ Todos los documentos están validados
|
||||||
return !$doc || $doc->status == 2;
|
</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()): ?>
|
<form wire:submit.prevent="store" enctype="multipart/form-data">
|
||||||
<div class="alert alert-success">
|
|
||||||
✔ Todos los documentos están validados
|
<?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(); ?>
|
||||||
</div>
|
|
||||||
|
<?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; ?>
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||||
|
|
||||||
<form wire:submit.prevent="store" enctype="multipart/form-data">
|
<div class="d-flex align-items-center gap-2 mt-2">
|
||||||
|
|
||||||
<?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; ?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<input type="file"
|
||||||
$doc = $documentosPorTipo['acta'] ?? null;
|
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
|
<?php else: ?>
|
||||||
$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; ?>
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="custom-file-upload" wire:ignore>
|
</div>
|
||||||
<input type="file" id="comprobante" hidden
|
|
||||||
onchange="updateFileName(this, 'comprobante-name')"
|
|
||||||
wire:model="comprobante">
|
|
||||||
|
|
||||||
<label for="comprobante" class="btn btn-outline-primary btn-sm">
|
</div>
|
||||||
📄 Seleccionar archivo
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<span id="comprobante-name" class="ml-2 text-muted">
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||||
Ningún archivo seleccionado
|
|
||||||
</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>
|
<button class="btn btn-primary" type="submit">Subir</button>
|
||||||
</form>
|
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
<?php /**PATH C:\proyectos\primeros\sistemaEducativo\resources\views/livewire/documentos.blade.php ENDPATH**/ ?>
|
<?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>
|
<div>
|
||||||
<h5>Expediente</h5>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|||||||