// "הגשות": every assignment from the student's teachers, grouped by state, and (on a phone) the switch for notifications. import { swr } from "./api.js"; import { assignmentHref, assignmentState } from "./home.js"; import { esc, fmt } from "./math.js"; import * as notifications from "./notifications.js"; import { shortDate, tabs } from "./ui.js"; /** The groups, in the order a student needs them: what to do first, then what waits, then what is done. */ const GROUPS = [ { id: "new", title: "חדשות: עוד לא הוגשו", states: ["not_handed", "not_done"] }, { id: "returned", title: "הוחזרו לתיקון", states: ["returned"] }, { id: "waiting", title: "הוגשו וממתינות לבדיקה", states: ["handed_in"] }, { id: "checked", title: "נבדקו", states: ["graded", "done"] }, ]; function item(a) { const s = assignmentState(a); const note = a.teacher_note ? `הערת המורה: ${fmt(a.teacher_note)}` : ""; return `
המורים עוד לא נתנו משימות.
`}