Commit Graph

79 Commits

Author SHA1 Message Date
a4e2fbfe17 feat(03-02): create job edit form with ownership validation
- Add create_job_edit_form() method to programmatically create edit form
- Form uses 'job_edit' key and matches submission form fields exactly
- Configure Update Post action to update existing job_offer posts
- Add validate_job_ownership() method with frm_validate_entry hook
- Security: Validates job_id parameter, post_type, and post_author match
- Prevents URL parameter tampering by malicious providers
- Add get_job_edit_form_id() helper method
- Form pre-populates from post ID via URL parameter

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:44:29 +09:00
7aeecae506 feat(03-03): create notification class with admin alert on job submission
- Created DDHH_JM_Notifications class with email notification system
- Hook into transition_post_status to detect new pending job submissions
- Send German email to admin with job details and edit link
- Email includes: title, author, org, location, type, date, edit link
- Only trigger on new → pending transition to avoid spam on updates
- Log errors if wp_mail() fails (common in Local WP)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:44:07 +09:00
9d0305c429 docs(03-01): complete job submission form plan
Summary of Phase 3 Plan 1 implementation:
- Created Formidable job submission form with 7 fields
- Configured Create Post action with pending status
- Mapped form fields to ACF fields
- Integrated form into provider dashboard
- 2 tasks completed, 2 files modified, 0 issues

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:42:14 +09:00
600e355c8d feat(03-01): add job submission form to provider dashboard
- Add job submission form section above job listings table
- Display form using Formidable shortcode with graceful fallback
- Add visual separation styling for form section (gray background, padding, border-radius)
- Wrap job listings in separate section for better organization

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:41:28 +09:00
650c7b05cd feat(03-01): add job submission form creation
- Add create_job_submission_form() method to DDHH_JM_Formidable class
- Create Formidable form with key 'job_submission'
- Add 7 fields with German labels: title, description, location, type, deadline, email, logo
- Configure Create Post action: post_type='job_offer', status='pending'
- Map form fields to ACF fields: job_location, job_type, job_deadline, job_contact_email, job_logo
- Add get_job_submission_form_id() helper method
- Hook form creation into init action

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:40:56 +09:00
9c0657039a docs(03): create phase 3 plans
Phase 3: Job Management Core
- 4 plans created
- 8 total tasks defined
- Ready for execution

Plans:
- 03-01: Job submission form (Formidable + ACF)
- 03-02: Job edit form with ownership validation
- 03-03: Admin email notification on submission
- 03-04: Admin moderation UI enhancements

Parallelization:
- Wave 1: 03-01, 03-02, 03-04 (independent)
- Wave 2: 03-03 (depends on 03-01)
2026-01-14 19:35:57 +09:00
193bef2953 docs: complete Phase 2 - Provider Registration & Auth
Phase 2 complete with all 4 plans executed in parallel:
- 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

Total commits: 8 (5 feat + 3 docs)
Progress: 29% (2/7 phases complete)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:29:55 +09:00
ecb5c7ca45 docs(02-04): complete access control and redirects plan
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:27:51 +09:00
f5538ef5d8 docs(02-02): complete login/registration page plan
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:26:46 +09:00
4706f72ba4 feat(02-04): implement WP-Admin redirect for providers
- Create DDHH_JM_Access_Control class with redirect logic
- Redirect providers from WP-Admin to dashboard page
- Preserve access to profile.php for password/email changes
- Preserve access to admin-ajax.php for AJAX requests
- Integrate access control hooks in main plugin class

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:26:28 +09:00
dcfe79a727 feat(02-02): create login/registration page with responsive layout
- Add create_login_page() method to DDHH_JM_Pages class
- Combined view with registration form (Formidable shortcode) and login form (wp_login_form)
- German headings: "Neu registrieren" and "Bereits registriert?"
- Responsive two-column layout (desktop) with flexbox
- Stacked layout on mobile (< 768px)
- Inline CSS styling for visual separation and consistency
- Background colors and borders for section distinction
- Page accessible at /anbieter-login/
- Duplicate prevention: checks for existing page by slug

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:25:51 +09:00
5a4b877bc9 docs(02-03): complete provider dashboard plan
Phase 2 Plan 3 execution summary:
- Created dashboard template with job listing table
- Implemented WP_Query scoped to current user's jobs
- Added German UI with status badges and action links
- Registered [ddhh_provider_dashboard] shortcode
- Created /anbieter-dashboard/ page with shortcode
- All verification criteria met
- Ready for 02-04 (access control and redirects)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:23:14 +09:00
1c6598d8c2 docs(02-01): complete provider registration form plan
Phase 2 Plan 1 execution summary:
- Created Formidable registration form with 5 German-labeled fields
- Implemented auto-login and ddhh_provider role assignment
- Email uniqueness and password validation enforced
- Organization name stored as user meta
- All tasks completed successfully with 2 commits

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:20:59 +09:00
da8c6b0542 feat(02-03): create dashboard template with job listing table
- Created templates/provider-dashboard.php with:
  - User role check (ddhh_provider)
  - WP_Query for current user's job_offer posts
  - Table display with German column headings
  - Status badges (Veröffentlicht/Ausstehend/Entwurf)
  - Edit and View action links
  - Empty state message
  - Responsive CSS styling

- Created includes/class-dashboard.php with:
  - Template loader method
  - Shortcode registration [ddhh_provider_dashboard]
  - Output buffering for shortcode content

