Redesign admin dashboard with sidebar layout, planner overhaul, and readability fixes
Build and Push Docker Image / build-and-push (push) Successful in 41s
Build and Push Docker Image / build-and-push (push) Successful in 41s
- Replace horizontal top-nav with a dark sidebar (grouped: People / Academics / Tools) - Add Dashboard landing page with kid stat cards, today's schedule, and recent scores - Add /api/admin/schedule and /api/admin/recent-scores endpoints for dashboard data - Add Lock button and mobile sidebar toggle in top bar - Redesign planner toolbar: two-section layout (nav left, actions right) - Elevate auto-schedule out of hidden accordion into always-visible inline bar - Richer planner task cards: course color stripe, course name label, completion counter per day - Dashed "+ Add task" empty state instead of plain dash - Fix nav-pill CSS conflict: student tabs (light bg) now use dark text; admin sidebar keeps white text - Add seed.js demo data script for two students (Emma and Liam) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab32ba8634
commit
7775c4fc3a
5 files changed
+1423
-126
No files matched your search
@@ -829,6 +829,24 @@ app.post('/api/parent/pin', requirePin, (req, res) => {
|
||||
res.json({ ok: true });
|
||||
});
|
||||
|
||||
app.get('/api/admin/schedule', requirePin, (req, res) => {
|
||||
const { date } = req.query;
|
||||
const d = date || new Date().toISOString().slice(0, 10);
|
||||
const rows = db.prepare(`SELECT * FROM schedule WHERE date = ? ORDER BY student_id, sort`).all(d);
|
||||
res.json({ rows });
|
||||
});
|
||||
|
||||
app.get('/api/admin/recent-scores', requirePin, (req, res) => {
|
||||
const scores = db.prepare(`
|
||||
SELECT s.id, s.student_id, i.title, s.score, s.total, s.submitted_at
|
||||
FROM submissions s
|
||||
JOIN items i ON i.id = s.item_id
|
||||
ORDER BY s.submitted_at DESC
|
||||
LIMIT 20
|
||||
`).all();
|
||||
res.json({ scores });
|
||||
});
|
||||
|
||||
app.get('/api/admin/app-settings', requirePin, (req, res) => {
|
||||
res.json({
|
||||
school_name: getSetting('school_name') || '',
|
||||
|
||||
Reference in new issue
Block a user