|
|
@@ -3,6 +3,7 @@ import { BASE_API_URL } from "@/config/api"; |
|
|
|
import { cache } from "react"; |
|
|
|
import "server-only"; |
|
|
|
import { NewTaskTemplateFormInputs } from "./actions"; |
|
|
|
import { Grade } from "../grades"; |
|
|
|
|
|
|
|
export interface TaskGroup { |
|
|
|
id: number; |
|
|
@@ -16,11 +17,23 @@ export interface Task { |
|
|
|
taskGroup: TaskGroup; |
|
|
|
} |
|
|
|
|
|
|
|
export interface TaskTemplateGradeAllocation { |
|
|
|
grade: Grade; |
|
|
|
percentage: number; |
|
|
|
} |
|
|
|
|
|
|
|
export interface TaskTemplateGroupAllocation { |
|
|
|
taskGroup: TaskGroup; |
|
|
|
percentage: number; |
|
|
|
} |
|
|
|
|
|
|
|
export interface TaskTemplate { |
|
|
|
id: number; |
|
|
|
code: string; |
|
|
|
name: string; |
|
|
|
tasks: Task[]; |
|
|
|
gradeAllocations: TaskTemplateGradeAllocation[]; |
|
|
|
groupAllocations: TaskTemplateGroupAllocation[]; |
|
|
|
} |
|
|
|
|
|
|
|
export const preloadTaskTemplates = () => { |
|
|
|