Dashboard queries only current user's posts with proper capability checking.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:20:42 +09:00
6e281b2e5a feat(02-01): integrate Formidable class with plugin
- Added class-formidable.php to autoload in main plugin file
- Hooked setup_registration_hooks() to init action
- Added missing class-roles.php and class-acf-fields.php to autoload
- Ensures Formidable integration runs after Formidable Forms loads

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:19:13 +09:00
39afa95114 feat(02-01): create Formidable registration form with auto-login
- Created DDHH_JM_Formidable class with registration form setup
- Programmatic form creation with 5 German-labeled fields
- Email uniqueness validation enforced
- Auto-login after successful registration
- ddhh_provider role assignment on user creation
- Organization name stored as user meta (ddhh_org_name)
- Duplicate submission prevention via email_exists() check
- Password validation (min 8 chars, confirmation match)
- Username generation from email prefix with uniqueness check

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:19:02 +09:00
054adb721a 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
2026-01-14 19:12:07 +09:00
fecb654b82 docs(01-01): complete plugin structure plan
Tasks completed: 2/2
- Create main plugin file with header
- Create main plugin class with activation/deactivation

SUMMARY: .planning/phases/01-foundation-setup/01-01-SUMMARY.md
2026-01-14 19:07:48 +09:00
d41fd500d5 docs(01-03): complete roles and fields plan
Tasks completed: 2/2
- Register ddhh_provider role with restricted capabilities
- Register ACF field group for job_offer metadata

SUMMARY: .planning/phases/01-foundation-setup/01-03-SUMMARY.md
2026-01-14 19:02:58 +09:00
c8fdf39f37 feat(01-03): register ACF field group for job_offer metadata
- Add DDHH_JM_ACF_Fields class with register_fields() method
- Field group 'Job Details' for post_type job_offer
- 6 fields: job_location (text, required), job_type (select, required),
  job_deadline (date_picker), job_contact_email (email, required),
  job_logo (image), job_deactivation_reason (textarea, conditional)
- German labels: Standort, Art, Bewerbungsfrist, Kontakt-E-Mail, Logo
- Logo returns ID for media library integration
- Deactivation reason field shows only when status != publish
- Hooked to 'acf/init' action
2026-01-14 19:01:25 +09:00
79b13895fc feat(01-03): register ddhh_provider role with restricted capabilities
- Add DDHH_JM_Roles class with add_roles() and remove_roles() methods
- Role 'ddhh_provider' (Anbieter) can edit/delete own job_offers only
- Jobs go to pending status (publish_job_offers: false)
- No access to regular posts/pages (edit_posts/edit_pages: false)
- Can upload files for logos
- Integrated with Activator and Deactivator hooks
2026-01-14 19:00:50 +09:00
8df0569159 docs(01-02): complete custom post type plan
Tasks completed: 2/2
- Register job_offer custom post type
- Add capability mapping filter for ownership enforcement

SUMMARY: .planning/phases/01-foundation-setup/01-02-SUMMARY.md
2026-01-14 18:58:45 +09:00
693974b561 feat(01-02): register job_offer CPT with ownership-enforced capabilities
- Register job_offer custom post type with German labels
- Custom capability_type 'job_offer' prevents access to regular posts
- map_meta_cap filter enforces per-post ownership
- Elementor support via show_in_rest
- Menu icon: dashicons-businessperson at position 5
- Supports: title, editor, author, thumbnail
- Archive slug: jobangebote
- Custom capabilities prevent providers from editing others' posts

Tasks completed:
- Task 1: Register job_offer custom post type
- Task 2: Add capability mapping filter for ownership enforcement

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:57:29 +09:00
7722848ef9 chore(01-02): add prerequisite plugin structure
- Create main singleton class
- Create activator with version checks
- Create deactivator with rewrite flush
- Update main file to include core classes

This is a blocking fix (Rule 3) - Plan 01-01 was not completed but
these files are required for Plan 01-02 to execute.
2026-01-14 18:56:38 +09:00
2471c7f7e8 feat(01-01): create main plugin class with activation/deactivation
- Add main singleton class DDHH_JM_Job_Manager
- Implement activation handler with WP/PHP version checks
- Implement deactivation handler with rewrite flush
- Use transient-based rewrite flush to avoid multiple flushes
- Add comprehensive security checks and documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:56:02 +09:00
5b74a4f2b9 feat(01-01): create main plugin file with header
- Add WordPress plugin header with metadata
- Define plugin constants (VERSION, PLUGIN_DIR, PLUGIN_URL, PLUGIN_FILE)
- Add security check for direct access
- Include main class file
- Initialize plugin on plugins_loaded hook

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:55:23 +09:00
8b296cefbe docs(01): create phase 1 plans
Phase 01: Foundation & Setup
- 3 plans created (all independent, can run parallel)
- 7 total tasks defined
- Ready for execution

Plans:
- 01-01: Plugin structure and activation hooks
- 01-02: Register job_offer CPT with capabilities
- 01-03: Register ddhh_provider role and ACF fields

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:47:23 +09:00
806c329345 docs: initialize ddhh-job-manager (7 phases)
Closed job board for digital dabei Hamburg with provider self-registration, admin moderation, and mentor access.

Phases:
1. Foundation & Setup: Plugin structure, CPT registration, custom role
2. Provider Registration & Auth: Registration form, login system, dashboard foundation
3. Job Management Core: Job submission, editing, moderation workflow
4. Job Deactivation System: Deactivation workflow with reason capture
5. Mentor Job Board: Protected archive, detail pages, apply system
6. Email Notifications: Admin alerts and mentor opt-in notifications
7. Testing & Polish: End-to-end testing, UI refinement, deployment prep

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:44:16 +09:00
4d462c60b1 docs: initialize ddhh-job-manager
Closed job board for digital dabei Hamburg with provider self-registration, admin moderation, and mentor access.

Creates PROJECT.md with requirements and constraints.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:39:06 +09:00