reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
@@ -0,0 +1,22 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class AssignmentOverviewResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'classSections' => AssignmentSectionResource::collection(collect($this->classSections ?? [])),
'schoolYears' => $this->schoolYears ?? [],
'schoolYear' => $this->schoolYear ?? null,
'selectedYear' => $this->selectedYear ?? null,
'selectedSemester' => $this->selectedSemester ?? null,
'semester' => $this->semester ?? null,
'current_school_year' => $this->current_school_year ?? null,
];
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class AssignmentSectionResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'class_section_id' => $this['class_section_id'] ?? null,
'class_section_name' => $this['class_section_name'] ?? '',
'main_teachers' => $this['main_teachers'] ?? [],
'teacher_assistants' => $this['teacher_assistants'] ?? [],
'students' => $this['students'] ?? [],
'semester' => $this['semester'] ?? '',
'school_year' => $this['school_year'] ?? '',
'description' => $this['description'] ?? '',
];
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Resources\Attendance;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class AdminAttendanceResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'semester' => $this['semester'] ?? null,
'school_year' => $this['school_year'] ?? null,
'date' => $this['date'] ?? null,
'admins_grid' => $this['admins_grid'] ?? [],
];
}
}
@@ -0,0 +1,26 @@
<?php
namespace App\Http\Resources\Attendance;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class DailyAttendanceResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'attendance_data' => $this['attendanceData'] ?? [],
'attendance_record' => $this['attendanceRecord'] ?? [],
'students_by_section' => $this['studentsBySection'] ?? [],
'grades' => $this['grades'] ?? [],
'dates_by_section' => $this['datesBySection'] ?? [],
'date_list' => $this['dateList'] ?? [],
'no_school_days' => $this['noSchoolDays'] ?? [],
'total_passed_days' => $this['totalPassedDays'] ?? 0,
'semester' => $this['semester'] ?? null,
'school_year' => $this['schoolYear'] ?? ($this['school_year'] ?? null),
'current_admin_name' => $this['currentAdminName'] ?? null,
];
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Http\Resources\Attendance;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class StaffMonthResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'filters' => $this['filters'] ?? [],
'sundays' => $this['sundays'] ?? [],
'no_school_days' => $this['noSchoolDays'] ?? [],
'sections' => $this['sections'] ?? [],
'admins' => $this['admins'] ?? [],
];
}
}
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Resources\Attendance;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class TeacherAttendanceFormResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'teacher_name' => $this['teacher_name'] ?? null,
'students' => $this['students'] ?? [],
'teachers' => $this['teachers'] ?? [],
'class_section_id' => $this['class_section_id'] ?? null,
'sunday_dates' => $this['sunday_dates'] ?? [],
'current_sunday' => $this['current_sunday'] ?? null,
'enable_attendance' => $this['enable_attendance'] ?? null,
'can_edit' => (bool)($this['can_edit'] ?? false),
'class_id' => $this['class_id'] ?? null,
'no_school_days' => $this['no_school_days'] ?? [],
'today' => $this['today'] ?? null,
'locked_by_student' => $this['locked_by_student'] ?? [],
];
}
}
@@ -0,0 +1,22 @@
<?php
namespace App\Http\Resources\Attendance;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class TeacherGridResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'semester' => $this['semester'] ?? null,
'school_year' => $this['school_year'] ?? null,
'date' => $this['date'] ?? null,
'class_section_id' => $this['class_section_id'] ?? null,
'sections' => $this['sections'] ?? [],
'grid' => $this['grid'] ?? [],
'locked' => (bool)($this['locked'] ?? false),
];
}
}