Commit Graph

78 Commits

Author SHA1 Message Date
weli 8a33f35c87 fix: matrix view full-screen fill + show teacher/student names
- Add flex column layout for landscape full-screen fill
- Show teacher name and student names in matrix event blocks
- Refactor useClazzViewModel with makeEvent() helper
- Fix CSS nesting for .slot-row

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 08:54:11 +08:00
weli 30a845d7d3 feat: add wide-screen matrix view for clazz scheduling
Add dual-view mode to /clazz page — users can toggle between:
- Existing calendar view (portrait, FullCalendar timeGridWeek)
- New matrix view (landscape, X=date×timeSlot, Y=parallel lanes)

Includes:
- constants.ts: fixed time slot templates (08:40, 10:10, 14:00, 15:30)
- useClazzViewModel.ts: normalized event model composable
- ClazzMatrixView.vue: matrix component with lane packing algorithm
- index.vue: view toggle, matrix navigation, cell/block interactions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 08:39:09 +08:00
weli d3df324b8b feat: add 创建排课 button to calendar; fix 操作记录 spacing
- Add "创建排课" custom button in FullCalendar header toolbar, defaults
  to current date/time + 45min duration, guarded by is_teacher check
- Add margin-bottom to 操作记录 cell so it doesn't crowd the footer buttons

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 22:17:49 +08:00
weli c96830c301 feat: add lesson statistics pages and audit log viewer
- Add student lesson records page (/student/lessons)
- Add teacher lesson statistics page (/teacher/stats)
- Add supervisor statistics page (/supervisor/stats)
- Add navigation entries in student/teacher/supervisor profiles
- Add audit log viewer in clazz detail modal
- Add getAuditLog, queryStudentLessons, queryTeacherDetailStats store methods
- Register new routes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 19:46:00 +08:00
weli 53989e5731 fix: course package detail page - permission gate, status logic, preview lock 2026-05-01 10:50:56 +08:00
weli 6e4ef03e07 fix: show placeholder when cover_image_url is null
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 10:10:46 +08:00
weli c511cc318c feat: load all public packages without org_id for guest storefront
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 10:01:37 +08:00
weli ddaa862582 fix: handle empty org_id gracefully in course-package-store + index.vue
- CoursePackageStore: don't show error when no orgId and unauth,
  just show empty state
- index.vue: only render CoursePackageStore when org_id is available
  in URL, otherwise show original login prompt

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 08:43:13 +08:00
weli b8dca18ea4 fix: support org_id from URL query param in course-package-store
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 08:17:31 +08:00
weli f033e303ce feat: add course package storefront for unauth and home pages
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 08:08:01 +08:00
weli e65ef12cfc fix: redirect teacherless students to teacher-select page
When a student has no claimed teachers, redirect them to the
teacher-select page instead of silently landing on the home page
with no teacher. The teacher-select page falls back to showing
available valid teachers when the student's teacher list is empty.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 01:56:28 +08:00
weli 09653ae15b fix: remove org-unaware teacher claiming page from index.vue
- Remove the "请选择您的老师" page (v-else-if block) that showed teachers
  from all orgs
- Remove the mine.length === 0 guard in watchEffect - students with no
  teachers now redirect to home page normally
