Build a modern version of the legacy Paras ajuri page for the new Beagle app.
Context
The old page calculates and displays the best dogs in the Paras ajuri competition. It is currently implemented with legacy PHP, table-based layout, and frame-based navigation. We want the same business rules, but with a modern UI and maintainable calculation logic.
Business rules
- A season runs from August 1 of the selected start year to March 1 of the following year.
- Only completed trials with a valid score are included.
- Dogs must have at least 3 completed trials in the season.
- The final score is based on the 3 best qualifying BEAJ results.
- At least one of the 3 results must be on bare ground.
- Results must come from at least 2 different kennel districts.
- Only one full-season trial is allowed.
- A dog appears on the list only if the total score is at least 150 points.
UI requirements
- Replace the legacy frame/table layout with a modern responsive page.
- Show:
- page title
- short rules summary
- season selector
- threshold badge or label
- Display a ranked list of qualifying dogs with:
- rank
- dog name
- registration number
- sex
- total points
- Allow expanding each dog to show the 3 qualifying trial results.
- Include trial details:
- place
- date
- kennel district
- surface/weather indicator
- placing
- points
- Dog name should link to the dog profile page.
- Highlight selected or expanded rows.
- Add search/filter if useful.
Implementation requirements
- Put the scoring logic in a dedicated service/function, not inside the UI component.
- Make the calculation deterministic and testable.
- Use parameterized queries and modern code patterns.
- Preserve historical behavior where legacy logic is ambiguous.
- Add tests for:
- season date boundaries
- exactly 3 trials
- threshold at 150 points
- bare-ground requirement
- kennel district diversity requirement
- full-season trial limit
Acceptance criteria
- The page matches the legacy business rules.
- The UI is modern, responsive, and accessible.
- The calculation is isolated and covered by tests.
- Season changes update the results correctly.
- Qualifying dogs and their top 3 trials are shown correctly.
Build a modern version of the legacy Paras ajuri page for the new Beagle app.
Context
The old page calculates and displays the best dogs in the Paras ajuri competition. It is currently implemented with legacy PHP, table-based layout, and frame-based navigation. We want the same business rules, but with a modern UI and maintainable calculation logic.
Business rules
UI requirements
Implementation requirements
Acceptance criteria