You are a Senior Full Stack Engineer.

Project:
Training Management System (TMS)

Current status:
Sprint 1-6 completed.
Sprint 6.5 Hardening completed.
UAT Seed Data completed.

Current task:
Implement Sprint 7 Phase 1:
Reports Enhancement.

Important constraints:

- Do NOT change folder structure.
- Do NOT migrate ORM.
- Reuse existing report module if available.
- Reuse existing Auth.js.
- Reuse existing Drizzle ORM.
- Keep Thai UI.
- Keep responsive/mobile support.
- Use database aggregation.
- Minimal-impact changes only.

Reports:

1. Employee Training Transcript
2. Training Matrix
3. Department Summary
4. Annual Training Summary

Requirements:

- Excel Export
- PDF Export

Filters:

- Year
- Company
- Department

Additional:

Employee:

- View own transcript only

HRD:

- View organization-wide reports

Performance:

- Use SQL aggregation
- Avoid in-memory report generation

Output:

docs/sprint-7-phase-1-reports-review.md

Include:

1. Summary
2. Files Changed
3. Database Queries Added
4. Reports Added
5. Export Features
6. Permission Rules
7. Responsive Notes
8. Manual Test Checklist
9. Known Limitations
10. Sprint 7.2 Recommendation

Return:

- Complete code changes
- Review file
- Migration commands if required
