Skip to content

Commit

Permalink
fix: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
tyboro2002 committed Mar 31, 2024
1 parent 9246488 commit 93709ed
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions frontend/src/types/Assistant.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Course } from "./Course";
import { Faculty } from "./Faculty";
import { Course } from "./Course";
import {Role, User} from '@/types/User.ts';

export class Assistant extends User {
Expand All @@ -16,9 +15,9 @@ export class Assistant extends User {
public faculties: Faculty[] = [],
public courses: Course[] = [],
public create_time: Date,
public last_login: Date |null,
public last_login: Date |null
) {
super(id, username, email, first_name, last_name, last_enrolled, is_staff, roles, faculties, create_time, last_login);
super(id, username, email, first_name, last_name, last_enrolled, is_staff, roles, faculties, create_time, last_login, courses);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/Student.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Student extends User {
public groups: Group[] = [],
public faculties: Faculty[] = [],
) {
super(id, username, email, first_name, last_name, last_enrolled, is_staff, roles, faculties, create_time, last_login);
super(id, username, email, first_name, last_name, last_enrolled, is_staff, roles, faculties, create_time, last_login, courses);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/types/Teacher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Course } from "./Course";
import { Faculty } from "./Faculty";
import { Course } from "./Course";
import {Role, User} from '@/types/User.ts';

export class Teacher extends User {
Expand All @@ -18,7 +17,7 @@ export class Teacher extends User {
public create_time: Date,
public last_login: Date |null,
) {
super(id, username, email, first_name, last_name, last_enrolled, is_staff, roles, faculties, create_time, last_login);
super(id, username, email, first_name, last_name, last_enrolled, is_staff, roles, faculties, create_time, last_login, courses);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/types/User.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Course } from "./Course";
import { Faculty } from "./Faculty";

export type Role = 'user' | 'student' | 'assistant' | 'teacher';
Expand All @@ -14,7 +15,8 @@ export class User {
public roles: Role[] = [],
public faculties: Faculty[] = [],
public create_time: Date,
public last_login: Date |null
public last_login: Date |null,
public courses: Course[] = []
) {
}

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/views/dashboard/DashboardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ import ProjectCard from "@/components/projects/ProjectCard.vue";
import {useAuthStore} from '@/store/authentication.store.ts';
import {storeToRefs} from 'pinia';
import { computed } from 'vue';
import { Course } from '@/types/Course';
/* Composable injections */
const {t} = useI18n();
/* Component state */
const allProjects = ref<Project[]>([]);
const allCourses = ref<Course[]>([]);
const academicYears = ref<{ label: string; value: number }[]>();
const selectedCoursesYear = ref<number>();
const selectedProjectsYear = ref<number>();
Expand Down

0 comments on commit 93709ed

Please sign in to comment.