fix teacher and parent routes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user