feat: create assignment form is klaar
This commit is contained in:
parent
05fa69f0c7
commit
db7c5409fc
8 changed files with 273 additions and 69 deletions
58
frontend/src/utils/tempData.ts
Normal file
58
frontend/src/utils/tempData.ts
Normal file
|
@ -0,0 +1,58 @@
|
|||
// TODO : temp data until frontend controllers are ready
|
||||
type Teacher = {
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
classes: Array<Class>;
|
||||
};
|
||||
|
||||
type Student = {
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
classes: Array<Class>;
|
||||
};
|
||||
|
||||
type Class = {
|
||||
id: string;
|
||||
displayName: string;
|
||||
teachers: Array<Teacher>;
|
||||
students: Array<Student>;
|
||||
};
|
||||
|
||||
const student01: Student = { username: "id01", firstName: "Mark", lastName: "Knopfler", classes: [] };
|
||||
const student02: Student = { username: "id02", firstName: "John", lastName: "Hiat", classes: [] };
|
||||
const student03: Student = { username: "id03", firstName: "Aaron", lastName: "Lewis", classes: [] };
|
||||
|
||||
const teacher01: Student = { username: "id11", firstName: "Mark", lastName: "Knopfler", classes: [] };
|
||||
const teacher02: Student = { username: "id12", firstName: "John", lastName: "Hiat", classes: [] };
|
||||
const teacher03: Student = { username: "id13", firstName: "Aaron", lastName: "Lewis", classes: [] };
|
||||
|
||||
const class01: Class = {
|
||||
id: "class01",
|
||||
displayName: "class 01",
|
||||
teachers: [teacher01],
|
||||
students: [student01, student02],
|
||||
};
|
||||
const class02: Class = {
|
||||
id: "class02",
|
||||
displayName: "class 02",
|
||||
teachers: [teacher02],
|
||||
students: [student01, student03],
|
||||
};
|
||||
const class03: Class = {
|
||||
id: "class03",
|
||||
displayName: "class 03",
|
||||
teachers: [teacher03],
|
||||
students: [student02, student03],
|
||||
};
|
||||
|
||||
student01.classes = [class01, class02];
|
||||
student02.classes = [class01, class03];
|
||||
student03.classes = [class02, class03];
|
||||
|
||||
teacher01.classes = [class01];
|
||||
teacher02.classes = [class02];
|
||||
teacher03.classes = [class03];
|
||||
|
||||
export const classes: Array<Class> = [class01, class02, class03];
|
Loading…
Add table
Add a link
Reference in a new issue