Add student administration view (studio-admin)
CI / Tests (PHP 8.1) (pull_request) Successful in 43s
CI / Coding Standards (pull_request) Successful in 56s
CI / PHPStan (pull_request) Successful in 57s
CI / No Debug Code (pull_request) Successful in 2s
CI / Tests (PHP 8.2) (pull_request) Successful in 44s
CI / Tests (PHP 8.3) (pull_request) Successful in 48s
CI / Build Plugin Zip (pull_request) Has been skipped
CI / Tests (PHP 8.1) (pull_request) Successful in 43s
CI / Coding Standards (pull_request) Successful in 56s
CI / PHPStan (pull_request) Successful in 57s
CI / No Debug Code (pull_request) Successful in 2s
CI / Tests (PHP 8.2) (pull_request) Successful in 44s
CI / Tests (PHP 8.3) (pull_request) Successful in 48s
CI / Build Plugin Zip (pull_request) Has been skipped
Implements #22: a read-only Students area for studio admins. - StudentController (manage_students): a list of us_student users with upcoming-lesson and active-enrolment counts, each linking to a detail page showing account info, upcoming/past lessons (offering, instructor, status), and group-class enrolments. - StudentSchedule::partition() — pure, unit-tested upcoming/past split. - Repo counts: BookingRepository::countUpcomingForStudent and EnrollmentRepository::countActiveForStudent (single-query, tested). - Templates: templates/admin/students.php, student-detail.php. - Students admin menu wired in AdminMenu (no Plugin change — the repos were already available there). - Docs: README status flipped to implemented; feature spec updated. Payment history slots into the detail when Payments (#7) lands. Tests: StudentScheduleTest + the two repo count tests. composer test (127), cs, and PHPStan level 6 all pass. Refs #22 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
## Overview
|
||||
A read-only studio-admin area to browse students and drill into one student's
|
||||
history and upcoming activity — lessons and group-class enrolments — without
|
||||
digging through individual records. (Status: planned — issue #22.)
|
||||
digging through individual records.
|
||||
|
||||
## Data Model
|
||||
No new tables. The views are composed from existing data:
|
||||
@@ -34,10 +34,11 @@ Read-only in this iteration; cancel/edit actions are a possible follow-up.
|
||||
## Implementation
|
||||
- Admin controller: `Unsupervised\Schedular\Auth\StudentController` (list + detail)
|
||||
- Templates: `templates/admin/students.php`, `templates/admin/student-detail.php`
|
||||
- Reuses `Booking\BookingRepository::findByStudent`,
|
||||
- Reuses `Booking\BookingRepository::findByStudent` + `countUpcomingForStudent`,
|
||||
`Availability\AvailabilityRepository::findById`,
|
||||
`Offering\OfferingRepository::findById`,
|
||||
`GroupClass\EnrollmentRepository::findByStudent`
|
||||
`GroupClass\EnrollmentRepository::findByStudent` + `countActiveForStudent`
|
||||
- Upcoming/past split: `Auth\StudentSchedule::partition()` (pure, unit-tested)
|
||||
- The upcoming/past split is extracted into a small pure helper so it is
|
||||
unit-testable (the controller itself follows the repo convention of not being
|
||||
unit-tested).
|
||||
|
||||
Reference in New Issue
Block a user