- Teacher selection moves to profile page /student/teacher-select
- Remove unused code (getAllTeachers, teachers computed, chooseTeacher)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 01:22:58 +08:00
weli 59f4158d24 fix: simplify student role switch and org switch to use index page auto-select
- Update chooseRole STUDENT branch: redirect to / instead of teacher-select
- Update org/select.vue: redirect to / for students (index page handles auto-select)
- Remove unused imports

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 01:18:21 +08:00
weli 51af5f4f1c fix: org-filtered teacher list and fix teacher selection redirect loop
- Replace getValidTeachers() with getAllTeachers() for org-scoped teacher list
- Fix chooseTeacher() to use async/await with error handling instead of reload
- After claiming teacher, refresh mine list and navigate without page reload
- Fix chooseRole STUDENT branch: clear teacher and redirect to teacher-select
- Remove auto-select on role switch (user should pick explicitly)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 01:14:10 +08:00
weli e7b70b2ba8 fix: restore assets_base to CDN for huiwing (CDN sync now working) 2026-05-01 00:56:41 +08:00
weli b751bf83ee fix: serve huiwing assets from nginx instead of CDN (CDN sync broken) 2026-05-01 00:52:39 +08:00
weli 8589f79e52 feat: auto-select default teacher on student login, redirect to teacher-select on org switch
- Add tryAutoSelect() to teacher store to pick first teacher when none selected
- Auto-select first teacher when student role is confirmed (both auto-login and manual role selection)
- Redirect students to /student/teacher-select after org switch, clearing previous teacher
- Covers: chooseRole(), single-role auto-login, and index page initialization

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 00:51:36 +08:00
weli e5e6de01d3 perf: parallelize independent requests in daka detail page
Use Promise.all for user group queries, comment loading,
and resource note group fetching.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:59:48 +08:00
weli 8589a6fc02 feat: student teacher switching in profile page
Add teacher context for students: show current teacher in profile,
allow switching via new teacher-select page. Filter daka queries
by selected teacher when available.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:50:39 +08:00
weli d117eb06f6 feat(course-package): detail page, publish/unpublish UI, edit lock
- Add detail/show page with conditional action buttons
- Route /course/course-package/detail with props query params
- List page click navigates to detail instead of edit
- Edit page redirects if package is published (published_at set)
- Store: add publish/unpublish API functions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 21:06:19 +08:00
weli 8a8ce597b3 fix(pick): show my course groups tab in course-package picker
Course-package picker only showed org-visible groups, but supervisors
also need to see and use their own course groups. Add "我的课节" tab
for course-package mode.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 15:14:03 +08:00
weli 058e1b0a47 feat(course-package): add org_visible toggle and course-group picker
- CourseGroup: add org_visible field, teacher toggle on add/edit
- CoursePackage: add selectedGroups state, sync/list package items API
- Group picker: support COURSE_PACKAGE target, show org-visible groups

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 14:26:17 +08:00
weli b78f25da20 feat(course-package): add course-package CRUD pages under 教学资源库
Add list/add/edit views for course-package under the qumu section,
visible to TEACHER and SUPERVISOR roles via the 教学资源库 tab.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 13:51:27 +08:00
weli c3edff465b feat(org-home): render homepage markdown with signed images on teacher/student home
Made-with: Cursor
2026-04-28 10:45:11 +08:00
weli 4db9bc82c8 fix(org-homepage): sign upyun imgs in preview; strip failed upload placeholders
Made-with: Cursor
2026-04-28 09:46:48 +08:00
weli 925decd472 chore: vConsole logs for org homepage image compress upload
Made-with: Cursor
2026-04-28 08:32:17 +08:00
weli 1509bcbb99 fix(org): validate compress URL; register org_homepage in hty_resources
Made-with: Cursor
2026-04-28 08:25:09 +08:00
weli 6d74a34aa2 feat(org): homepage markdown image insert via compress pipeline
Made-with: Cursor
2026-04-28 08:07:34 +08:00
weli 1c59acc72b debug: 排课 clazz API 失败时输出 [ClazzApi]/[ClazzQuery] 到 vConsole
Made-with: Cursor
2026-04-28 00:41:28 +08:00
weli 27ce76bdfd fix(request): clazz API 使用 KC_SERVER/UC_SERVER 绝对 URL,避免相对路径落到错误 vhost 返回 HTML
Made-with: Cursor
2026-04-28 00:38:09 +08:00
weli fb7d15e6a1 fix: read course_id from route for course section list
WeChat webview can desync route query from route props; use useRoute for course_id and log API failures to console. Watch course_id to refetch when query changes.

Made-with: Cursor
2026-04-28 00:25:38 +08:00
weli 4f67165d59 fix: normalize course section resources to array
Sanitize course section resources payloads across list and id queries to avoid runtime filter/some failures from malformed resource shapes, with CourseSectionResourceDebug diagnostics.

Made-with: Cursor
2026-04-28 00:21:24 +08:00
weli 8977f13a05 fix: guard course section pagination payload shape
Normalize paged and list responses for course section APIs to prevent runtime errors on infinite scroll and emit CourseSectionPayloadDebug diagnostics for malformed payloads.

