diff --git a/src/app.tsx b/src/app.tsx index 78ba978..10abdd5 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,22 +1,6 @@ import { RouterProvider } from "@tanstack/solid-router"; -import { Suspense, lazy } from "solid-js"; -import { AuthProvider } from "@/stores/auth-context"; -import { PreferencesProvider } from "@/stores/preferences-context"; import { router } from "@/routes/router"; -const RouterDevtools = import.meta.env.DEV ? lazy(() => import("./router-devtools")) : undefined; - export function App() { - return ( - - - - {RouterDevtools ? ( - - - - ) : null} - - - ); + return ; } diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts index 8b67eb2..a4e3e87 100644 --- a/src/i18n/messages.ts +++ b/src/i18n/messages.ts @@ -703,12 +703,12 @@ const en: Dict = { "dashboard.continueGuide": "Guide", "dashboard.portal.sections": "Sections", "dashboard.portal.coursesDesc": "Browse courses, study sessions, and materials.", - "dashboard.portal.examsDesc": "Upcoming exams, deadlines, and results.", - "dashboard.portal.eventsDesc": "Sessions, meetups, and attendance.", + "dashboard.portal.examsDesc": "Course exams, deadlines, and results.", + "dashboard.portal.eventsDesc": "Events with student attendance records.", "dashboard.portal.marksDesc": "Your grades and overall report card.", "dashboard.portal.notesDesc": "Private scratchpad for quick ideas.", "dashboard.portal.usersDesc": "Manage user accounts and roles.", - "dashboard.portal.attendanceDesc": "Mark and review attendance records.", + "dashboard.portal.attendanceDesc": "Review student attendance records.", "dashboard.portal.workDesc": "Track your work hours and shifts.", "dashboard.portal.studentMarksDesc": "View and grade student results.", "dashboard.portal.settingsDesc": "System preferences and configuration.", @@ -732,7 +732,7 @@ const en: Dict = { "notes.helpBody": "Notes are private to you only. Title max 200 characters, content max 10,000. Delete and update open a confirmation dialog with a short summary before they run.", "events.title": "Events", - "events.subtitle": "Sessions, meetups, and attendance in one list.", + "events.subtitle": "Events and student attendance records in one list.", "events.create": "Create event", "events.empty": "No events yet.", "events.starts": "Starts", @@ -741,17 +741,17 @@ const en: Dict = { "events.markOther": "Mark another person", "events.myAttendance": "My attendance", "events.myAttendanceHelp": "Choose your event status and save it.", - "events.studentAttendance": "Participant attendance", - "events.studentAttendanceHelp": "Select a user, choose a status, then save the record.", + "events.studentAttendance": "Student attendance", + "events.studentAttendanceHelp": "Select a student, choose a status, then save the record.", "events.saveStudentAttendance": "Save attendance", "events.attendance": "Attendance roster", "events.attendanceRecords": "Attendance records", - "events.attendanceRecordsHelp": "Saved event attendance, including who recorded each row.", + "events.attendanceRecordsHelp": "Saved student attendance for this event, including who recorded each row.", "events.noAttendance": "No attendance rows yet.", - "events.attendee": "Attendee", - "events.selectAttendee": "Search user", - "events.noAttendees": "No users found", - "events.userId": "User id", + "events.attendee": "Student", + "events.selectAttendee": "Search student", + "events.noAttendees": "No students found", + "events.userId": "Student id", "events.status": "Status", "events.audience": "Audience", "events.audience.school": "Whole school", @@ -765,13 +765,13 @@ const en: Dict = { "events.audienceCapacityInvalid": "Capacity must be at least 1.", "events.helpTitle": "About events", "events.helpBody": - "Students mark themselves present / absent / late / excused with the big status buttons, then save attendance. Teachers create events and can mark others by user id. Managers can edit any event.", + "Teachers and managers record attendance for students only. Managers can edit any event.", "events.clearStart": "Will clear start time", "events.clearEnd": "Will clear end time", "events.upcoming": "Upcoming", "events.past": "Past", "exams.title": "Exams", - "exams.subtitle": "All exams across courses — create them under a course.", + "exams.subtitle": "All exams across courses and study sessions — create them under an education item.", "exams.create": "Create exam", "exams.searchPlaceholder": "Search exams…", "exams.selectCourse": "Select course", @@ -858,7 +858,7 @@ const en: Dict = { "attempt.absent": "No-show", "exams.helpTitle": "About exams", "exams.helpBody": - "Exams belong to a course. Teachers add them from the course page with a kind; weighting is defined by the exam kind. Students only see their own mark (or “not graded yet”). Weighted averages appear on the report card.", + "Exams belong to an education item. Teachers add them from that detail page with a kind; weighting is defined by the exam kind. Students only see their own mark (or “not graded yet”). Weighted averages appear on the report card.", "admin.title": "People & roles", "admin.subtitle": "Promote or demote accounts. You can’t change your own role.", "admin.username": "Username", @@ -879,13 +879,13 @@ const en: Dict = { "Private scratchpad. Create, edit, delete — delete/update ask for confirmation with a short summary.", "guide.step3.title": "3. Events & attendance", "guide.step3.body": - "Open an event, pick present/absent/late/excused, save attendance. Teachers can mark others.", + "Teachers and managers open an event, select a student, then save present/absent/late/excused attendance.", "guide.step4.title": "4. Education", "guide.step4.body": "Teachers create a course or study session, enroll students, then add exams by kind inside it.", "guide.step5.title": "5. Exams", "guide.step5.body": - "List all exams here. New exams are created from a course page (not from this list).", + "List all exams here. New exams are created from an education detail page, not from this list.", "guide.step6.title": "6. Report card", "guide.step6.body": "Your weighted course averages and overall average. Teachers can look up any student.", @@ -1256,12 +1256,12 @@ const tr: Dict = { "dashboard.continueGuide": "Rehber", "dashboard.portal.sections": "Bölümler", "dashboard.portal.coursesDesc": "Dersleri, etütleri ve materyalleri görüntüle.", - "dashboard.portal.examsDesc": "Sınavlar, son teslim tarihleri ve sonuçlar.", - "dashboard.portal.eventsDesc": "Oturumlar, etkinlikler ve yoklama.", + "dashboard.portal.examsDesc": "Ders/etüt sınavları, tarihler ve sonuçlar.", + "dashboard.portal.eventsDesc": "Öğrenci yoklamalı etkinlikler.", "dashboard.portal.marksDesc": "Notların ve genel karnen.", "dashboard.portal.notesDesc": "Hızlı fikirler için özel not defteri.", "dashboard.portal.usersDesc": "Kullanıcı hesaplarını ve rollerini yönet.", - "dashboard.portal.attendanceDesc": "Yoklama kayıtlarını işaretle ve incele.", + "dashboard.portal.attendanceDesc": "Öğrenci yoklama kayıtlarını incele.", "dashboard.portal.workDesc": "Çalışma saatlerini ve mesainizi takip edin.", "dashboard.portal.studentMarksDesc": "Öğrenci sonuçlarını görüntüle ve notlandır.", "dashboard.portal.settingsDesc": "Sistem tercihleri ve yapılandırma.", @@ -1285,7 +1285,7 @@ const tr: Dict = { "notes.helpBody": "Notlar yalnızca sana aittir. Başlık en fazla 200, içerik 10.000 karakter. Silme ve güncelleme özetli onay penceresi ister.", "events.title": "Etkinlikler", - "events.subtitle": "Oturumlar, buluşmalar ve yoklama tek listede.", + "events.subtitle": "Etkinlikler ve öğrenci yoklama kayıtları tek listede.", "events.create": "Etkinlik oluştur", "events.empty": "Henüz etkinlik yok.", "events.starts": "Başlangıç", @@ -1294,17 +1294,17 @@ const tr: Dict = { "events.markOther": "Başkasını işaretle", "events.myAttendance": "Katılım durumum", "events.myAttendanceHelp": "Etkinlik durumunu seç ve kaydet.", - "events.studentAttendance": "Katılımcı yoklaması", - "events.studentAttendanceHelp": "Kullanıcıyı seç, durumunu belirle, kaydı kaydet.", + "events.studentAttendance": "Öğrenci yoklaması", + "events.studentAttendanceHelp": "Öğrenciyi seç, durumunu belirle, kaydı kaydet.", "events.saveStudentAttendance": "Yoklamayı kaydet", "events.attendance": "Yoklama listesi", "events.attendanceRecords": "Yoklama kayıtları", - "events.attendanceRecordsHelp": "Kaydedilmiş etkinlik yoklaması ve kaydı kimin girdiği.", + "events.attendanceRecordsHelp": "Bu etkinlik için kaydedilmiş öğrenci yoklaması ve kaydı kimin girdiği.", "events.noAttendance": "Henüz yoklama kaydı yok.", - "events.attendee": "Katılımcı", - "events.selectAttendee": "Kullanıcı ara", - "events.noAttendees": "Kullanıcı bulunamadı", - "events.userId": "Kullanıcı id", + "events.attendee": "Öğrenci", + "events.selectAttendee": "Öğrenci ara", + "events.noAttendees": "Öğrenci bulunamadı", + "events.userId": "Öğrenci id", "events.status": "Durum", "events.audience": "Hedef kitle", "events.audience.school": "Tüm okul", @@ -1318,13 +1318,13 @@ const tr: Dict = { "events.audienceCapacityInvalid": "Kapasite en az 1 olmalı.", "events.helpTitle": "Etkinlikler hakkında", "events.helpBody": - "Öğrenciler büyük durum butonlarıyla var/yok/geç/mazeretli seçip yoklamayı kaydeder. Öğretmenler etkinlik oluşturur ve başkasını işaretleyebilir. Yöneticiler her etkinliği düzenleyebilir.", + "Öğretmenler ve yöneticiler yalnız öğrenciler için yoklama kaydeder. Yöneticiler her etkinliği düzenleyebilir.", "events.clearStart": "Başlangıç saati temizlenecek", "events.clearEnd": "Bitiş saati temizlenecek", "events.upcoming": "Yaklaşan", "events.past": "Geçmiş", "exams.title": "Sınavlar", - "exams.subtitle": "Tüm derslerin sınavları — yeni sınav ders içinden eklenir.", + "exams.subtitle": "Tüm ders ve etüt sınavları — yeni sınav eğitim kaydı içinden eklenir.", "exams.create": "Sınav oluştur", "exams.searchPlaceholder": "Sınav ara…", "exams.selectCourse": "Ders seç", @@ -1411,7 +1411,7 @@ const tr: Dict = { "attempt.absent": "Katılmadı", "exams.helpTitle": "Sınavlar hakkında", "exams.helpBody": - "Sınavlar bir derse aittir. Öğretmenler ders sayfasından tür seçerek ekler; ağırlık sınav türünde tanımlıdır. Öğrenciler yalnızca kendi notunu görür. Ağırlıklı ortalamalar Karnem’dedir.", + "Sınavlar bir eğitim kaydına aittir. Öğretmenler detay sayfasından tür seçerek ekler; ağırlık sınav türünde tanımlıdır. Öğrenciler yalnızca kendi notunu görür. Ağırlıklı ortalamalar Karnem’dedir.", "admin.title": "Kişiler ve roller", "admin.subtitle": "Hesapları yükselt / düşür. Kendi rolünü değiştiremezsin.", "admin.username": "Kullanıcı adı", @@ -1432,13 +1432,13 @@ const tr: Dict = { "Özel defter. Oluştur, düzenle, sil — silme/güncelleme özetli onay ister.", "guide.step3.title": "3. Etkinlik ve yoklama", "guide.step3.body": - "Etkinliği aç, var/yok/geç/mazeretli seç, yoklamayı kaydet. Öğretmen başkasını işaretleyebilir.", + "Öğretmenler ve yöneticiler etkinliği açar, öğrenciyi seçer ve var/yok/geç/mazeretli yoklama kaydeder.", "guide.step4.title": "4. Eğitim", "guide.step4.body": "Öğretmen ders veya etüt oluşturur, öğrenci kaydeder, içine türe göre sınav ekler.", "guide.step5.title": "5. Sınavlar", "guide.step5.body": - "Tüm sınavlar burada listelenir. Yeni sınav bu listeden değil, ders sayfasından eklenir.", + "Tüm sınavlar burada listelenir. Yeni sınav bu listeden değil, eğitim detayından eklenir.", "guide.step6.title": "6. Karnem", "guide.step6.body": "Ders ortalamaları ve genel ortalama. Öğretmen herhangi bir öğrencinin karnesine bakabilir.", diff --git a/src/pages/event-detail-page.tsx b/src/pages/event-detail-page.tsx index fa1a1d0..9d6a16e 100644 --- a/src/pages/event-detail-page.tsx +++ b/src/pages/event-detail-page.tsx @@ -195,77 +195,53 @@ function EventDetailContent() { /> -
+
-

{t("events.myAttendance")}

-

{t("events.myAttendanceHelp")}

+

{t("events.studentAttendance")}

+

{t("events.studentAttendanceHelp")}

-
- +
+ +
- - -
-
-

{t("events.studentAttendance")}

-

{t("events.studentAttendanceHelp")}

-
-
- - - -
-
-
-
+ {error() && (

{error()}

diff --git a/src/routes/router.tsx b/src/routes/router.tsx index f81dbae..482be04 100644 --- a/src/routes/router.tsx +++ b/src/routes/router.tsx @@ -12,6 +12,10 @@ import { ApiError } from "@/api/client"; import { Suspense, createRenderEffect, createRoot, lazy, type Component } from "solid-js"; import { AppShell } from "@/components/layout/app-shell"; import { PageSpinner } from "@/components/ui/page-spinner"; +import { AuthProvider } from "@/stores/auth-context"; +import { PreferencesProvider } from "@/stores/preferences-context"; + +const RouterDevtools = import.meta.env.DEV ? lazy(() => import("@/router-devtools")) : undefined; function lazyRoute(loader: () => Promise<{ default: Component }>): Component { const Page = lazy(loader); @@ -50,9 +54,18 @@ const GuidePage = lazyRoute(() => import("@/pages/guide-page")); function RootComponent() { return ( - - - + + + + + + {RouterDevtools ? ( + + + + ) : null} + + ); } @@ -354,9 +367,13 @@ const routeTree = rootRoute.addChildren([ guideRoute, ]); +function RouterPending() { + return
; +} + export const router = createRouter({ routeTree, - defaultPendingComponent: PageSpinner, + defaultPendingComponent: RouterPending, defaultPreload: "intent", scrollRestoration: true, });