docs(02): create phase 2 plans

Phase 02: Provider Registration & Auth
- 4 plans created
- 8 total tasks defined
- Ready for execution

Plans:
- 02-01: Formidable registration form with auto-login
- 02-02: Combined login/registration page
- 02-03: Provider dashboard template
- 02-04: Access control and redirects
This commit is contained in:
2026-01-14 19:12:07 +09:00
parent fecb654b82
commit 054adb721a
4 changed files with 564 additions and 0 deletions

View File

@@ -0,0 +1,141 @@
---
phase: 02-provider-registration-auth
plan: 02
type: execute
depends_on: ["02-01"]
files_modified: [includes/class-pages.php]
---
<objective>
Create combined login/registration page with Formidable shortcodes.
Purpose: Provide single entry point for providers to register or log in.
Output: WordPress page with registration form and login form in tabbed or stacked view.
</objective>
<execution_context>
~/.claude/get-shit-done/workflows/execute-plan.md
./summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/phases/02-provider-registration-auth/02-01-SUMMARY.md
**From 02-01:**
- Registration form exists with ID accessible via DDHH_JM_Formidable::get_registration_form_id()
- Form creates users with ddhh_provider role and auto-logs in
**Requirements:**
- German UI (v1)
- Combined login/registration view
- Match existing Elementor site style
</context>
<tasks>
<task type="auto">
<name>Task 1: Create login/registration page</name>
<files>includes/class-pages.php</files>
<action>
Create `includes/class-pages.php` with static method create_provider_pages():
Use wp_insert_post() to create page "Anbieter Login":
- post_title: 'Anbieter Login'
- post_name: 'anbieter-login'
- post_status: 'publish'
- post_type: 'page'
- post_content: Two-section layout with:
1. Registration section with heading "Neu registrieren" and Formidable shortcode [formidable id={registration_form_id}]
2. Login section with heading "Bereits registriert?" and WordPress default login form wp_login_form()
Store page ID in option 'ddhh_jm_login_page_id' for later reference.
Hook create_provider_pages() to plugin activation (call in Activator class).
Check if page already exists (by post_name) before creating to avoid duplicates on re-activation.
DO NOT create separate pages for login vs registration - combine in one page per PROJECT.md.
</action>
<verify>Page "Anbieter Login" exists at /anbieter-login/, displays registration form and login form</verify>
<done>Page created, accessible, shows both registration and login forms, German headings</done>
</task>
<task type="auto">
<name>Task 2: Style combined view for consistency</name>
<files>includes/class-pages.php</files>
<action>
Add basic styling to make login/registration sections visually distinct:
In post_content, wrap sections in div.ddhh-auth-container with:
- Registration section: div.ddhh-register-section
- Login section: div.ddhh-login-section
Add simple CSS (inline in page or via enqueued stylesheet):
- Two-column layout on desktop (50/50 split)
- Stacked on mobile
- Visual separator (border or background color difference)
- Headings styled consistently
Match Elementor site colors if possible (check if theme provides CSS variables).
DO NOT over-style - keep it minimal and functional for now. Phase 7 will polish UI.
</action>
<verify>Page displays cleanly on desktop (side-by-side) and mobile (stacked), forms readable and usable</verify>
<done>Combined view styled, responsive, visually clear separation between register and login sections</done>
</task>
</tasks>
<verification>
Before declaring plan complete:
- [ ] Page "Anbieter Login" exists and is published
- [ ] Registration form displays via shortcode
- [ ] Login form displays via wp_login_form()
- [ ] Layout responsive (desktop: side-by-side, mobile: stacked)
- [ ] German headings used
- [ ] Page accessible at /anbieter-login/
</verification>
<success_criteria>
- All tasks completed
- Combined login/registration page functional
- Both forms display and work
- Responsive layout
- Ready for Phase 3 (job submission forms)
</success_criteria>
<output>
After completion, create `.planning/phases/02-provider-registration-auth/02-02-SUMMARY.md`:
# Phase 2 Plan 2: Login/Registration Page Summary
**Combined login/registration page with responsive layout**
## Accomplishments
- WordPress page "Anbieter Login" created programmatically
- Registration form integrated via Formidable shortcode
- WordPress login form integrated
- Responsive two-column/stacked layout
- German headings
## Files Created/Modified
- `includes/class-pages.php` - Page creation and layout
- `includes/class-activator.php` - Hook create_provider_pages()
## Decisions Made
[Document layout choices, styling approach]
## Issues Encountered
[Problems and resolutions, or "None"]
## Next Step
Ready for 02-04-PLAN.md (sequential after 02-03 completes)
</output>