From e98e6c3bdebcdb7f22c15f1b320c7e45728a117f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Thu, 30 Jul 2026 13:29:40 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20role-based=20AI=20prompts,?= =?UTF-8?q?=20Monday-first=20calendar,=20hub=20descriptions=20-=20celebi-s?= =?UTF-8?q?uggestions:=20choose=20prompt=20set=20by=20role=20(student/staf?= =?UTF-8?q?f/parent)=20-=20calendar:=20Monday-first=20week=20ordering=20(s?= =?UTF-8?q?hort=20day=20names=20+=20first-day=20shift)=20-=20school-hub:?= =?UTF-8?q?=20bilingual=20descriptions=20on=20management=20link=20cards=20?= =?UTF-8?q?-=20courses:=20singular=20kind=20labels,=20required-field=20mar?= =?UTF-8?q?ker,=20kind=20summary=20row=20-=20empty-state:=20add=20a=20"mea?= =?UTF-8?q?ls"=20kind=20+=20cutlery=20icon;=20meals=20page=20uses=20it=20-?= =?UTF-8?q?=20table-row-actions:=20icon-only=20trigger=20with=20title=20to?= =?UTF-8?q?oltip=20(drop=20inline=20label)=20-=20dashboard:=20skip=20deadl?= =?UTF-8?q?ine=20search=20predicate=20when=20there=20are=20no=20deadlines?= =?UTF-8?q?=20-=20question-bank=20test:=20align=20fixture=20to=20the=2010-?= =?UTF-8?q?per-page=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/celebi-suggestions.tsx | 14 ++++++++++++-- src/components/ui/empty-state.tsx | 9 ++++++++- src/components/ui/table-row-actions.tsx | 6 +++--- src/pages/calendar-page.tsx | 7 ++++--- src/pages/courses-page.tsx | 11 ++++++++--- src/pages/dashboard-page.tsx | 3 +-- src/pages/meals-page.tsx | 2 +- src/pages/question-bank-page.test.tsx | 10 +++++----- src/pages/school-hub-page.tsx | 17 +++++++++-------- 9 files changed, 51 insertions(+), 28 deletions(-) diff --git a/src/components/layout/celebi-suggestions.tsx b/src/components/layout/celebi-suggestions.tsx index a04d394..4f3b971 100644 --- a/src/components/layout/celebi-suggestions.tsx +++ b/src/components/layout/celebi-suggestions.tsx @@ -1,14 +1,24 @@ import { For } from "solid-js"; import type { MessageKey } from "@/i18n/messages"; +import { useAuth } from "@/stores/auth-context"; import { useT } from "@/stores/preferences-context"; -const SUGGESTION_KEYS: MessageKey[] = ["ai.suggest1", "ai.suggest2", "ai.suggest3", "ai.suggest4"]; +const STUDENT_KEYS: MessageKey[] = ["ai.suggest1", "ai.suggest2", "ai.suggest3", "ai.suggest4"]; +const STAFF_KEYS: MessageKey[] = ["ai.suggestStaff1", "ai.suggestStaff2", "ai.suggestStaff3", "ai.suggestStaff4"]; +const PARENT_KEYS: MessageKey[] = ["ai.suggestParent1", "ai.suggestParent2", "ai.suggestParent3", "ai.suggestParent4"]; export function CelebiSuggestions(props: { onPick: (text: string) => void }) { const t = useT(); + const auth = useAuth(); + const keys = () => { + const role = auth.user()?.role; + if (role === "parent") return PARENT_KEYS; + if (role === "teacher" || role === "manager" || role === "admin") return STAFF_KEYS; + return STUDENT_KEYS; + }; return (
- + {(key) => (