-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Student Lesson Registration Screens | SIS-113 (#61)
* Student Lesson Registration Done Screen design and lessons listed * Student Component Fields Have Been Updated for Student Lesson Registration Page && Unused Buttons Have Been Deleted * Student Lesson Registration Page Has Been Updated and Fixed * Student Component Fields Have Been Updated and Fixed for Student Lesson Registration Page * Done Student Lesson Registration Save Transaction * Done Student Registration Lesson List page and Api Connection * Done Registration Lesson List Page and Api Connection * Done Lesson Registration approved and rejected transaction. * Done Student My Lesson Page and Api Connection. * Student My Lessons and My Notes Screen Updated. * Student My Lessons Screen Updated. * Student Lesson Registration, Teacher Lesson Registration and Lesson Registration Detail Page Updated. * Teacher Lesson Registration and Lesson Registration Detail Page Updated. * Teacher Viewing Lesson Registration and Lesson Registration Detail Page Updated. * Registration Status Page Updated and Fixed * Student Lesson Registration Controller Page Updated and Fixed. * Student Controller Page Updated and Fixed. * Registration Detail Page Updated and Fixed * Teacher Component Page Updated and Fixed Co-authored-by: Agit Rubar Demir <demiragitrubar@gmail.com>
- Loading branch information
1 parent
7a86995
commit cbaab8b
Showing
10 changed files
with
1,315 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
import SISTitle from "../../../public/components/page-titles"; | ||
import LessonSemester from "../../../public/constants/lesson/LessonSemester"; | ||
import UnauthorizedAccessPage from "../../401"; | ||
import LessonCompulsoryOrElective from "../../../public/constants/lesson/LessonCompulsoryOrElective"; | ||
import SisStudentStorage from "../../../public/storage/student/SisStudentStorage"; | ||
import StudentNavbar from "../../../public/components/navbar/student/student-navbar"; | ||
import StudentLessonController from "../../../public/api/student/lesson/StudentLessonController"; | ||
|
||
export async function getServerSideProps(context) { | ||
const studentId = SisStudentStorage.getNumberWithContext(context); | ||
if (studentId === undefined) { | ||
return { | ||
props: { | ||
isPagePermissionSuccess: false, | ||
} | ||
} | ||
} | ||
|
||
const studentLessonsData = await StudentLessonController.getAllStudentLessonsByStudentId(studentId); | ||
if (studentLessonsData.success) { | ||
return { | ||
props: { | ||
lessons: studentLessonsData.response, | ||
isPagePermissionSuccess: true | ||
} | ||
} | ||
} | ||
} | ||
export default function StudentLessonsList({isPagePermissionSuccess, lessons}) { | ||
if (!isPagePermissionSuccess) { | ||
return ( | ||
<UnauthorizedAccessPage user="student"/> | ||
) | ||
} | ||
return ( | ||
<div> | ||
<SISTitle/> | ||
<StudentNavbar/> | ||
{( | ||
lessons.length !== 0 | ||
? | ||
<div className="max-w-7xl select-none py-5 mx-auto space-y-6"> | ||
<div className="px-12 py-10 text-left bg-gray-50 rounded-2xl shadow-xl"> | ||
<a className="select-none font-phenomenaExtraBold text-left text-4xl text-sis-darkblue"> | ||
DERSLERİM | ||
</a> | ||
</div> | ||
<div className="flex flex-col"> | ||
<div className="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"> | ||
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"> | ||
<div className="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"> | ||
<table className="bg-gray-50 min-w-full divide-y divide-gray-200"> | ||
<thead className="font-phenomenaBold text-xl text-gray-500 text-left"> | ||
<tr> | ||
<th | ||
scope="col" | ||
className="select-none px-6 py-3 tracking-wider" | ||
> | ||
DERS | ||
</th> | ||
<th | ||
scope="col" | ||
className="select-none px-6 py-3 tracking-wider" | ||
> | ||
AKADEMİK BİLGİLER | ||
</th> | ||
<th | ||
scope="col" | ||
className="select-none px-6 py-3 tracking-wider" | ||
> | ||
KREDİ | ||
</th> | ||
<th | ||
scope="col" | ||
className="select-none px-6 py-3 tracking-wider" | ||
> | ||
DERS DURUMU | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody className="bg-white divide-y divide-gray-200"> | ||
{lessons.lessonsResponses.map((lesson) => ( | ||
<tr key={lesson.lessonId}> | ||
<td className="px-6 py-4 whitespace-nowrap"> | ||
<div className="flex items-center"> | ||
<div className="ml-0.5"> | ||
<div | ||
className="font-phenomenaBold text-xl text-sis-darkblue">{lesson.name}</div> | ||
<div | ||
className="select-all font-phenomenaRegular text-lg text-gray-500">{lesson.lessonId}</div> | ||
{LessonSemester.getAll.map((lSemester) => ( | ||
lesson.semester === lSemester.enum | ||
? | ||
<div | ||
className="font-phenomenaBold text-xl text-gray-500">{lSemester.tr}</div> | ||
: | ||
null | ||
))} | ||
</div> | ||
</div> | ||
</td> | ||
<td className="px-6 py-4 whitespace-nowrap"> | ||
<div | ||
className="font-phenomenaBold text-xl text-sis-darkblue">{lesson.departmentResponse.facultyResponse.name}</div> | ||
|
||
<div | ||
className="font-phenomenaRegular text-xl text-sis-darkblue">{lesson.departmentResponse.name}</div> | ||
</td> | ||
<td className="px-6 py-4 whitespace-nowrap"> | ||
<div | ||
className="font-phenomenaBold text-xl text-sis-darkblue">{lesson.credit}</div> | ||
|
||
</td> | ||
<td className="px-6 py-4 whitespace-nowrap"> | ||
{LessonCompulsoryOrElective.getAll.map((lCompulsory) => ( | ||
lesson.compulsoryOrElective === lCompulsory.enum | ||
? | ||
<div | ||
className="font-phenomenaBold text-xl text-sis-darkblue">{lCompulsory.tr}</div> | ||
: | ||
null | ||
))} | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
: | ||
<div | ||
className="max-w-7xl mx-auto px-12 py-10 text-center bg-gray-50 rounded-2xl shadow-xl"> | ||
<a className="select-none font-phenomenaExtraBold text-4xl text-sis-fail"> | ||
Henüz Ders Kaydınız Yapılmadı! | ||
|
||
</a> | ||
</div> | ||
)} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.