Project-Image-Uploader/frontend/src/Components/ComponentUtils
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
..
Css feat(frontend): Update footer with version info and attribution 2025-11-08 16:22:04 +01:00
Headers feat(phase2): Implement Frontend Management Portal & nginx routing (Tasks 12, 20) 2025-11-13 20:05:27 +01:00
LoadingAnimation changed admin, Link to gitea, LoadingLogo 2025-11-09 11:55:31 +01:00
MultiUpload feat(phase2): Complete Management Portal with reusable ConsentCheckboxes 2025-11-14 14:38:03 +01:00
ConsentBadges.js feat(phase2): Complete Management Portal with reusable ConsentCheckboxes 2025-11-14 14:38:03 +01:00
DeletionLogSection.js refactor: Move deletion log into ModerationGroupsPage 2025-11-08 12:55:55 +01:00
Footer.js feat(frontend): Update footer with version info and attribution 2025-11-08 16:22:04 +01:00
ImageGallery.js feat: Implement image descriptions - Backend & Core Frontend 2025-11-07 18:34:16 +01:00
ImageGalleryCard.js feat: Implement moderation panel consent features 2025-11-09 22:20:11 +01:00