Repository navigation
Feat/41/integrate frontend backend update user profile - #89
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Note
|
| Layer / File(s) | Summary |
|---|---|
สัญญา API และชนิดข้อมูลการอัปเดต apps/api/src/controller/user.controller.ts, apps/api/src/router/user.router.ts |
รองรับ profileUrl: null, subjectIds ที่เป็น UUID ไม่ซ้ำ และ response ของ PUT /users/profile ที่มีข้อมูลโปรไฟล์เต็มรูปแบบ |
การตรวจสอบและบันทึกวิชาของติวเตอร์ apps/api/src/service/user.service.ts, apps/api/src/repository/subject.repository.ts, apps/api/src/repository/user.repository.ts |
ตรวจสอบ subject IDs ที่มีอยู่ ล้างและสร้างความสัมพันธ์ tutorSubjects ใหม่ และแปลงผลลัพธ์โปรไฟล์ผ่าน mapProfile |
ส่วนติดต่อผู้ใช้สำหรับแก้ไขโปรไฟล์
| Layer / File(s) | Summary |
|---|---|
ชนิดข้อมูลและตัวช่วยฝั่งเว็บ apps/web/src/types/profile.ts, apps/web/src/types/user.ts, apps/web/src/lib/api-client.ts, apps/web/src/components/profile/profile-completion-form.tsx |
เพิ่มชนิดข้อมูลโปรไฟล์ เมธอด apiClient.put และค่าระดับชั้นสำหรับฟอร์ม |
หน้าและฟอร์มแก้ไขโปรไฟล์ apps/web/src/app/profile/edit/page.tsx, apps/web/src/components/profile/profile-edit-form.tsx, apps/web/src/components/ui/multi-select.tsx, apps/web/src/components/ui/multi-select.stories.tsx |
โหลดข้อมูลโปรไฟล์และวิชา ตรวจสอบฟิลด์ ส่งข้อมูลตาม role และรองรับตัวเลือกแบบ label/value |
เส้นทางเข้าสู่หน้าแก้ไขโปรไฟล์ apps/web/src/components/Navbar.tsx, apps/web/src/components/profile/profile-details.tsx |
เพิ่มลิงก์ My profile และลิงก์ Edit Profile ไปยัง /profile/edit พร้อมลบปุ่มแก้ไขเดิมจากส่วนหัว |
Priority: ➖ Normal
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant User
participant ProfileEditForm
participant user.controller
participant user.service
participant userRepository
User->>ProfileEditForm: แก้ไขข้อมูลโปรไฟล์
ProfileEditForm->>user.controller: PUT /users/profile
user.controller->>user.service: ส่ง ProfileUpdateRequest
user.service->>userRepository: บันทึกโปรไฟล์และ tutorSubjects
userRepository-->>user.service: ส่ง UserProfileRow
user.service-->>ProfileEditForm: ส่งข้อมูลโปรไฟล์ที่อัปเดต
Merge Risk: ⚪ Minimal · up to b58ff
The profile-editing changes have no confirmed correctness or integration risk requiring a merge block.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 16 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description check | ✅ Passed | คำอธิบายระบุ User Story ID, รายละเอียดการเปลี่ยนแปลง, Checklist ที่ทำเครื่องหมายครบ, และภาพหน้าจอที่เกี่ยวข้อง เนื้อหาสอดคล้องกับวัตถุประสงค์ของ PR แม้ส่วน Remark จะว่าง แต่ไม่ใช่ข้อมูลสำคัญที่ทำให้คำ… |
| Title check | ✅ Passed | ชื่อ PR ระบุการเชื่อมต่อ Frontend และ Backend สำหรับการอัปเดตโปรไฟล์ ซึ่งตรงกับการเปลี่ยนแปลงหลักของ PR |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
- Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feat/41/Integrate-frontend-backend-update-user-profile
Warning
Some tools did not complete. Review the errors below.
🔧 ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
apps/web/src/components/profile/profile-completion-form.tsx
Oops! Something went wrong! :(
ESLint: 10.10.0
Error: Cannot read config file: /.eslint-tmp/node_modules/eslint-config-next/index.js
Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
Referenced from: /.eslint-tmp/node_modules/eslint-config-next/core-web-vitals.js
at Object. (/.eslint-tmp/node_modules/@rushstack/eslint-patch/lib-commonjs/_patch-base.js:244:19)
at Module._compile (node:internal/modules/cjs/loader:1830:14)
at Object..js (node:internal/modules/cjs/loader:1961:10)
at Module.load (node:internal/modules/cjs/loader:1553:32)
at Module._load (node:internal/modules/cjs/loader:1355:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.require (node:internal/modules/cjs/loader:1576:12)
at require (node:internal/modules/helpers:153:16)
at Object. (/.eslint-tmp/node_modules/@rushstack/eslint-patch/lib-commonjs/modern-module-resolution.js:11:23)
at Module._compile (node:internal/modules/cjs/loader:1830:14)
apps/web/src/components/profile/profile-edit-form.tsx
ESLint skipped: the matched ESLint configuration already failed (config-incompatibility).
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
| "University", | ||
| "Other", | ||
| ]; | ||
|
|
There was a problem hiding this comment.
Brother, I think putting GRADE_LEVELS back to this file would be a great idea. I encourage you to delete grade-levels.ts.
| export const GRADE_LEVELS = [ | ||
| "Grade 7", | ||
| "Grade 8", | ||
| "Grade 9", | ||
| "Grade 10", | ||
| "Grade 11", | ||
| "Grade 12", | ||
| "University", | ||
| "Other", | ||
| ]; |
|
Brother, before you fix, please run "git pull origin " because I have created new api for subject and merged it to this branch. |
…nd-update-user-profile' into feat/41/Integrate-frontend-backend-update-user-profile # Conflicts: # apps/web/src/components/profile/profile-edit-form.tsx
|
LGTM |
User Story ID
41
Description
Summary
Checklist
yarn lintpasses locallyScreenshot(s)
Remark