Desarrollo del modulo de alumno y control escolar para subir archivos de expediente

This commit is contained in:
2026-03-26 17:36:09 -06:00
parent 1bcebeb8a1
commit 3061a64418
137 changed files with 7234 additions and 57 deletions
+59 -10
View File
@@ -3,21 +3,22 @@
namespace App\Livewire;
use App\Models\Alumno;
use App\Models\Pago;
use App\Models\Plan;
use App\Models\Campan;
use App\Models\Concepto;
use App\Models\Documento;
use App\Models\Medio;
use App\Models\Nivel;
use App\Models\Pago;
use App\Models\Plan;
use App\Models\Plane;
use App\Models\Turno;
use App\Models\Campan;
use App\Models\Plantel;
use Livewire\Component;
use App\Models\Concepto;
use Livewire\Attributes\On;
use Illuminate\Validation\Rule;
use App\Models\Role;
use App\Models\Turno;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
use Livewire\Attributes\On;
use Livewire\Component;
class DataProspecto extends Component
{
@@ -53,7 +54,9 @@ class DataProspecto extends Component
public $active = "disabled";
public $prospecto = null;
public $prospecto;
public $documentoSeleccionado;
public function failedValidation(ValidationException $e)
{
@@ -69,6 +72,52 @@ class DataProspecto extends Component
throw $e;
}
#[On('set-documento')]
public function setDocumento($id)
{
$this->documentoSeleccionado = $id;
}
public function aprobarDocumento()
{
if (!$this->documentoSeleccionado) return;
Documento::where('id', $this->documentoSeleccionado)
->update(['status' => 1]);
$this->dispatch('cerrar-modal');
$this->dispatch('swal',
icon: 'success',
title: 'Validádo',
text: 'notificado',
timer: 2000,
confirm: false,
closeModal: true
);
$this->prospecto->refresh();
}
public function rechazarDocumento()
{
if (!$this->documentoSeleccionado) return;
Documento::where('id', $this->documentoSeleccionado)
->update(['status' => 2]);
$this->dispatch('cerrar-modal');
$this->dispatch('swal',
icon: 'error',
title: 'Rechazado',
text: 'notificado',
timer: 2000,
confirm: false,
closeModal: true
);
$this->prospecto->refresh();
}
public function updatedPplantels()
{
$this->selectedNivel = null;
@@ -219,7 +268,7 @@ class DataProspecto extends Component
$this->pname = $user->name;
$this->papellidoPaterno = $user->apellidoPaterno;
$this->papellidoMaterno = $user->apellidoPaterno;
$this->papellidoMaterno = $user->apellidoMaterno;
$this->pemail = $user->email;
$this->ptelefono = $user->telefono;
$this->pdireccion = $user->direccion;