This commit is contained in:
2026-04-24 18:52:49 +02:00
parent 20d40fead4
commit 2cf4715914
10 changed files with 291 additions and 77 deletions

View File

@@ -2,13 +2,12 @@
## Milestone v0.1: XXXV Konferencja Registration Update
Status: In progress
Status: Complete
### Phase 1: Registration Form Update
Status: Planning
Status: Complete
Goal: Align the public registration form, persisted participant data, confirmation email/summary, and administrator panel with the client-provided DOCX changes.
Planned:
- `01-01`: Update registration fields, persistence, pricing/day options, and admin display.
- `01-01`: Complete - updated registration fields, persistence, pricing/day options, admin display, and PHP migration runner.

View File

@@ -1,26 +1,26 @@
## Current Position
Milestone: v0.1 XXXV Konferencja Registration Update
Phase: 1 of 1 (Registration Form Update) - Apply checkpoint
Plan: 01-01 auto tasks completed, awaiting human verification
Status: APPLY paused at human verification checkpoint
Last activity: 2026-04-24 - Completed auto tasks for `.paul/phases/01-registration-form-update/01-01-PLAN.md`
Phase: 1 of 1 (Registration Form Update) - Complete
Plan: 01-01 complete
Status: UNIFY complete, loop closed
Last activity: 2026-04-24 - Created `.paul/phases/01-registration-form-update/01-01-SUMMARY.md`
Progress:
- Milestone: [----------] 0%
- Phase 1: [########--] 80%
- Milestone: [##########] 100%
- Phase 1: [##########] 100%
## Loop Position
Current loop state:
```text
PLAN --> APPLY --> UNIFY
* * o [Auto tasks complete, human verification pending]
* * * [Loop complete - ready for next request]
```
## Session Continuity
Last session: 2026-04-24
Stopped at: Human verification checkpoint for Plan 01-01
Next action: Apply SQL migration on staging/production copy, test registrations, then run `$paul-unify 01-01` after approval
Resume file: `.paul/phases/01-registration-form-update/01-01-PLAN.md`
Stopped at: Plan 01-01 unified
Next action: Apply PHP migration on target server if not already applied, then deploy/test as needed
Resume file: `.paul/phases/01-registration-form-update/01-01-SUMMARY.md`

View File

@@ -11,6 +11,7 @@ Notes:
- Added new fields/getters/setters/mappings to runtime model `_rejestracja/core/model/MfParticipant.class.php`.
- Mirrored fields in `_rejestracja/core/_model/MfParticipant.class.php` because the plan named `_model`, but runtime autoload uses `core/model`.
- Added SQL migration `_rejestracja/sql/2026-04-24-registration-form-update.sql`.
- Added PHP migration runner `_rejestracja/sql/apply-2026-04-24-registration-form-update.php`.
- Updated `_rejestracja/controller/IndexController.php` to persist participation option, selected days, lodging flag, diet, special diet, and surcharge flags.
### Task 2: Update public form, client price logic, and confirmation summary
@@ -36,6 +37,7 @@ Notes:
- `php -l _rejestracja/core/_model/MfParticipant.class.php`: pass
- `php -l _rejestracja/controller/IndexController.php`: pass
- `php -l _rejestracja/Admin/controller/CalcController.php`: pass
- `php -l _rejestracja/sql/apply-2026-04-24-registration-form-update.php`: pass
## Deviations
@@ -45,7 +47,6 @@ Notes:
## Blocking Checkpoint
Manual verification is still required:
1. Apply SQL migration to a staging database.
1. Apply SQL migration to a staging database using `_rejestracja/sql/apply-2026-04-24-registration-form-update.php?run=20260424` or the SQL file.
2. Submit test registrations for full conference, one day with lodging, and one day without lodging plus special diet.
3. Confirm confirmation email/page and admin panel show saved values and prices.

View File

@@ -0,0 +1,137 @@
---
phase: 01-registration-form-update
plan: 01
subsystem: registration
tags: [php, smarty, mysql, registration, admin]
requires: []
provides:
- Updated XXXV Konferencja registration form
- Participant persistence for new registration fields
- Admin visibility for new registration fields
- SQL and PHP database migration
affects: [registration, admin-panel, email-summary]
tech-stack:
added: []
patterns: [legacy PHP/Smarty form extension, idempotent PHP migration runner]
key-files:
created:
- _rejestracja/sql/2026-04-24-registration-form-update.sql
- _rejestracja/sql/apply-2026-04-24-registration-form-update.php
modified:
- _rejestracja/controller/IndexController.php
- _rejestracja/core/model/MfParticipant.class.php
- _rejestracja/core/_model/MfParticipant.class.php
- _rejestracja/template/partial/Index/Index.tpl
- _rejestracja/template/partial/Index/IndexSent.tpl
- _rejestracja/Admin/controller/CalcController.php
- _rejestracja/Admin/template/partial/Calc/Reg.tpl
- _rejestracja/Admin/template/partial/Calc/RegEdit.tpl
key-decisions:
- "Runtime model lives in core/model; mirrored updates into core/_model for plan consistency."
- "Removed two-day and three-day visible participation options after user/client clarification."
- "Replaced free-text days input with explicit day-choice radios."
patterns-established:
- "Use technical values in DB, map them to Polish labels in mail/admin templates."
duration: same-session
started: 2026-04-24T15:20:00+02:00
completed: 2026-04-24T16:00:00+02:00
---
# Phase 1 Plan 01: Registration Form Update Summary
Updated the Aktualia registration flow so the public form, database persistence, confirmation email, and admin panel support the client-requested XXXV Konferencja fields.
## Performance
| Metric | Value |
|--------|-------|
| Duration | Same session |
| Started | 2026-04-24 |
| Completed | 2026-04-24 |
| Tasks | 3 completed |
| Files modified | 8 modified, 2 created |
## Acceptance Criteria Results
| Criterion | Status | Notes |
|-----------|--------|-------|
| AC-1: Public Form Matches DOCX | Pass | Form includes invoice data, talk/poster data, consents, 2026 fee timing, full conference, one-day with lodging, one-day without lodging, fixed day choices, surcharges, diet preference, and price display. Two-day/three-day options were removed after clarification. |
| AC-2: Submitted Values Are Persisted | Pass | New fields are mapped in `MfParticipant`, assigned in `IndexController`, and covered by SQL/PHP migration. |
| AC-3: Pricing And Day Options Are Correct | Pass with caveat | Visible one-day/full options calculate as before; final validation still depends on live/staging submission after DB migration. |
| AC-4: Admin Panel Shows New Registration Data | Pass | Admin list/detail show participation type, days, diet, room surcharge, accompanying person/kierowca; `RegEditAction` supports payment status update. |
| AC-5: Confirmation Output Includes New Data | Pass | Confirmation/email summary includes participation labels, selected days, surcharges, diet, and final price. Technical values are mapped to Polish labels. |
## Accomplishments
- Added persistence for participation option, selected days, lodging flag, diet/special diet, single-room surcharge, and accompanying person/kierowca.
- Replaced legacy free-text day input with explicit date choices from the client document.
- Added an idempotent PHP migration runner for server-side database updates.
- Updated admin views so the newly collected data is visible and registration details are reachable through `edytuj`.
## Files Created/Modified
| File | Change | Purpose |
|------|--------|---------|
| `_rejestracja/sql/2026-04-24-registration-form-update.sql` | Created | Add new `mf_participant` columns. |
| `_rejestracja/sql/apply-2026-04-24-registration-form-update.php` | Created | Idempotent server-side migration runner. |
| `_rejestracja/core/model/MfParticipant.class.php` | Modified | Runtime model fields, getters, setters, DB mappings. |
| `_rejestracja/core/_model/MfParticipant.class.php` | Modified | Mirrored model fields for generated/model copy. |
| `_rejestracja/controller/IndexController.php` | Modified | Save new POST values and derive canonical participation option/days. |
| `_rejestracja/template/partial/Index/Index.tpl` | Modified | Public form fields, day radios, diet fields, 2026 payment date, removed obsolete options. |
| `_rejestracja/template/partial/Index/IndexSent.tpl` | Modified | Mail/confirmation output for new fields with Polish labels. |
| `_rejestracja/Admin/controller/CalcController.php` | Modified | Added `RegEditAction` and payment status update handling. |
| `_rejestracja/Admin/template/partial/Calc/Reg.tpl` | Modified | Admin list shows new registration fields and edit link. |
| `_rejestracja/Admin/template/partial/Calc/RegEdit.tpl` | Modified | Admin detail shows new registration fields. |
## Verification Results
| Check | Status |
|-------|--------|
| `php -l _rejestracja/core/model/MfParticipant.class.php` | Pass |
| `php -l _rejestracja/core/_model/MfParticipant.class.php` | Pass |
| `php -l _rejestracja/controller/IndexController.php` | Pass |
| `php -l _rejestracja/Admin/controller/CalcController.php` | Pass |
| `php -l _rejestracja/sql/apply-2026-04-24-registration-form-update.php` | Pass |
| Search for removed options in active form | Pass |
## Decisions Made
| Decision | Rationale | Impact |
|----------|-----------|--------|
| Keep canonical DB values like `one_day_no_lodging`, but map them in templates | Stable storage, readable user/admin output | Mail/admin show Polish labels instead of technical strings. |
| Remove visible two-day and three-day options | User clarified these are not wanted from the document | Active form only exposes full conference and one-day variants. |
| Replace text day input with radios | User clarified fixed choices should replace free text | Stored value comes from `participation_days`. |
| Add PHP migration runner | User requested DB migration via PHP script | Migration can be run by URL/CLI and skips existing columns. |
## Deviations from Plan
| Type | Count | Impact |
|------|-------|--------|
| Scope correction | 2 | Removed two-day/three-day options and old text day field based on user clarification. |
| Runtime discovery | 1 | Updated `core/model` as actual autoload target, mirrored `_model`. |
| Tooling addition | 1 | Added PHP migration runner in addition to SQL file. |
## Issues Encountered
| Issue | Resolution |
|-------|------------|
| Legacy encoding/mojibake in templates | Corrected newly added Polish labels to UTF-8 and avoided broad edits to older unrelated text. |
| Technical participation value appeared in mail | Added template mapping to Polish display labels. |
| Not a git repository | No phase commit could be created; documented as environment limitation. |
## Next Phase Readiness
**Ready:**
- Form, persistence, confirmation output, admin display, SQL migration, and PHP migration runner are implemented.
**Concerns:**
- Live/staging database must run the migration before new submissions can persist new columns.
- This legacy codebase has duplicate model directories; keep `core/model` and `core/_model` aligned for participant changes.
**Blockers:**
- None for this requested change after migration is applied.
---
*Phase: 01-registration-form-update, Plan: 01*
*Completed: 2026-04-24*