From a3eb849506d65963cdac538ecd4f353579f4be1a Mon Sep 17 00:00:00 2001 From: ALBERICLOOS Date: Thu, 23 May 2024 20:20:28 +0200 Subject: [PATCH] update deadline --- frontend/src/pages/student/CoursesViewStudent.tsx | 2 +- frontend/src/pages/teacher/CoursesViewTeacher.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/student/CoursesViewStudent.tsx b/frontend/src/pages/student/CoursesViewStudent.tsx index 03ebb676..e612a478 100644 --- a/frontend/src/pages/student/CoursesViewStudent.tsx +++ b/frontend/src/pages/student/CoursesViewStudent.tsx @@ -24,7 +24,7 @@ export default function CoursesViewStudent(): JSX.Element { const tableCoursesActive: TableRowCourses[] = active_courses.map((course: properCourse) => { let deadline = "-" - if (course.first_deadline) { + if (course.first_deadline !== "-") { deadline = deadline_to_string(course.first_deadline) } diff --git a/frontend/src/pages/teacher/CoursesViewTeacher.tsx b/frontend/src/pages/teacher/CoursesViewTeacher.tsx index 948aaf6c..3415f328 100644 --- a/frontend/src/pages/teacher/CoursesViewTeacher.tsx +++ b/frontend/src/pages/teacher/CoursesViewTeacher.tsx @@ -20,7 +20,8 @@ export default function CoursesViewTeacher(): JSX.Element { const tableCoursesActive: TableRowCourses[] = active_courses.map(course => { let deadline = "-" - if (course.first_deadline) { + + if (course.first_deadline !== "-") { deadline = deadline_to_string(course.first_deadline) }