Skip to content

Commit

Permalink
feat(ed/att): added sanctions in attendance
Browse files Browse the repository at this point in the history
  • Loading branch information
imyanice committed Oct 28, 2024
1 parent 9e35ab8 commit 94eada0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/services/ecoledirecte/attendance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,26 @@ const decodeAbsence = (item: AttendanceItem): Absence => {


const decodePunishment = (item: AttendanceItem): Punishment => {
console.log(item);
const timeInterval = dateStringAsTimeInterval(item.displayDate);
const duration = (timeInterval?.end && timeInterval.start) ? getDuration(timeInterval) .getTime() / (60 * 1000): 0;
return {
id: item.id.toString(),
duration,
givenBy: item.teacher,
timestamp: item.date.getTime(),
timestamp: new Date(timeInterval?.start ?? item.date.getTime()).getTime(),
// TODO
duringLesson: false,
exclusion: false,
homework: {
documents: [],
text: ""
text: item.todo
},
nature: "",
reason: {
circumstances: item.reason,
circumstances: "",
documents: [],
text: []
text: [item.reason]
},
schedulable: false,
schedule: []
Expand Down

0 comments on commit 94eada0

Please sign in to comment.