Made-with: Cursor
2026-04-28 00:19:23 +08:00
weli 7d4dd382b4 fix: guard clazz list payload shape with debug logs
Prevent runtime filter crashes in /clazz by normalizing API payloads to arrays and emitting ClazzPayloadDebug diagnostics when response shape is unexpected.

Made-with: Cursor
2026-04-28 00:17:02 +08:00
weli 98c0bfd195 refactor: rename clazz UI label to 排课
Use 排课 for /clazz tab and page titles to avoid confusion with teaching-domain 课程 terminology.

Made-with: Cursor
2026-04-28 00:15:33 +08:00
weli 543cab9ea7 fix: guard course list shape before filtering
Normalize find_all_courses response to an array and add page-level array fallback to prevent filter runtime errors when response payload is malformed.

Made-with: Cursor
2026-04-28 00:12:09 +08:00
weli 9f2ba95b1f fix: read org context from jwt sub claim payload
Parse current_org_id/current_org_role_keys from subject payload when tokens are encoded under claims.sub, so org switch context is correctly detected.

Made-with: Cursor
2026-04-28 00:05:49 +08:00
weli e15b68b16f chore(debug): add detailed org switch token diagnostics
Record before/after jwt org context decode details for org switch into console and localStorage, and surface actionable debug dialog when returned token lacks org context.

Made-with: Cursor
2026-04-28 00:03:00 +08:00
weli 713af27749 fix: harden org switch token validation and exit org page
Validate current_org_id from switch token before accepting it, align auth/sudo tokens, and force full navigation to home after switch to avoid staying on org-select state.

Made-with: Cursor
2026-04-27 23:59:56 +08:00
weli da9c365fc0 fix: avoid blocking org switch on full user refresh
After org switch, sync sudo token and navigate to home immediately instead of awaiting read() chain, preventing org select page from stalling.

Made-with: Cursor
2026-04-27 23:57:51 +08:00
weli d1caecd9e0 fix: decode org context from jwt payload robustly
Add base64 padding before atob when parsing token payload so current_org_id extraction no longer fails intermittently and loops users back to org select.

Made-with: Cursor
2026-04-27 23:55:24 +08:00
weli eb7c8e8831 fix: keep org context when refreshing user session
Avoid overwriting switched auth context with sudo2 token in read(); reuse Authorization as sudo token when current_org_id already exists.

Made-with: Cursor
2026-04-27 23:42:20 +08:00
weli 29262d67ec fix: align sudo token with switched auth org context
After org switch, set HtySudoerToken to the refreshed Authorization token so ws endpoints receive current_org_id instead of a sudo2 token without org context.

Made-with: Cursor
2026-04-27 23:40:16 +08:00
weli be5c4fa046 fix: refresh sudo token after org switch
Regenerate HtySudoerToken after switching organization so ws endpoints that read org context from sudo token no longer fail with current_org_id required.

Made-with: Cursor
2026-04-27 23:36:44 +08:00
weli 79a69719b1 fix: auto bootstrap org context outside index route
Ensure authenticated users without current_org_id are redirected or auto-switched before entering business routes, preventing global 500 errors after multi-organization rollout.

Made-with: Cursor
2026-04-27 23:32:48 +08:00
weli 0ea90bd282 feat(front): render organization homepage on role home pages
Show current organization homepage text on student and teacher home pages and provide fallback guidance when org is not selected.

Made-with: Cursor
2026-04-27 22:35:37 +08:00
weli 77f90b1948 fix(front): route legacy jihua notifications to daka pages
Avoid dead links after jihua route cleanup by redirecting related notification actions to daka flows with safe fallback behavior.

Made-with: Cursor
2026-04-27 22:06:33 +08:00
weli 02f39ddaf6 feat(front): add org context UI and role scoping
Introduce organization selection/homepage flows, show current organization on profile pages, and scope displayed roles to the active organization context while preserving system-wide behavior.

Made-with: Cursor
2026-04-27 21:52:26 +08:00
weli 80459e2b60 front: recover watermark url from DONE tasks or resubmit when missing result
Made-with: Cursor
2026-04-27 16:46:39 +08:00
weli 968ed4ab09 front: refresh ref_resource before reporting watermark transcoding
Made-with: Cursor
2026-04-27 10:53:05 +08:00