fix(dashboard): fix instructor avatar upload on course landing page (#745)

* fix(dashboard): fix instructor avatar upload on course landing page

The crop dialog was hidden behind the full-screen (z-250) landing-page
editor because bits-ui portals it to <body> at z-modal (200), and every
crop triggered an unbounded loop of POST /media/image requests.

- Add opt-in `elevatedDialog` prop to UploadImage that raises the crop
  dialog above the editor takeover; enable it in the instructor,
  certificate, and review landing-page editor forms.
- Break the upload effect loop in instructor-form by reading `course.id`
  through `untrack`, so the effect no longer re-runs when the setter
  reassigns `course` after each unique upload URL.
- Handle upload failures in instructor-form with a snackbar and always
  reset `isUploading`, so a failed upload no longer leaves the widget
  stuck and silent.

* docs(email): add email notification preferences PRD

Specify a Settings feature letting users enable/disable notification emails at two scopes: personal per-user preferences and org-wide admin defaults. Both gates must allow a send; transactional emails stay mandatory. Grounds storage in organization.settings and a new profile.settings jsonb, with a single preference guard at the email enqueue chokepoint.
This commit is contained in:
Rotimi Best
2026-07-13 00:01:11 +01:00
committed by GitHub
parent 7439f1f510
commit 2815a61437
15 changed files with 434 additions and 21 deletions
@@ -256,7 +256,8 @@
"file_size": "Kích thước tệp không được lớn hơn 500kb",
"try_again": "Thử lại",
"label": "Tải hình ảnh lên",
"fetch_error": "Lỗi tìm nạp hình ảnh từ Unsplash"
"fetch_error": "Lỗi tìm nạp hình ảnh từ Unsplash",
"upload_failed": "Không thể tải lên hình ảnh. Vui lòng thử lại."
}
},
"team_members": {