feat(frontend): Merge dev into feat/assignment

This commit is contained in:
Joyelle Ndagijimana 2025-04-18 17:13:04 +02:00
commit 83f01830e3
132 changed files with 4916 additions and 2990 deletions

View file

@ -1,14 +1,19 @@
import { UserDTO } from './user';
import { QuestionDTO, QuestionId } from './question';
import { TeacherDTO } from './teacher';
export interface AnswerDTO {
author: UserDTO;
author: TeacherDTO;
toQuestion: QuestionDTO;
sequenceNumber: number;
timestamp: string;
content: string;
}
export interface AnswerData {
author: string;
content: string;
}
export interface AnswerId {
author: string;
toQuestion: QuestionId;

View file

@ -2,7 +2,7 @@ import { GroupDTO } from './group';
export interface AssignmentDTO {
id: number;
class: string; // Id of class 'within'
within: string;
title: string;
description: string;
learningPath: string;

View file

@ -1,8 +1,8 @@
import { StudentDTO } from './student';
import { ClassJoinRequestStatus } from '../util/class-join-request';
import { ClassStatus } from '../util/class-join-request';
export interface ClassJoinRequestDTO {
requester: StudentDTO;
class: string;
status: ClassJoinRequestStatus;
status: ClassStatus;
}

View file

@ -3,5 +3,4 @@ export interface ClassDTO {
displayName: string;
teachers: string[];
students: string[];
joinRequests: string[];
}

View file

@ -1,8 +1,10 @@
import { AssignmentDTO } from './assignment';
import { ClassDTO } from './class';
import { StudentDTO } from './student';
export interface GroupDTO {
class: string | ClassDTO;
assignment: number | AssignmentDTO;
groupNumber: number;
members: string[] | StudentDTO[];
members?: string[] | StudentDTO[];
}

View file

@ -11,7 +11,7 @@ export interface Transition {
};
}
export interface LearningObjectIdentifier {
export interface LearningObjectIdentifierDTO {
hruid: string;
language: Language;
version?: number;

View file

@ -1,15 +1,23 @@
import { LearningObjectIdentifier } from './learning-content';
import { LearningObjectIdentifierDTO } from './learning-content';
import { StudentDTO } from './student';
import { GroupDTO } from './group';
export interface QuestionDTO {
learningObjectIdentifier: LearningObjectIdentifier;
learningObjectIdentifier: LearningObjectIdentifierDTO;
sequenceNumber?: number;
author: StudentDTO;
timestamp?: string;
inGroup: GroupDTO;
timestamp: string;
content: string;
}
export interface QuestionData {
author?: string;
content: string;
inGroup: GroupDTO;
}
export interface QuestionId {
learningObjectIdentifier: LearningObjectIdentifier;
learningObjectIdentifier: LearningObjectIdentifierDTO;
sequenceNumber: number;
}

View file

@ -1,15 +1,15 @@
import { GroupDTO } from './group';
import { LearningObjectIdentifier } from './learning-content';
import { LearningObjectIdentifierDTO } from './learning-content';
import { StudentDTO } from './student';
import { Language } from '../util/language';
export interface SubmissionDTO {
learningObjectIdentifier: LearningObjectIdentifier;
learningObjectIdentifier: LearningObjectIdentifierDTO;
submissionNumber?: number;
submitter: StudentDTO;
time?: Date;
group?: GroupDTO;
group: GroupDTO;
content: string;
}

View file

@ -1,8 +1,16 @@
import { UserDTO } from './user';
import { ClassDTO } from './class';
import { ClassStatus } from '../util/class-join-request';
export interface TeacherInvitationDTO {
sender: string | UserDTO;
receiver: string | UserDTO;
class: string | ClassDTO;
classId: string;
status: ClassStatus;
}
export interface TeacherInvitationData {
sender: string;
receiver: string;
class: string;
accepted?: boolean; // Use for put requests, else skip
}

View file

@ -1,4 +1,4 @@
export enum ClassJoinRequestStatus {
export enum ClassStatus {
Open = 'open',
Accepted = 'accepted',
Declined = 'declined',