Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test | Teacher Transaction | SIS-72 #24

Merged
merged 30 commits into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
20712cf
Done teacher activate, passivate, delete, academic information update…
berinkrktt Feb 4, 2022
ac1da67
Fixed warning screen information
berinkrktt Feb 5, 2022
c4140d7
Fixed warning screen information
berinkrktt Feb 5, 2022
ecc1fdf
done update teacher transaction.
berinkrktt Feb 5, 2022
26aa1cd
done update teacher transaction.
berinkrktt Feb 5, 2022
e8674af
done update teacher transaction.
berinkrktt Feb 5, 2022
7d25a77
done update teacher transaction
berinkrktt Feb 5, 2022
9b65b5f
done update information transaction
berinkrktt Feb 5, 2022
40e5c74
fixed message screen information
berinkrktt Feb 5, 2022
b302ab0
Teacher Detail Page Has Been Formatted and Fixed update academic info…
berinkrktt Feb 8, 2022
0a7cfca
Teacher Detail Page Has Been Updated and Fixed
berinkrktt Feb 8, 2022
a3bfa0c
Teacher List Page has been Updated.
berinkrktt Feb 9, 2022
2359af4
Teacher List Page has been Updated.
berinkrktt Feb 9, 2022
32614b3
Teacher List Page has been Updated.
berinkrktt Feb 9, 2022
336f0ed
Teacher Detail Page has been Updated.
berinkrktt Feb 9, 2022
30ff8e5
Teacher Detail Page and Teacher List Page has been Updated.
berinkrktt Feb 9, 2022
79ae9de
Done Teacher Personal Information Update transaction.
berinkrktt Feb 11, 2022
d3bd352
Teacher List Page Updated and Fixed.
berinkrktt Feb 11, 2022
9cc3fd7
Teacher List Page Updated and Fixed.
berinkrktt Feb 12, 2022
9dfbfd0
Merge remote-tracking branch 'origin/test' into teacherTransaction_SI…
berinkrktt Feb 12, 2022
f65ff09
Teacher List Page and Constants Page Updated and Fixed.
berinkrktt Feb 12, 2022
0051af8
Teacher List and Detail Page Updated and Fixed.
berinkrktt Feb 12, 2022
90dbd7f
Teacher Save Page Updated and Fixed.
berinkrktt Feb 12, 2022
7eb6501
Teacher Information Page Updated and Fixed.
berinkrktt Feb 12, 2022
1c68def
Teacher Information Page Updated and Fixed.
berinkrktt Feb 12, 2022
14c370e
Teacher Constants Have Been Fixed and Updated
agitrubard Feb 13, 2022
cd09795
Teacher Listing Page Has Been Fixed and Updated
agitrubard Feb 13, 2022
1b12e17
Teacher Listing Page Has Been Fixed and Updated for DELETED and PASSI…
agitrubard Feb 13, 2022
6659aa7
Teacher Detail / Degree TR Name Has Been Updated
agitrubard Feb 13, 2022
859e48a
Teacher/MyInfo Page Has Been Updated and Fixed
agitrubard Feb 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/login/teacher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default function TeacherLogin() {
cookies.set('teacherFieldOfStudy', getData.response.academicInfoResponse.fieldOfStudy, {path: '/'});
cookies.set('teacherAcademicPhoneNumber', getData.response.academicInfoResponse.phoneNumber, {path: '/'});
cookies.set('teacherRegistrationDate', getData.response.academicInfoResponse.registrationDate, {path: '/'});
cookies.set('teacherFaculty', getData.response.academicInfoResponse.departmentResponse.facultyResponse.name, {path: '/'});
cookies.set('teacherTcNo', getData.response.personalInfoResponse.tcNo, {path: '/'});
cookies.set('teacherPersonalEmail', getData.response.personalInfoResponse.email, {path: '/'});
cookies.set('teacherPersonalPhoneNumber', getData.response.personalInfoResponse.phoneNumber, {path: '/'});
Expand Down
189 changes: 106 additions & 83 deletions pages/officer/operation/teacher/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import SISTitle from "../../../../public/components/page-titles";
import OfficerNavbar from "../../../../public/components/navbar/officer/officer-navbar";
import {useRouter} from "next/router";
import {teacherDegrees, teacherRoles, teacherStatuses} from "../../../../public/constants/teacher";


export async function getServerSideProps() {
const teacherResponse = await fetch("http://localhost:8585/teacher?status=ALL", {
Expand Down Expand Up @@ -28,7 +30,7 @@ export default function TeacherList({teachers}) {
<div>
<SISTitle/>
<OfficerNavbar/>
<div className="px-28 py-5 mx-auto space-y-6">
<div className="select-none px-28 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">
ÖĞRETMEN LİSTESİ
Expand All @@ -41,91 +43,112 @@ export default function TeacherList({teachers}) {
ÖĞRETMEN EKLE
</button>
</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"
>
ADI SOYADI
</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"
>
BÖLÜM KODU
</th>
<th
scope="col"
className="select-none px-6 py-3 tracking-wider"
>
STATÜSÜ
</th>
</tr>
</thead>
<tbody className="bg-white divide-y divide-gray-200">
{teachers.map((teacher) => (
<tr key={teacher.teacherId}>
<td className="px-6 py-4 whitespace-nowrap">
<div className="flex items-center">
<div className="flex-shrink-0 h-10 w-10">
<img className="select-none h-10 w-10 rounded-full"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60"
alt=""/>
</div>
<div className="ml-4">
<div
className="font-phenomenaBold text-xl text-sis-darkblue">{teacher.name} {teacher.surname}</div>
{(
teachers !== null
?
<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"
>
ADI SOYADI
</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"
>
BÖLÜM ADI
</th>
<th
scope="col"
className="select-none px-6 py-3 tracking-wider"
>
STATÜSÜ
</th>
</tr>
</thead>
<tbody className="bg-white divide-y divide-gray-200">
{teachers.map((teacher) => (
<tr key={teacher.teacherId}>
<td className="px-2 py-4 whitespace-nowrap">
{/*<td className="px-6 py-4 whitespace-nowrap">*/}
<div className="flex items-center">
{/*<div className="flex-shrink-0 h-10 w-10">*/}
{/* <img className="select-none h-10 w-10 rounded-full"*/}
{/* src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60"*/}
{/* alt=""/>*/}
{/*</div>*/}
<div className="ml-4">
<div
className="font-phenomenaBold text-xl text-sis-darkblue">{teacher.name} {teacher.surname}</div>
<div
className="font-phenomenaRegular text-lg text-gray-500">{teacher.teacherId}</div>
<div
className="font-phenomenaExtraLight text-lg text-gray-600">{teacher.email}</div>
</div>
</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
{teacherRoles.map((tRole) => (
teacher.role === tRole.enum
?
<div
className="font-phenomenaBold text-xl text-sis-darkblue">{tRole.tr}</div>
:
null
))}
{teacherDegrees.map((tDegree) => (
teacher.degree === tDegree.enum
?
<div
className="font-phenomenaRegular text-xl text-sis-darkblue">{tDegree.tr}</div>
:
null
))}
<div className="font-phenomenaLight text-lg text-gray-500">{teacher.fieldOfStudy}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div
className="font-phenomenaRegular text-lg text-gray-500">{teacher.teacherId}</div>
<div
className="font-phenomenaExtraLight text-lg text-gray-600">{teacher.email}</div>
</div>
</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div
className="font-phenomenaBold text-xl text-sis-darkblue">{teacher.degree}</div>
<div
className="font-phenomenaRegular text-lg text-gray-500">{teacher.fieldOfStudy}</div>
<div
className="font-phenomenaExtraLight text-lg text-gray-600">{teacher.role}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div
className="font-phenomenaBold text-xl text-sis-darkblue">{teacher.departmentResponse.name}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<span
className="select-none px-2 inline-flex leading-7 rounded-full bg-sis-darkblue font-phenomenaBold text-lg text-sis-white ">
{teacher.status}
</span>
</td>
{/*<td className="ml-10 px-6 py-4 text-right font-phenomenaBold text-xl">*/}
{/* <a href={'/officer/operation/teacher/detail/' + teacher.teacherId}*/}
{/* className='text-sis-yellow'>*/}
{/* DETAY*/}
{/* </a>*/}
{/*</td>*/}
</tr>
))}
</tbody>
</table>
className="font-phenomenaBold text-xl text-sis-darkblue">{teacher.departmentResponse.name}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
{teacherStatuses.map((tStatus) => (
teacher.status === tStatus.enum
?
tStatus.miniComponent
:
null
))}
</td>
<td className="ml-10 px-6 py-4 text-right font-phenomenaBold text-xl">
<a href={'/officer/operation/teacher/information/detail/' + teacher.teacherId}
className='text-sis-yellow'>
DETAY
</a>
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
:
null
)}
</div>
</div>
)
Expand Down
Loading