fix teacher and parent routes

This commit is contained in:
root
2026-04-24 02:12:01 -04:00
parent 5128c74892
commit 7216cb2885
36 changed files with 1575 additions and 49 deletions
@@ -11,6 +11,7 @@ use App\Http\Resources\Incidents\IncidentAnalysisStudentResource;
use App\Http\Resources\Incidents\IncidentGradeResource;
use App\Http\Resources\Incidents\IncidentResource;
use App\Http\Resources\Incidents\IncidentStudentOptionResource;
use App\Models\Configuration;
use App\Services\Incidents\CurrentIncidentService;
use App\Services\Incidents\IncidentAnalysisService;
use App\Services\Incidents\IncidentHistoryService;
@@ -39,6 +40,19 @@ class IncidentController extends BaseApiController
]);
}
public function formMeta(): JsonResponse
{
$data = $this->currentService->listCurrent();
return response()->json([
'ok' => true,
'incidents' => IncidentResource::collection($data['incidents']),
'grades' => IncidentGradeResource::collection($data['grades']),
'school_year' => Configuration::getConfig('school_year'),
'semester' => Configuration::getConfig('semester'),
]);
}
public function history(IncidentListRequest $request): JsonResponse
{
$payload = $request->validated();