From 0691d474dd7dedf2d74eb7de2f6b30ef0a860b79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?=
<80620802+burakboduroglu@users.noreply.github.com>
Date: Sat, 12 Sep 2026 13:58:15 +0300
Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=A7=AD=20rebuild=20the=20navigati?=
=?UTF-8?q?on=20tree=20from=20the=20Figma=20design?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- the sidebar was an information architecture of its own invention —
Today, Education, Academics, Planning, Workspace, Community — against a
design that groups the same routes under Operasyon, Yapay zekâ and
Kurum; all four role trees now carry Figma's groups, labels and order
- every menu entry the design names is present, including the ones no API
can serve yet: they wear a "yakında" badge and resolve to a shared
coming-soon page rather than a half-drawn screen
- entries whose label implies a screen we already have reuse that route
instead of inventing one: Ders programı is /calendar, Tahta is
/whiteboards, Veli iletişimi is /messages, Mesai is /work
- Çelebi and Ayarlar open the panel and the profile dialog in place, so
they no longer need a URL of their own
- the design nests Soru bankası and Optik okuma under Sınavlar; the
sidebar's data model is group-then-item, so that third level is
flattened for now
- manager keeps the admin tree minus the three admin-only Kurum entries,
and every route guard is untouched: regrouping a menu must not widen
anyone's access
Walked as admin, teacher, student and parent at 1440px and 393px, in both
languages. Page composition still follows the old layouts — that is the
next pass.
---
src/components/layout/app-shell.tsx | 8 +-
src/components/layout/command-palette.tsx | 4 +
src/components/layout/mobile-nav-sheet.tsx | 48 +++-
src/components/layout/nav-items.test.ts | 168 ++++++++----
src/components/layout/nav-items.ts | 289 ++++++++++++---------
src/components/layout/side-nav.tsx | 105 ++++----
src/components/ui/icons.tsx | 35 +++
src/i18n/messages.ts | 137 +++++++++-
src/pages/coming-soon-page.tsx | 58 +++++
src/routes/router.tsx | 32 +++
10 files changed, 650 insertions(+), 234 deletions(-)
create mode 100644 src/pages/coming-soon-page.tsx
diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsx
index fe21d5a..1b0a8be 100644
--- a/src/components/layout/app-shell.tsx
+++ b/src/components/layout/app-shell.tsx
@@ -93,7 +93,11 @@ export function AppShell(props: ParentProps) {
-
+ setCelebiOpen(true)}
+ onOpenProfile={() => setProfileOpen(true)}
+ />
@@ -105,6 +109,8 @@ export function AppShell(props: ParentProps) {
open={mobileOpen()}
onClose={() => setMobileOpen(false)}
onLogout={logout}
+ onOpenCelebi={() => setCelebiOpen(true)}
+ onOpenProfile={() => setProfileOpen(true)}
/>
diff --git a/src/components/layout/command-palette.tsx b/src/components/layout/command-palette.tsx
index cc54dc9..3c22db3 100644
--- a/src/components/layout/command-palette.tsx
+++ b/src/components/layout/command-palette.tsx
@@ -205,6 +205,10 @@ export function CommandPalette(props: CommandPaletteProps) {
for (const group of visibleNavGroups(userRole, modules.enabled())) {
const groupName = t(group.labelKey);
for (const item of group.items) {
+ // Çelebi and the account-settings entries open an existing shell
+ // surface rather than a route — the palette already offers both
+ // above, wired to the panel/dialog directly.
+ if (item.action) continue;
list.push({
id: `page-${item.to}`,
category: "pages",
diff --git a/src/components/layout/mobile-nav-sheet.tsx b/src/components/layout/mobile-nav-sheet.tsx
index 3969d4f..b43d090 100644
--- a/src/components/layout/mobile-nav-sheet.tsx
+++ b/src/components/layout/mobile-nav-sheet.tsx
@@ -1,6 +1,6 @@
import { For, Show, createSignal } from "solid-js";
import { Link, useRouterState } from "@tanstack/solid-router";
-import { routeNavItem, sidebarNavGroups, type NavItem } from "@/components/layout/nav-items";
+import { routeNavItem, visibleNavGroups, type NavItem } from "@/components/layout/nav-items";
import { SidebarAccount } from "@/components/layout/sidebar-account";
import { IconX } from "@/components/ui/icons";
import { cn } from "@/lib/cn";
@@ -27,6 +27,8 @@ export function MobileNavSheet(props: {
open: boolean;
onClose: () => void;
onLogout: () => void | Promise;
+ onOpenCelebi?: () => void;
+ onOpenProfile?: () => void;
}) {
const auth = useAuth();
const t = useT();
@@ -36,9 +38,14 @@ export function MobileNavSheet(props: {
// The primary destinations are already one tap away in the tab bar, so the
// sheet lists everything else.
- const groups = () => sidebarNavGroups(auth.user()?.role, modules.enabled());
+ const groups = () => visibleNavGroups(auth.user()?.role, modules.enabled());
const current = () => routeNavItem(pathname(), auth.user()?.role);
const badgeFor = (item: NavItem) => (item.id === "messages" ? feed.unreadMessages().total : 0);
+ const runAction = (item: NavItem) => {
+ props.onClose();
+ if (item.action === "celebi") props.onOpenCelebi?.();
+ if (item.action === "profile") props.onOpenProfile?.();
+ };
// Drag-to-dismiss. Only the grab area drives it, so a flick inside the list
// still scrolls the list. While dragging, the sheet follows the finger with
@@ -135,16 +142,12 @@ export function MobileNavSheet(props: {
{(item) => {
const active = () => current()?.id === item.id;
- return (
-
+ const rowClass = cn(
+ "flex w-full items-center gap-2.5 rounded-md px-3 py-1.5 text-left transition-colors active:bg-muted",
+ active() ? "text-primary" : "text-foreground",
+ );
+ const content = (
+ <>
{t(item.labelKey)}
+
+
+ {t("nav.soon")}
+
+
0}>
{badgeFor(item) > 99 ? "99+" : badgeFor(item)}
-
+ >
+ );
+ return (
+ runAction(item)} class={rowClass}>
+ {content}
+
+ }
+ >
+
+ {content}
+
+
);
}}
diff --git a/src/components/layout/nav-items.test.ts b/src/components/layout/nav-items.test.ts
index 5768eaf..4e5fa3b 100644
--- a/src/components/layout/nav-items.test.ts
+++ b/src/components/layout/nav-items.test.ts
@@ -1,70 +1,138 @@
-import { moduleVisible, pathActive, primaryNavItems, primaryPathActive, routeLabelKey, routeNavItem, sidebarNavGroups, visibleNavItems } from "@/components/layout/nav-items";
+import { moduleVisible, pathActive, primaryNavItems, primaryPathActive, routeLabelKey, routeNavItem, visibleNavGroups, visibleNavItems } from "@/components/layout/nav-items";
test.each([
- ["student", ["/", "/courses", "/calendar", "/marks"]],
- ["teacher", ["/", "/courses", "/calendar"]],
- ["manager", ["/", "/courses", "/calendar"]],
- ["admin", ["/", "/courses", "/calendar"]],
- ["parent", ["/", "/students", "/calendar"]],
+ ["student", ["/", "/exams", "/marks"]],
+ ["teacher", ["/", "/management/classes", "/calendar"]],
+ ["manager", ["/", "/management/classes", "/exams"]],
+ ["admin", ["/", "/management/classes", "/exams"]],
+ ["parent", ["/", "/students", "/appointments"]],
] as const)("%s gets role-specific primary destinations", (role, expected) => {
expect(primaryNavItems(role).map((item) => item.to)).toEqual(expected);
});
test("invalid role destinations stay hidden", () => {
- expect(visibleNavItems("student").map((item) => item.to)).not.toContain("/school");
- expect(visibleNavItems("parent").map((item) => item.to)).not.toContain("/courses");
expect(visibleNavItems("teacher").map((item) => item.to)).not.toContain("/admin/users");
+ expect(visibleNavItems("student").map((item) => item.to)).not.toContain("/admin/users");
+ expect(visibleNavItems("parent").map((item) => item.to)).not.toContain("/management/staff-work");
});
-test("student secondary navigation follows the academic, planning, workspace, services, community flow", () => {
+test("admin's sidebar mirrors the Figma Operasyon / Yapay zekâ / Kurum tree", () => {
expect(
- sidebarNavGroups("student").map((group) => ({
+ visibleNavGroups("admin").map((group) => ({
id: group.id,
items: group.items.map((item) => item.id),
})),
).toEqual([
- { id: "classes", items: ["homework", "exams"] },
- { id: "planning", items: ["events", "appointments"] },
- { id: "workspace", items: ["notes", "whiteboards", "pomodoro"] },
- { id: "services", items: ["meals", "payment-statement"] },
- { id: "community", items: ["messages", "questions"] },
+ {
+ id: "operations",
+ items: [
+ "students-roster",
+ "teachers-roster",
+ "class-groups",
+ "schedule",
+ "student-attendance",
+ "exams",
+ "question-bank",
+ "mock-exams",
+ "optical-reading",
+ "payments-collection",
+ ],
+ },
+ { id: "ai", items: ["hezarfen-zeka", "celebi", "sound-studio"] },
+ {
+ id: "institution",
+ items: ["reports", "license-modules", "users", "data-protection", "school-meals", "staff-work", "settings"],
+ },
]);
});
-test("parent's services group includes meals and payment-statement, consistent with every other role", () => {
- const services = sidebarNavGroups("parent").find((group) => group.id === "services");
- expect(services?.items.map((item) => item.id)).toEqual(["meals", "payment-statement"]);
+test("manager sees the same admin tree minus the admin-only entries", () => {
+ const institution = visibleNavGroups("manager").find((group) => group.id === "institution");
+ expect(institution?.items.map((item) => item.id)).toEqual(["reports", "school-meals", "staff-work", "settings"]);
+ expect(institution?.items.map((item) => item.id)).not.toContain("license-modules");
+ expect(institution?.items.map((item) => item.id)).not.toContain("users");
+ expect(institution?.items.map((item) => item.id)).not.toContain("data-protection");
});
-test.each(["student", "parent", "teacher", "manager", "admin"] as const)(
- "%s can reach every visible feature and appointments from the sidebar",
- (role) => {
- const paths = [
- ...primaryNavItems(role).map((item) => item.to),
- ...sidebarNavGroups(role).flatMap((group) => group.items.map((item) => item.to)),
- ];
- expect(new Set(paths)).toEqual(new Set(visibleNavItems(role).map((item) => item.to)));
- expect(paths).toContain("/appointments");
- },
-);
+test("teacher's sidebar mirrors the Figma Sınıfım / Yapay zekâ / Diğer tree", () => {
+ expect(
+ visibleNavGroups("teacher").map((group) => ({
+ id: group.id,
+ items: group.items.map((item) => item.id),
+ })),
+ ).toEqual([
+ { id: "my-classroom", items: ["my-classes", "my-schedule", "student-attendance", "homework", "exams", "whiteboards"] },
+ { id: "ai", items: ["student-analysis", "pending-approvals", "question-generation", "sound-studio"] },
+ { id: "other", items: ["parent-communication", "work", "settings-teacher"] },
+ ]);
+});
+
+test("student's sidebar mirrors the Figma Çalışma / Yapay zekâ / Diğer tree", () => {
+ expect(
+ visibleNavGroups("student").map((group) => ({
+ id: group.id,
+ items: group.items.map((item) => item.id),
+ })),
+ ).toEqual([
+ { id: "study", items: ["study-plan", "topic-mastery", "exam-results", "my-homework", "whiteboards", "pomodoro"] },
+ { id: "ai", items: ["celebi", "sound-studio"] },
+ { id: "other", items: ["calendar", "settings-student"] },
+ ]);
+});
+
+test("parent's sidebar mirrors the Figma Öğrencim / Kurum tree", () => {
+ expect(
+ visibleNavGroups("parent").map((group) => ({
+ id: group.id,
+ items: group.items.map((item) => item.id),
+ })),
+ ).toEqual([
+ { id: "my-student", items: ["progress-report", "absence", "child-exam-results", "child-study-plan"] },
+ { id: "institution", items: ["payment-statement", "appointments", "settings-parent"] },
+ ]);
+});
+
+test("appointments is a parent-only sidebar entry, matching the Figma parent screen", () => {
+ expect(visibleNavGroups("parent").flatMap((g) => g.items).map((i) => i.to)).toContain("/appointments");
+ for (const role of ["student", "teacher", "manager", "admin"] as const) {
+ const paths = [...primaryNavItems(role).map((i) => i.to), ...visibleNavGroups(role).flatMap((g) => g.items.map((i) => i.to))];
+ expect(paths).not.toContain("/appointments");
+ }
+});
+
+test("entries with no backend yet are flagged soon and route to the shared placeholder", () => {
+ const hezarfenZeka = visibleNavGroups("admin")
+ .flatMap((g) => g.items)
+ .find((i) => i.id === "hezarfen-zeka");
+ expect(hezarfenZeka?.soon).toBe(true);
+ expect(hezarfenZeka?.to).toBe("/coming-soon/hezarfen-zeka");
+});
+
+test("Çelebi and account settings open an existing shell surface instead of navigating", () => {
+ const celebi = visibleNavGroups("student")
+ .flatMap((g) => g.items)
+ .find((i) => i.id === "celebi");
+ expect(celebi?.action).toBe("celebi");
+ const settings = visibleNavGroups("student")
+ .flatMap((g) => g.items)
+ .find((i) => i.id === "settings-student");
+ expect(settings?.action).toBe("profile");
+});
test("nested entity routes keep their primary destination active", () => {
- expect(pathActive("/courses/course-1", "/courses")).toBe(true);
- expect(routeNavItem("/courses/course-1", "teacher")?.id).toBe("classes");
+ expect(pathActive("/management/classes/class-1", "/management/classes")).toBe(true);
+ expect(routeNavItem("/management/classes/class-1", "teacher")?.id).toBe("my-classes");
expect(routeNavItem("/management/student-attendance", "teacher")?.id).toBe("student-attendance");
expect(primaryPathActive("/exams/exam-1", primaryNavItems("student")[1]!)).toBe(true);
});
test.each([
- ["/homework", "student", "homework"],
- ["/events/event-1", "teacher", "events"],
+ ["/homework/hw-1", "student", "my-homework"],
+ ["/homework/hw-1", "teacher", "homework"],
["/management/student-attendance", "teacher", "student-attendance"],
["/management/settings", "manager", "settings"],
] as const)("sidebar resolves one active item for %s", (pathname, role, expected) => {
- const items = [
- ...primaryNavItems(role),
- ...sidebarNavGroups(role).flatMap((group) => group.items),
- ];
+ const items = [...primaryNavItems(role), ...visibleNavGroups(role).flatMap((group) => group.items)];
const current = routeNavItem(pathname, role);
expect(items.filter((item) => item.id === current?.id).map((item) => item.id)).toEqual([expected]);
@@ -79,12 +147,18 @@ test.each([
["/attendance", "nav.attendance"],
["/studies", "courses.kind.study"],
["/clubs", "courses.kind.club"],
+ ["/courses", "nav.courses"],
+ ["/courses/course-1", "nav.courses"],
+ ["/notes", "nav.notes"],
+ ["/questions", "nav.questions"],
+ ["/events", "nav.events"],
+ ["/meals", "nav.meals"],
] as const)("%s has a header label", (pathname, expected) => {
expect(routeLabelKey(pathname, "student")).toBe(expected);
});
test("routes with a sidebar entry still take their nav label", () => {
- expect(routeLabelKey("/courses/course-1", "teacher")).toBe(routeNavItem("/courses/course-1", "teacher")?.labelKey);
+ expect(routeLabelKey("/homework/hw-1", "teacher")).toBe(routeNavItem("/homework/hw-1", "teacher")?.labelKey);
});
test("a route rendered outside the shell has no label rather than a raw path", () => {
@@ -94,8 +168,8 @@ test("a route rendered outside the shell has no label rather than a raw path", (
test("a page keeps its name for a viewer who may not open it", () => {
// /students is parent-only; an admin lands on the no-access screen, and the
// shell header must still say what page that is.
- expect(routeLabelKey("/students", "admin")).toBe("nav.children");
- expect(routeLabelKey("/students", "parent")).toBe("nav.children");
+ expect(routeLabelKey("/students", "admin")).toBe("nav.progressReport");
+ expect(routeLabelKey("/students", "parent")).toBe("nav.progressReport");
});
test("module gate fails open while the entitlement lookup is unknown", () => {
@@ -104,13 +178,13 @@ test("module gate fails open while the entitlement lookup is unknown", () => {
});
test("module gate hides nests the school did not buy", () => {
- const enabled = ["courses", "notes"];
- const primary = primaryNavItems("student", enabled).map((item) => item.to);
- expect(primary).toContain("/courses");
- expect(primary).not.toContain("/marks");
- const sidebar = sidebarNavGroups("teacher", enabled).flatMap((group) => group.items.map((item) => item.to));
- expect(sidebar).not.toContain("/meals");
- expect(sidebar).not.toContain("/messages");
+ const enabled = ["courses"];
+ const teacherPaths = visibleNavGroups("teacher", enabled).flatMap((group) => group.items.map((item) => item.to));
+ expect(teacherPaths).not.toContain("/homework");
+ expect(teacherPaths).not.toContain("/exams");
+ expect(teacherPaths).not.toContain("/whiteboards");
+ expect(teacherPaths).toContain("/management/classes");
+ expect(teacherPaths).toContain("/calendar");
});
test("ungated entries never drop on module filtering", () => {
diff --git a/src/components/layout/nav-items.ts b/src/components/layout/nav-items.ts
index ef9c3ef..ba3199e 100644
--- a/src/components/layout/nav-items.ts
+++ b/src/components/layout/nav-items.ts
@@ -2,29 +2,32 @@ import type { Component } from "solid-js";
import type { Role } from "@/api/client";
import {
IconArchive,
- IconBook,
+ IconBotSquare,
IconBriefcase,
- IconCalendar,
IconCalendarDays,
+ IconChalkboardTeacher,
IconChart,
- IconClock,
+ IconChartPie,
IconClipboardCheck,
+ IconClock,
+ IconEdit,
IconExam,
- IconGlobe,
- IconGrid,
- IconGuide,
IconHelpCircle,
IconHomework,
IconHome,
IconMessage,
- IconEdit,
- IconNote,
+ IconPackage,
IconReportAnalytics,
+ IconScan,
IconSchool,
IconSettings,
+ IconShieldCheck,
+ IconSparkles,
+ IconTarget,
IconUserCog,
IconUsers,
IconUtensils,
+ IconWaveform,
} from "@/components/ui/icons";
import type { MessageKey } from "@/i18n/messages";
import { hasExactRole, roleInRange } from "@/lib/roles";
@@ -40,6 +43,11 @@ export type NavItem = {
exact?: boolean;
/** Backend module nest behind this entry; hidden when the school did not buy it. */
module?: string;
+ /** No backend yet — routes to the shared placeholder and carries a "yakında" badge. */
+ soon?: boolean;
+ /** Opens an existing shell surface instead of navigating (the Çelebi panel,
+ * the account settings dialog) — both already live elsewhere in the shell. */
+ action?: "celebi" | "profile";
};
export type NavGroup = {
@@ -57,139 +65,190 @@ export const HOME_ITEM: NavItem = {
exact: true,
};
-const CLASSES_ITEM: NavItem = {
- id: "classes",
- to: "/courses",
- labelKey: "nav.classes",
- Icon: IconBook,
- module: "courses",
-};
-
-const CALENDAR_ITEM: NavItem = {
- id: "calendar",
- to: "/calendar",
- labelKey: "nav.calendar",
- Icon: IconCalendarDays,
-};
-
-const CHILDREN_ITEM: NavItem = {
- id: "children",
- to: "/students",
- labelKey: "nav.children",
- Icon: IconUsers,
- exactRole: "parent",
+const CELEBI_ITEM: NavItem = {
+ id: "celebi",
+ to: "",
+ labelKey: "nav.celebi",
+ Icon: IconSparkles,
+ action: "celebi",
};
-const PROGRESS_ITEM: NavItem = {
- id: "progress",
- to: "/marks",
- labelKey: "nav.marks",
- Icon: IconChart,
- exactRole: "student",
- module: "marks",
+const SOUND_STUDIO_ITEM: NavItem = {
+ id: "sound-studio",
+ to: "/coming-soon/ses-atolyesi",
+ labelKey: "nav.soundStudio",
+ Icon: IconWaveform,
+ soon: true,
};
-const MEALS_ITEM: NavItem = {
- id: "meals",
- to: "/meals",
- labelKey: "nav.meals",
- Icon: IconUtensils,
- module: "meals",
-};
+function settingsAction(id: string): NavItem {
+ return { id, to: "", labelKey: "nav.settings", Icon: IconSettings, action: "profile" };
+}
-const PRIMARY_BY_ROLE: Record = {
- student: [HOME_ITEM, CLASSES_ITEM, CALENDAR_ITEM, PROGRESS_ITEM],
- teacher: [HOME_ITEM, CLASSES_ITEM, CALENDAR_ITEM],
- manager: [HOME_ITEM, CLASSES_ITEM, CALENDAR_ITEM],
- admin: [HOME_ITEM, CLASSES_ITEM, CALENDAR_ITEM],
- // Meals stays out of the primary strip so it lives under "Community" for
- // every role consistently, same as teacher/manager/admin/student.
- parent: [HOME_ITEM, CHILDREN_ITEM, CALENDAR_ITEM],
-};
+// Admin and manager share one Figma information architecture (Operasyon /
+// Yapay zekâ / Kurum) — manager just qualifies for fewer of its items, via
+// the same minRole gates the rest of this file already uses.
+const ADMIN_GROUPS: NavGroup[] = [
+ {
+ id: "operations",
+ labelKey: "nav.group.operations",
+ Icon: IconSchool,
+ items: [
+ { id: "students-roster", to: "/coming-soon/ogrenciler", labelKey: "nav.studentsRoster", Icon: IconUsers, soon: true, minRole: "manager" },
+ { id: "teachers-roster", to: "/coming-soon/ogretmenler", labelKey: "nav.teachersRoster", Icon: IconChalkboardTeacher, soon: true, minRole: "manager" },
+ { id: "class-groups", to: "/management/classes", labelKey: "nav.classGroups", Icon: IconSchool, minRole: "teacher" },
+ { id: "schedule", to: "/calendar", labelKey: "nav.schedule", Icon: IconCalendarDays, minRole: "manager" },
+ { id: "student-attendance", to: "/management/student-attendance", labelKey: "nav.attendance", Icon: IconClipboardCheck, minRole: "teacher", module: "attendance" },
+ { id: "exams", to: "/exams", labelKey: "nav.exams", Icon: IconExam, minRole: "teacher", module: "exams" },
+ { id: "question-bank", to: "/question-bank", labelKey: "nav.questionBank", Icon: IconArchive, minRole: "teacher", module: "bank_questions" },
+ { id: "mock-exams", to: "/coming-soon/deneme-sinavlari", labelKey: "nav.mockExams", Icon: IconTarget, soon: true, minRole: "manager" },
+ { id: "optical-reading", to: "/coming-soon/optik-okuma", labelKey: "nav.opticalReading", Icon: IconScan, soon: true, minRole: "manager" },
+ { id: "payments-collection", to: "/management/payments", labelKey: "nav.payments", Icon: IconReportAnalytics, minRole: "manager", module: "payments" },
+ ],
+ },
+ {
+ id: "ai",
+ labelKey: "nav.group.ai",
+ Icon: IconSparkles,
+ items: [
+ { id: "hezarfen-zeka", to: "/coming-soon/hezarfen-zeka", labelKey: "nav.hezarfenZeka", Icon: IconBotSquare, soon: true, minRole: "manager" },
+ CELEBI_ITEM,
+ SOUND_STUDIO_ITEM,
+ ],
+ },
+ {
+ id: "institution",
+ labelKey: "nav.group.institution",
+ Icon: IconUserCog,
+ items: [
+ { id: "reports", to: "/coming-soon/raporlar", labelKey: "nav.reports", Icon: IconChartPie, soon: true, minRole: "manager" },
+ { id: "license-modules", to: "/coming-soon/lisans-modulleri", labelKey: "nav.licenseModules", Icon: IconPackage, soon: true, minRole: "admin" },
+ { id: "users", to: "/admin/users", labelKey: "nav.users", Icon: IconUserCog, minRole: "admin" },
+ { id: "data-protection", to: "/coming-soon/kvkk-denetim", labelKey: "nav.dataProtection", Icon: IconShieldCheck, soon: true, minRole: "admin" },
+ { id: "school-meals", to: "/meals", labelKey: "nav.schoolMeals", Icon: IconUtensils, minRole: "manager", module: "meals" },
+ { id: "staff-work", to: "/management/staff-work", labelKey: "nav.staffWork", Icon: IconBriefcase, minRole: "manager", module: "work" },
+ { id: "settings", to: "/management/settings", labelKey: "nav.settings", Icon: IconSettings, minRole: "manager" },
+ ],
+ },
+];
-const NAV_GROUPS: NavGroup[] = [
+const TEACHER_GROUPS: NavGroup[] = [
{
- id: "classes",
- labelKey: "nav.group.classes",
+ id: "my-classroom",
+ labelKey: "nav.group.myClassroom",
Icon: IconSchool,
items: [
- CLASSES_ITEM,
+ { id: "my-classes", to: "/management/classes", labelKey: "nav.myClasses", Icon: IconSchool },
+ { id: "my-schedule", to: "/calendar", labelKey: "nav.mySchedule", Icon: IconCalendarDays },
+ { id: "student-attendance", to: "/management/student-attendance", labelKey: "nav.attendance", Icon: IconClipboardCheck, module: "attendance" },
{ id: "homework", to: "/homework", labelKey: "nav.homework", Icon: IconHomework, module: "homework" },
{ id: "exams", to: "/exams", labelKey: "nav.exams", Icon: IconExam, module: "exams" },
- { id: "question-bank", to: "/question-bank", labelKey: "nav.questionBank", Icon: IconArchive, minRole: "teacher", module: "bank_questions" },
- { id: "marks", to: "/marks", labelKey: "nav.marks", Icon: IconChart, exactRole: "student", module: "marks" },
+ { id: "whiteboards", to: "/whiteboards", labelKey: "nav.whiteboards", Icon: IconEdit, module: "boards" },
],
},
{
- id: "planning",
- labelKey: "nav.group.planning",
- Icon: IconCalendarDays,
+ id: "ai",
+ labelKey: "nav.group.ai",
+ Icon: IconSparkles,
items: [
- { id: "events", to: "/events", labelKey: "nav.events", Icon: IconCalendar, module: "events" },
- CALENDAR_ITEM,
- { id: "appointments", to: "/appointments", labelKey: "nav.appointments", Icon: IconClock, module: "appointments" },
+ { id: "student-analysis", to: "/coming-soon/ogrenci-analizi", labelKey: "nav.studentAnalysis", Icon: IconChart, soon: true },
+ { id: "pending-approvals", to: "/coming-soon/bekleyen-onaylar", labelKey: "nav.pendingApprovals", Icon: IconHelpCircle, soon: true },
+ { id: "question-generation", to: "/coming-soon/soru-uretimi", labelKey: "nav.questionGeneration", Icon: IconEdit, soon: true },
+ SOUND_STUDIO_ITEM,
],
},
{
- id: "workspace",
- labelKey: "nav.group.workspace",
- Icon: IconNote,
+ id: "other",
+ labelKey: "nav.group.other",
+ Icon: IconMessage,
items: [
- { id: "notes", to: "/notes", labelKey: "nav.notes", Icon: IconNote, module: "notes" },
- { id: "whiteboards", to: "/whiteboards", labelKey: "nav.whiteboards", Icon: IconEdit, minRole: "student", module: "boards" },
- { id: "pomodoro", to: "/pomodoro", labelKey: "nav.pomodoro", Icon: IconClock, exactRole: "student", module: "pomodoro" },
- { id: "work", to: "/work", labelKey: "nav.work", Icon: IconBriefcase, minRole: "teacher", maxRole: "manager", module: "work" },
+ { id: "parent-communication", to: "/messages", labelKey: "nav.parentCommunication", Icon: IconMessage, module: "messages" },
+ { id: "work", to: "/work", labelKey: "nav.work", Icon: IconClock, minRole: "teacher", maxRole: "manager", module: "work" },
+ settingsAction("settings-teacher"),
],
},
+];
+
+const STUDENT_GROUPS: NavGroup[] = [
{
- id: "students",
- labelKey: "nav.group.students",
- Icon: IconReportAnalytics,
+ id: "study",
+ labelKey: "nav.group.study",
+ Icon: IconSchool,
items: [
- CHILDREN_ITEM,
- { id: "class-groups", to: "/management/classes", labelKey: "nav.classGroups", Icon: IconUsers, minRole: "teacher", module: "classes" },
- { id: "student-marks", to: "/management/student-marks", labelKey: "nav.studentMarks", Icon: IconChart, minRole: "teacher", module: "marks" },
- { id: "student-attendance", to: "/management/student-attendance", labelKey: "nav.studentAttendance", Icon: IconClipboardCheck, minRole: "teacher", module: "attendance" },
- { id: "student-pomodoro", to: "/management/pomodoros", labelKey: "nav.studentPomodoro", Icon: IconClock, minRole: "teacher", module: "pomodoro" },
+ { id: "study-plan", to: "/coming-soon/calisma-programim", labelKey: "nav.studyPlan", Icon: IconClock, soon: true },
+ { id: "topic-mastery", to: "/marks", labelKey: "nav.topicMastery", Icon: IconChart, exactRole: "student", module: "marks" },
+ { id: "exam-results", to: "/exams", labelKey: "nav.examResults", Icon: IconExam, module: "exams" },
+ { id: "my-homework", to: "/homework", labelKey: "nav.myHomework", Icon: IconHomework, module: "homework" },
+ { id: "whiteboards", to: "/whiteboards", labelKey: "nav.whiteboards", Icon: IconEdit, module: "boards" },
+ { id: "pomodoro", to: "/pomodoro", labelKey: "nav.pomodoro", Icon: IconClock, exactRole: "student", module: "pomodoro" },
],
},
{
- id: "services",
- labelKey: "nav.group.services",
- Icon: IconGuide,
+ id: "ai",
+ labelKey: "nav.group.ai",
+ Icon: IconSparkles,
+ items: [CELEBI_ITEM, SOUND_STUDIO_ITEM],
+ },
+ {
+ id: "other",
+ labelKey: "nav.group.other",
+ Icon: IconCalendarDays,
items: [
- MEALS_ITEM,
- { id: "payment-statement", to: "/payments", labelKey: "nav.paymentStatement", Icon: IconChart, maxRole: "student", module: "payments" },
+ { id: "calendar", to: "/calendar", labelKey: "nav.mySchedule", Icon: IconCalendarDays },
+ settingsAction("settings-student"),
],
},
+];
+
+const PARENT_GROUPS: NavGroup[] = [
{
- id: "community",
- labelKey: "nav.group.community",
- Icon: IconGlobe,
+ id: "my-student",
+ labelKey: "nav.group.myStudent",
+ Icon: IconUsers,
items: [
- { id: "messages", to: "/messages", labelKey: "nav.messages", Icon: IconMessage, module: "messages" },
- { id: "questions", to: "/questions", labelKey: "nav.questions", Icon: IconHelpCircle, module: "questions" },
+ { id: "progress-report", to: "/students", labelKey: "nav.progressReport", Icon: IconReportAnalytics, exactRole: "parent" },
+ { id: "absence", to: "/coming-soon/devamsizlik", labelKey: "nav.absence", Icon: IconClipboardCheck, soon: true },
+ { id: "child-exam-results", to: "/coming-soon/sinav-sonuclari-veli", labelKey: "nav.childExamResults", Icon: IconExam, soon: true },
+ { id: "child-study-plan", to: "/coming-soon/calisma-plani", labelKey: "nav.childStudyPlan", Icon: IconClock, soon: true },
],
},
{
- id: "school",
- labelKey: "nav.group.school",
- Icon: IconGrid,
+ id: "institution",
+ labelKey: "nav.group.institution",
+ Icon: IconUserCog,
items: [
- { id: "staff-work", to: "/management/staff-work", labelKey: "nav.staffWork", Icon: IconBriefcase, minRole: "manager", module: "work" },
- { id: "settings", to: "/management/settings", labelKey: "nav.settings", Icon: IconSettings, minRole: "manager" },
- { id: "terms", to: "/management/terms", labelKey: "nav.terms", Icon: IconCalendarDays, minRole: "manager" },
- { id: "payments", to: "/management/payments", labelKey: "nav.payments", Icon: IconReportAnalytics, minRole: "manager", module: "payments" },
- { id: "users", to: "/admin/users", labelKey: "nav.users", Icon: IconUserCog, minRole: "admin" },
+ { id: "payment-statement", to: "/payments", labelKey: "nav.payments", Icon: IconReportAnalytics, exactRole: "parent", module: "payments" },
+ { id: "appointments", to: "/appointments", labelKey: "nav.appointmentsAndCommunication", Icon: IconClock, exactRole: "parent", module: "appointments" },
+ settingsAction("settings-parent"),
],
},
];
+const GROUPS_BY_ROLE: Record = {
+ student: STUDENT_GROUPS,
+ teacher: TEACHER_GROUPS,
+ manager: ADMIN_GROUPS,
+ admin: ADMIN_GROUPS,
+ parent: PARENT_GROUPS,
+};
+
+// The mobile bottom tab bar keeps its own small, role-specific set — Figma's
+// desktop sidebar has no equivalent "primary strip" (only "Ana Sayfa" sits
+// outside the groups there), so this stays a phone-only affordance built
+// from items that also exist in the role's group tree above.
+const PRIMARY_BY_ROLE: Record = {
+ student: [HOME_ITEM, { id: "exam-results", to: "/exams", labelKey: "nav.examResults", Icon: IconExam, module: "exams" }, { id: "topic-mastery", to: "/marks", labelKey: "nav.topicMastery", Icon: IconChart, exactRole: "student", module: "marks" }],
+ teacher: [HOME_ITEM, { id: "my-classes", to: "/management/classes", labelKey: "nav.myClasses", Icon: IconSchool }, { id: "my-schedule", to: "/calendar", labelKey: "nav.mySchedule", Icon: IconCalendarDays }],
+ manager: [HOME_ITEM, { id: "class-groups", to: "/management/classes", labelKey: "nav.classGroups", Icon: IconSchool, minRole: "teacher" }, { id: "exams", to: "/exams", labelKey: "nav.exams", Icon: IconExam, minRole: "teacher", module: "exams" }],
+ admin: [HOME_ITEM, { id: "class-groups", to: "/management/classes", labelKey: "nav.classGroups", Icon: IconSchool, minRole: "teacher" }, { id: "exams", to: "/exams", labelKey: "nav.exams", Icon: IconExam, minRole: "teacher", module: "exams" }],
+ parent: [HOME_ITEM, { id: "progress-report", to: "/students", labelKey: "nav.progressReport", Icon: IconReportAnalytics, exactRole: "parent" }, { id: "appointments", to: "/appointments", labelKey: "nav.appointmentsAndCommunication", Icon: IconClock, exactRole: "parent", module: "appointments" }],
+};
+
function itemVisible(item: NavItem, role: Role | undefined) {
if (!role) return false;
if (item.exactRole) return hasExactRole(role, item.exactRole);
if (item.minRole || item.maxRole) return roleInRange(role, item.minRole, item.maxRole);
- return role !== "parent" || ["/", "/calendar", "/appointments", "/meals", "/messages"].includes(item.to);
+ return true;
}
/**
@@ -208,8 +267,12 @@ export function primaryNavItems(role: Role | undefined, enabled?: readonly strin
return PRIMARY_BY_ROLE[role].filter((item) => moduleVisible(item, enabled));
}
+/** The full, role-specific group tree — desktop sidebar and the mobile menu
+ * sheet both render this directly; it mirrors the Figma sidebar as-is, with
+ * no items pulled out for a separate "primary" section. */
export function visibleNavGroups(role: Role | undefined, enabled?: readonly string[] | null): NavGroup[] {
- return NAV_GROUPS
+ if (!role) return [];
+ return GROUPS_BY_ROLE[role]
.map((group) => ({
...group,
items: group.items.filter((item) => itemVisible(item, role) && moduleVisible(item, enabled)),
@@ -217,31 +280,19 @@ export function visibleNavGroups(role: Role | undefined, enabled?: readonly stri
.filter((group) => group.items.length > 0);
}
-export function sidebarNavGroups(role: Role | undefined, enabled?: readonly string[] | null): NavGroup[] {
- const primaryPaths = new Set(primaryNavItems(role, enabled).map((item) => item.to));
- return visibleNavGroups(role, enabled)
- .map((group) => ({ ...group, items: group.items.filter((item) => !primaryPaths.has(item.to)) }))
- .filter((group) => group.items.length > 0);
-}
-
export function visibleNavItems(role: Role | undefined, enabled?: readonly string[] | null): NavItem[] {
- const items = [HOME_ITEM, ...visibleNavGroups(role, enabled).flatMap((group) => group.items)];
- return items.filter((item, index) => items.findIndex((candidate) => candidate.to === item.to) === index);
+ const items = [HOME_ITEM, ...primaryNavItems(role, enabled), ...visibleNavGroups(role, enabled).flatMap((group) => group.items)];
+ return items.filter((item, index) => items.findIndex((candidate) => candidate.id === item.id && candidate.to === item.to) === index);
}
export function pathActive(pathname: string, to: string, exact?: boolean) {
+ if (!to) return false;
if (exact) return pathname === to;
return pathname === to || pathname.startsWith(`${to}/`);
}
export function primaryPathActive(pathname: string, item: NavItem) {
- if (pathActive(pathname, item.to, item.exact)) return true;
- const prefixes: Partial> = {
- classes: ["/homework", "/exams", "/question-bank"],
- calendar: ["/events", "/appointments"],
- progress: ["/attendance", "/pomodoro"],
- };
- return (prefixes[item.id] ?? []).some((prefix) => pathname.startsWith(prefix));
+ return pathActive(pathname, item.to, item.exact);
}
export function routeNavItem(pathname: string, role: Role | undefined): NavItem | undefined {
@@ -262,6 +313,11 @@ const UNLISTED_ROUTE_LABELS: { prefix: string; labelKey: MessageKey }[] = [
{ prefix: "/attendance", labelKey: "nav.attendance" },
{ prefix: "/studies", labelKey: "courses.kind.study" },
{ prefix: "/clubs", labelKey: "courses.kind.club" },
+ { prefix: "/courses", labelKey: "nav.courses" },
+ { prefix: "/notes", labelKey: "nav.notes" },
+ { prefix: "/questions", labelKey: "nav.questions" },
+ { prefix: "/events", labelKey: "nav.events" },
+ { prefix: "/meals", labelKey: "nav.meals" },
];
/**
@@ -281,7 +337,8 @@ export function routeLabelKey(pathname: string, role: Role | undefined): Message
// A page still has a name when the viewer may not open it — the shell title
// must not go blank on the "no access" screen — so fall back to the nav entry
// for any role, not just this one.
- return [HOME_ITEM, ...NAV_GROUPS.flatMap((group) => group.items)]
+ const allItems = [HOME_ITEM, ...Object.values(GROUPS_BY_ROLE).flatMap((groups) => groups.flatMap((group) => group.items))];
+ return allItems
.filter((entry) => pathActive(pathname, entry.to, entry.exact))
.sort((a, b) => b.to.length - a.to.length)[0]?.labelKey;
}
diff --git a/src/components/layout/side-nav.tsx b/src/components/layout/side-nav.tsx
index 68c1305..437445b 100644
--- a/src/components/layout/side-nav.tsx
+++ b/src/components/layout/side-nav.tsx
@@ -1,6 +1,6 @@
import { For, Show } from "solid-js";
import { Link, useNavigate, useRouterState } from "@tanstack/solid-router";
-import { primaryNavItems, routeNavItem, sidebarNavGroups, type NavItem } from "@/components/layout/nav-items";
+import { HOME_ITEM, routeNavItem, visibleNavGroups, type NavItem } from "@/components/layout/nav-items";
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
import { IconChevronRight } from "@/components/ui/icons";
import { cn } from "@/lib/cn";
@@ -9,7 +9,12 @@ import { useModules } from "@/stores/modules-context";
import { useShellFeed } from "@/stores/shell-feed-context";
import { useT } from "@/stores/preferences-context";
-export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean }) {
+export function SideNav(props: {
+ onNavigate?: () => void;
+ collapsed?: boolean;
+ onOpenCelebi?: () => void;
+ onOpenProfile?: () => void;
+}) {
const auth = useAuth();
const t = useT();
const feed = useShellFeed();
@@ -17,16 +22,22 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean })
const navigate = useNavigate();
const pathname = useRouterState({ select: (state) => state.location.pathname });
- const primary = () => primaryNavItems(auth.user()?.role, modules.enabled());
- const groups = () => sidebarNavGroups(auth.user()?.role, modules.enabled());
+ const home = () => (auth.user() ? [HOME_ITEM] : []);
+ const groups = () => visibleNavGroups(auth.user()?.role, modules.enabled());
const current = () => routeNavItem(pathname(), auth.user()?.role);
const unread = () => feed.unreadMessages().total;
const badgeFor = (item: NavItem) => (item.id === "messages" ? unread() : 0);
+ const runAction = (item: NavItem) => {
+ props.onNavigate?.();
+ if (item.action === "celebi") props.onOpenCelebi?.();
+ if (item.action === "profile") props.onOpenProfile?.();
+ };
+
return (
-
+
{(item) => {
const active = () => current()?.id === item.id;
return (
@@ -45,20 +56,6 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean })
>
{t(item.labelKey)}
- 0}>
-
- {unread() > 9 ? "9+" : unread()}
-
- }
- >
-
- {unread() > 9 ? "9+" : unread()}
-
-
-
);
}}
@@ -72,38 +69,43 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean })
{(item: NavItem) => {
const itemActive = () => current()?.id === item.id;
- return (
- props.onNavigate?.()}
- title={t(item.labelKey)}
- aria-current={itemActive() ? "page" : undefined}
- class={cn(
- // Active submenu item: bold foreground text + a bright segment over
- // the group's left guide line (no filled pill).
- "relative flex h-[30px] items-center gap-2.5 rounded-md px-2.5 text-[13px] outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",
- itemActive()
- ? "font-semibold text-foreground before:absolute before:-left-[9px] before:top-1 before:bottom-1 before:w-0.5 before:rounded-full before:bg-foreground"
- : "font-medium text-muted-foreground hover:bg-muted/70 hover:text-foreground",
- )}
- >
+ const linkClass = cn(
+ // Active submenu item: bold foreground text + a bright segment over
+ // the group's left guide line (no filled pill).
+ "relative flex h-[30px] items-center gap-2.5 rounded-md px-2.5 text-[13px] outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring",
+ itemActive()
+ ? "font-semibold text-foreground before:absolute before:-left-[9px] before:top-1 before:bottom-1 before:w-0.5 before:rounded-full before:bg-foreground"
+ : "font-medium text-muted-foreground hover:bg-muted/70 hover:text-foreground",
+ );
+ const content = (
+ <>
{t(item.labelKey)}
+
+
+ {t("nav.soon")}
+
+
0}>
-
- {unread() > 9 ? "9+" : unread()}
-
- }
- >
-
- {unread() > 9 ? "9+" : unread()}
-
-
+
+ {unread() > 9 ? "9+" : unread()}
+
-
+ >
+ );
+ return (
+ runAction(item)} title={t(item.labelKey)} class={cn(linkClass, "w-full text-left")}>
+ {content}
+
+ }
+ >
+ props.onNavigate?.()} title={t(item.labelKey)} aria-current={itemActive() ? "page" : undefined} class={linkClass}>
+ {content}
+
+
);
}}
@@ -154,12 +156,21 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean })
{
+ if (item.action) {
+ runAction(item);
+ return;
+ }
props.onNavigate?.();
void navigate({ to: item.to });
}}
>
{t(item.labelKey)}
+
+
+ {t("nav.soon")}
+
+
0}>
{unread() > 9 ? "9+" : unread()}
diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx
index b99ebfa..dfba075 100644
--- a/src/components/ui/icons.tsx
+++ b/src/components/ui/icons.tsx
@@ -5,6 +5,8 @@ import bellUrl from "@phosphor-icons/core/regular/bell.svg?url";
import bookOpenUrl from "@phosphor-icons/core/regular/book-open.svg?url";
import calendarDotsUrl from "@phosphor-icons/core/regular/calendar-dots.svg?url";
import caretDownUrl from "@phosphor-icons/core/regular/caret-down.svg?url";
+import chalkboardTeacherUrl from "@phosphor-icons/core/regular/chalkboard-teacher.svg?url";
+import chartPieUrl from "@phosphor-icons/core/regular/chart-pie.svg?url";
import caretLeftUrl from "@phosphor-icons/core/regular/caret-left.svg?url";
import caretRightUrl from "@phosphor-icons/core/regular/caret-right.svg?url";
import caretUpDownUrl from "@phosphor-icons/core/regular/caret-up-down.svg?url";
@@ -27,17 +29,22 @@ import houseUrl from "@phosphor-icons/core/regular/house.svg?url";
import listUrl from "@phosphor-icons/core/regular/list.svg?url";
import lockSimpleUrl from "@phosphor-icons/core/regular/lock-simple.svg?url";
import magnifyingGlassUrl from "@phosphor-icons/core/regular/magnifying-glass.svg?url";
+import packageUrl from "@phosphor-icons/core/regular/package.svg?url";
import paperPlaneTiltUrl from "@phosphor-icons/core/regular/paper-plane-tilt.svg?url";
import pencilSimpleUrl from "@phosphor-icons/core/regular/pencil-simple.svg?url";
import plusUrl from "@phosphor-icons/core/regular/plus.svg?url";
import questionUrl from "@phosphor-icons/core/regular/question.svg?url";
+import scanUrl from "@phosphor-icons/core/regular/scan.svg?url";
+import shieldCheckUrl from "@phosphor-icons/core/regular/shield-check.svg?url";
import sidebarSimpleUrl from "@phosphor-icons/core/regular/sidebar-simple.svg?url";
import signOutUrl from "@phosphor-icons/core/regular/sign-out.svg?url";
import sparkleUrl from "@phosphor-icons/core/regular/sparkle.svg?url";
+import targetUrl from "@phosphor-icons/core/regular/target.svg?url";
import trashUrl from "@phosphor-icons/core/regular/trash.svg?url";
import uploadSimpleUrl from "@phosphor-icons/core/regular/upload-simple.svg?url";
import usersUrl from "@phosphor-icons/core/regular/users.svg?url";
import warningUrl from "@phosphor-icons/core/regular/warning.svg?url";
+import waveformUrl from "@phosphor-icons/core/regular/waveform.svg?url";
import xUrl from "@phosphor-icons/core/regular/x.svg?url";
type IconProps = {
@@ -596,3 +603,31 @@ export function IconExternalLink(props: IconProps) {
export function IconBell(props: IconProps) {
return ;
}
+
+export function IconChalkboardTeacher(props: IconProps) {
+ return ;
+}
+
+export function IconChartPie(props: IconProps) {
+ return ;
+}
+
+export function IconPackage(props: IconProps) {
+ return ;
+}
+
+export function IconScan(props: IconProps) {
+ return ;
+}
+
+export function IconShieldCheck(props: IconProps) {
+ return ;
+}
+
+export function IconTarget(props: IconProps) {
+ return ;
+}
+
+export function IconWaveform(props: IconProps) {
+ return ;
+}
diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts
index 35e6b0c..7089c02 100644
--- a/src/i18n/messages.ts
+++ b/src/i18n/messages.ts
@@ -258,6 +258,45 @@ export type MessageKey =
| "nav.group.grades"
| "nav.group.community"
| "nav.group.services"
+ | "nav.group.operations"
+ | "nav.group.ai"
+ | "nav.group.institution"
+ | "nav.group.myClassroom"
+ | "nav.group.study"
+ | "nav.group.other"
+ | "nav.group.myStudent"
+ | "nav.studentsRoster"
+ | "nav.teachersRoster"
+ | "nav.schedule"
+ | "nav.mySchedule"
+ | "nav.mockExams"
+ | "nav.opticalReading"
+ | "nav.hezarfenZeka"
+ | "nav.celebi"
+ | "nav.soundStudio"
+ | "nav.reports"
+ | "nav.licenseModules"
+ | "nav.dataProtection"
+ | "nav.schoolMeals"
+ | "nav.myClasses"
+ | "nav.studentAnalysis"
+ | "nav.pendingApprovals"
+ | "nav.questionGeneration"
+ | "nav.parentCommunication"
+ | "nav.studyPlan"
+ | "nav.topicMastery"
+ | "nav.examResults"
+ | "nav.myHomework"
+ | "nav.progressReport"
+ | "nav.absence"
+ | "nav.childExamResults"
+ | "nav.childStudyPlan"
+ | "nav.appointmentsAndCommunication"
+ | "nav.soon"
+ | "comingSoon.title"
+ | "comingSoon.description"
+ | "comingSoon.emptyTitle"
+ | "comingSoon.emptyDescription"
| "nav.darkMode"
| "rightPanel.messagesTitle"
| "rightPanel.calendarTitle"
@@ -1794,9 +1833,9 @@ const en: Dict = {
"nav.pomodoro": "Pomodoro",
"nav.attendance": "Attendance",
"nav.questions": "Question pool",
- "nav.work": "Work log",
+ "nav.work": "Shift",
"nav.staffWork": "Staff shifts",
- "nav.users": "Users",
+ "nav.users": "Users & roles",
"nav.studentMarks": "Student marks",
"nav.studentAttendance": "Student attendance",
"nav.studentPomodoro": "Student pomodoros",
@@ -1820,6 +1859,45 @@ const en: Dict = {
"nav.group.grades": "Grades",
"nav.group.community": "Community",
"nav.group.services": "School services",
+ "nav.group.operations": "Operations",
+ "nav.group.ai": "AI",
+ "nav.group.institution": "Institution",
+ "nav.group.myClassroom": "My classroom",
+ "nav.group.study": "Study",
+ "nav.group.other": "Other",
+ "nav.group.myStudent": "My student",
+ "nav.studentsRoster": "Students",
+ "nav.teachersRoster": "Teachers",
+ "nav.schedule": "Class schedule",
+ "nav.mySchedule": "My schedule",
+ "nav.mockExams": "Mock exams",
+ "nav.opticalReading": "Optical reading",
+ "nav.hezarfenZeka": "Hezarfen AI",
+ "nav.celebi": "Çelebi",
+ "nav.soundStudio": "Sound studio",
+ "nav.reports": "Reports",
+ "nav.licenseModules": "License & modules",
+ "nav.dataProtection": "Data protection & audit",
+ "nav.schoolMeals": "Cafeteria management",
+ "nav.myClasses": "My classes",
+ "nav.studentAnalysis": "Student analysis",
+ "nav.pendingApprovals": "Pending approvals",
+ "nav.questionGeneration": "Question generation",
+ "nav.parentCommunication": "Parent communication",
+ "nav.studyPlan": "Study plan",
+ "nav.topicMastery": "Topic mastery",
+ "nav.examResults": "My exam results",
+ "nav.myHomework": "My homework",
+ "nav.progressReport": "Progress report",
+ "nav.absence": "Absence",
+ "nav.childExamResults": "Exam results",
+ "nav.childStudyPlan": "Study plan",
+ "nav.appointmentsAndCommunication": "Appointments & messages",
+ "nav.soon": "Coming soon",
+ "comingSoon.title": "Coming soon",
+ "comingSoon.description": "This module is on its way — there is nothing to show here yet.",
+ "comingSoon.emptyTitle": "Not available yet",
+ "comingSoon.emptyDescription": "This part of Hezarfen is still being built. Check back soon.",
"nav.darkMode": "Dark mode",
"parents.title": "My Students",
"parents.subtitle": "Review academic records for the students linked to your account.",
@@ -2893,9 +2971,9 @@ const en: Dict = {
"meals.editDish": "Edit dish",
"meals.dishName": "Dish name",
"meals.priceTry": "Price (TRY)",
- "nav.payments": "Fees",
+ "nav.payments": "Payments & collection",
"nav.paymentStatement": "My Fees",
- "nav.whiteboards": "Whiteboards",
+ "nav.whiteboards": "Board",
"whiteboard.title": "Whiteboards",
"whiteboard.subtitle": "Live collaborative sketch boards.",
"whiteboard.empty": "No whiteboards yet.",
@@ -3136,7 +3214,7 @@ const tr: Dict = {
"ai.skipTyping": "Cevabın tamamını göster",
"nav.today": "Bugün",
"nav.classes": "Eğitim",
- "nav.classGroups": "Şubeler",
+ "nav.classGroups": "Sınıflar",
"classGroups.title": "Şubeler",
"classGroups.subtitle": "Aynı dersleri paylaşan öğrenci grupları.",
"classGroups.newClass": "Yeni şube",
@@ -3351,9 +3429,9 @@ const tr: Dict = {
"nav.pomodoro": "Pomodoro",
"nav.attendance": "Yoklama",
"nav.questions": "Soru havuzu",
- "nav.work": "Çalışma kaydı",
- "nav.staffWork": "Personel mesaisi",
- "nav.users": "Kullanıcılar",
+ "nav.work": "Mesai",
+ "nav.staffWork": "Personel Mesai",
+ "nav.users": "Kullanıcılar ve roller",
"nav.studentMarks": "Öğrenci notları",
"nav.studentAttendance": "Öğrenci yoklamaları",
"nav.studentPomodoro": "Öğrenci pomodoroları",
@@ -3377,6 +3455,45 @@ const tr: Dict = {
"nav.group.grades": "Notlar",
"nav.group.community": "Topluluk",
"nav.group.services": "Okul hizmetleri",
+ "nav.group.operations": "Operasyon",
+ "nav.group.ai": "Yapay zekâ",
+ "nav.group.institution": "Kurum",
+ "nav.group.myClassroom": "Sınıfım",
+ "nav.group.study": "Çalışma",
+ "nav.group.other": "Diğer",
+ "nav.group.myStudent": "Öğrencim",
+ "nav.studentsRoster": "Öğrenciler",
+ "nav.teachersRoster": "Öğretmenler",
+ "nav.schedule": "Ders programı",
+ "nav.mySchedule": "Ders programım",
+ "nav.mockExams": "Deneme sınavları",
+ "nav.opticalReading": "Optik okuma",
+ "nav.hezarfenZeka": "Hezarfen Zekâ",
+ "nav.celebi": "Çelebi",
+ "nav.soundStudio": "Ses Atölyesi",
+ "nav.reports": "Raporlar",
+ "nav.licenseModules": "Lisans ve modüller",
+ "nav.dataProtection": "KVKK ve denetim",
+ "nav.schoolMeals": "Yemekhane Yönetimi",
+ "nav.myClasses": "Sınıflarım",
+ "nav.studentAnalysis": "Öğrenci analizi",
+ "nav.pendingApprovals": "Bekleyen onaylar",
+ "nav.questionGeneration": "Soru üretimi",
+ "nav.parentCommunication": "Veli iletişimi",
+ "nav.studyPlan": "Çalışma programım",
+ "nav.topicMastery": "Konu yetkinliğim",
+ "nav.examResults": "Sınav sonuçlarım",
+ "nav.myHomework": "Ödevlerim",
+ "nav.progressReport": "Gelişim raporu",
+ "nav.absence": "Devamsızlık",
+ "nav.childExamResults": "Sınav sonuçları",
+ "nav.childStudyPlan": "Çalışma planı",
+ "nav.appointmentsAndCommunication": "Randevu ve iletişim",
+ "nav.soon": "Yakında",
+ "comingSoon.title": "Yakında",
+ "comingSoon.description": "Bu modül hazırlanıyor — henüz gösterecek bir şey yok.",
+ "comingSoon.emptyTitle": "Henüz kullanıma açık değil",
+ "comingSoon.emptyDescription": "Hezarfen'in bu bölümü hâlâ hazırlanıyor. Yakında tekrar bakın.",
"nav.darkMode": "Karanlık mod",
"parents.title": "Öğrencilerim",
"parents.subtitle": "Size bağlı öğrencilerin akademik kayıtlarını inceleyin.",
@@ -4450,9 +4567,9 @@ const tr: Dict = {
"meals.editDish": "Yemeği düzenle",
"meals.dishName": "Yemek adı",
"meals.priceTry": "Fiyat (TRY)",
- "nav.payments": "Ücretler",
+ "nav.payments": "Ödeme ve tahsilat",
"nav.paymentStatement": "Ücretlerim",
- "nav.whiteboards": "Beyaz tahtalar",
+ "nav.whiteboards": "Tahta",
"whiteboard.title": "Beyaz tahtalar",
"whiteboard.subtitle": "Canlı ortak çizim tahtaları.",
"whiteboard.empty": "Henüz beyaz tahta yok.",
diff --git a/src/pages/coming-soon-page.tsx b/src/pages/coming-soon-page.tsx
new file mode 100644
index 0000000..331d134
--- /dev/null
+++ b/src/pages/coming-soon-page.tsx
@@ -0,0 +1,58 @@
+import { useLocation } from "@tanstack/solid-router";
+import { RouteGuard } from "@/components/layout/route-guard";
+import { PageHeader } from "@/components/layout/page-header";
+import { EmptyState } from "@/components/ui/empty-state";
+import type { MessageKey } from "@/i18n/messages";
+import { useT } from "@/stores/preferences-context";
+
+/**
+ * One route per not-yet-built module (see router.tsx's comingSoonRoutes) so
+ * each has its own URL, breadcrumb and back-button target, but they all
+ * render this same "not ready yet" page. The label comes from the last path
+ * segment, kept in step with COMING_SOON_LABELS below and with the matching
+ * sidebar entry's own labelKey in nav-items.ts.
+ */
+const COMING_SOON_LABELS: Record = {
+ "hezarfen-zeka": "nav.hezarfenZeka",
+ "ses-atolyesi": "nav.soundStudio",
+ "deneme-sinavlari": "nav.mockExams",
+ "optik-okuma": "nav.opticalReading",
+ raporlar: "nav.reports",
+ "lisans-modulleri": "nav.licenseModules",
+ "kvkk-denetim": "nav.dataProtection",
+ ogrenciler: "nav.studentsRoster",
+ ogretmenler: "nav.teachersRoster",
+ "ogrenci-analizi": "nav.studentAnalysis",
+ "bekleyen-onaylar": "nav.pendingApprovals",
+ "soru-uretimi": "nav.questionGeneration",
+ "calisma-programim": "nav.studyPlan",
+ devamsizlik: "nav.absence",
+ "sinav-sonuclari-veli": "nav.childExamResults",
+ "calisma-plani": "nav.childStudyPlan",
+};
+
+export default function ComingSoonPage() {
+ return (
+
+
+
+ );
+}
+
+function ComingSoonContent() {
+ const t = useT();
+ const location = useLocation();
+ const slug = () => location().pathname.split("/").filter(Boolean).pop() ?? "";
+ const labelKey = () => COMING_SOON_LABELS[slug()];
+ const title = () => {
+ const key = labelKey();
+ return key ? t(key) : t("comingSoon.title");
+ };
+
+ return (
+
+ );
+}
diff --git a/src/routes/router.tsx b/src/routes/router.tsx
index 297b078..5bc9442 100644
--- a/src/routes/router.tsx
+++ b/src/routes/router.tsx
@@ -66,6 +66,7 @@ const ProfilePage = lazyRoute(() => import("@/pages/profile-page"));
const PaymentStatementPage = lazyRoute(() => import("@/pages/payment-statement-page"));
const WhiteboardsPage = lazyRoute(() => import("@/pages/whiteboards-page"));
const WhiteboardPage = lazyRoute(() => import("@/pages/whiteboard-page"));
+const ComingSoonPage = lazyRoute(() => import("@/pages/coming-soon-page"));
function RootComponent() {
return (
@@ -396,6 +397,36 @@ const whiteboardRoute = createRoute({
component: WhiteboardPage,
});
+// One route per Figma menu entry with no backend yet — each gets its own URL
+// (so breadcrumbs, back and direct links behave normally) but all render the
+// same "not ready" page. Slugs are read back by coming-soon-page.tsx.
+const COMING_SOON_SLUGS = [
+ "hezarfen-zeka",
+ "ses-atolyesi",
+ "deneme-sinavlari",
+ "optik-okuma",
+ "raporlar",
+ "lisans-modulleri",
+ "kvkk-denetim",
+ "ogrenciler",
+ "ogretmenler",
+ "ogrenci-analizi",
+ "bekleyen-onaylar",
+ "soru-uretimi",
+ "calisma-programim",
+ "devamsizlik",
+ "sinav-sonuclari-veli",
+ "calisma-plani",
+] as const;
+
+const comingSoonRoutes = COMING_SOON_SLUGS.map((slug) =>
+ createRoute({
+ getParentRoute: () => rootRoute,
+ path: `/coming-soon/${slug}`,
+ component: ComingSoonPage,
+ }),
+);
+
const routeTree = rootRoute.addChildren([
indexRoute,
loginRoute,
@@ -445,6 +476,7 @@ const routeTree = rootRoute.addChildren([
whiteboardRoute,
myProfileRoute,
userProfileRoute,
+ ...comingSoonRoutes,
]);
function RouterPending() {