feat: add complete EnCoach frontend application
Full React 18 + TypeScript + Vite frontend with: - 90+ pages (admin, student, teacher, public) - shadcn/ui component library with 50+ components - JWT authentication with role-based access control - TanStack React Query for server state management - 30+ API service modules - AI-powered features (coaching, grading, generation) - Adaptive learning UI (diagnostics, proficiency, plans) - Institutional LMS management (courses, batches, timetable) - Communication suite (discussions, announcements, DMs) - Full CRUD with validation and confirmation dialogs Made-with: Cursor
This commit is contained in:
33
src/hooks/queries/useFees.ts
Normal file
33
src/hooks/queries/useFees.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { queryKeys } from "./keys";
|
||||
import { feesService } from "@/services/fees.service";
|
||||
import type { PaginationParams } from "@/types";
|
||||
|
||||
export function useFeesPlans(params?: PaginationParams) {
|
||||
return useQuery({
|
||||
queryKey: queryKeys.feesPlans.list(params),
|
||||
queryFn: () => feesService.listFeesPlans(params),
|
||||
});
|
||||
}
|
||||
|
||||
export function useFeesPlan(id: number) {
|
||||
return useQuery({
|
||||
queryKey: queryKeys.feesPlans.detail(id),
|
||||
queryFn: () => feesService.getFeesPlan(id),
|
||||
enabled: !!id,
|
||||
});
|
||||
}
|
||||
|
||||
export function useStudentFees(params?: PaginationParams) {
|
||||
return useQuery({
|
||||
queryKey: queryKeys.studentFees.list(params),
|
||||
queryFn: () => feesService.listStudentFees(params),
|
||||
});
|
||||
}
|
||||
|
||||
export function useFeesTerms(params?: PaginationParams) {
|
||||
return useQuery({
|
||||
queryKey: queryKeys.feesTerms.list(params),
|
||||
queryFn: () => feesService.listFeesTerms(params),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user