Project-Image-Uploader/docs
matthias.lotz 324c46d735 feat(phase2): Complete Management Portal with reusable ConsentCheckboxes
Phase 2 Frontend completed (Tasks 12-17, 19-20) - 14. Nov 2025

Backend Enhancements:
- Enhanced PUT /api/manage/:token/consents to support creating new consents
- INSERT new consent row when restoring consent for platform not selected during upload
- Enables granting consents for previously unselected platforms

Frontend Refactoring (Code Deduplizierung):
- Extended ConsentCheckboxes component for both modes (upload & manage)
- Removed ~150 lines of duplicated consent UI code from ManagementPortalPage
- New mode prop: 'upload' (default) | 'manage'
- Dynamic hint texts and validation rules based on mode
- Workshop consent required only in upload mode

ManagementPortalPage Updates:
- Replaced custom consent UI with reusable ConsentCheckboxes component
- New state currentConsents tracks checkbox values
- New handler handleConsentChange() computes changes vs original
- Local change collection with batch save on button click
- Email link for social media post deletion (mailto workaround)
- Save/Discard buttons only visible when pending changes exist

ConsentBadges Fix:
- Now correctly displays only active (non-revoked) consents
- Updates properly after consent revocation

Documentation:
- Updated FEATURE_PLAN with Phase 2 Frontend completion status
- Added refactoring section documenting code deduplizierung
- Updated README with Management Portal features
- Documented email backend solution requirement (future work)

Results:
 100% consistent UI between upload and management
 Zero code duplication for consent handling
 ConsentBadges correctly filters revoked consents
 Backend supports granting new consents after upload
 Management link displayed on upload success page
 All manual tests passed

Tasks Completed:
- Task 12: Management Portal UI (/manage/:token)
- Task 13: Consent Management (revoke/restore)
- Task 14: Metadata Editor (title/description)
- Task 15: Image Management (add/delete)
- Task 16: Group Deletion (with confirmation)
- Task 17: Upload Success Page (management link)
- Task 19: Documentation updates
- Task 20: nginx routing configuration

Pending:
- Task 18: E2E Testing (formal test suite)
2025-11-14 14:38:03 +01:00
..
FEATURE_PLAN-delete-unproved-groups.md docs: Finalize automatic cleanup feature documentation 2025-11-08 14:45:13 +01:00
FEATURE_PLAN-exif-extraction.md docs: Add FEATURE_PLAN for EXIF metadata extraction 2025-11-09 13:30:58 +01:00
FEATURE_PLAN-image-description.md docs: Update documentation for image descriptions feature 2025-11-07 18:39:48 +01:00
FEATURE_PLAN-preload-image.md feat: Slideshow optimization with intelligent preloading and chronological sorting 2025-11-09 13:23:27 +01:00
FEATURE_PLAN-preview-images.md docs: add feature plan for preview images 2025-10-29 23:34:08 +01:00
FEATURE_PLAN-reordering.md docs: update feature plan with completion status 2025-11-03 21:22:15 +01:00
FEATURE_PLAN-social-media.md feat(phase2): Complete Management Portal with reusable ConsentCheckboxes 2025-11-14 14:38:03 +01:00
REORDERING_IMPLEMENTATION_REPORT.md docs: update README.md with new reordering features 2025-11-03 21:24:29 +01:00
UPGRADE_PLAN-upgrade-deps-react-node-20251028.md docs: complete upgrade documentation with CHANGELOG, smoke tests, and actual timelines 2025-10-29 23:10:21 +01:00