Implement member image management features in backend and frontend

This commit introduces new functionalities for managing member images, including uploading, deleting, and setting primary images. The memberController and memberService have been updated to handle these operations, while new routes have been added to facilitate image management. The frontend has been enhanced with an ImageViewerDialog component that supports image rotation, deletion, and setting primary images. Additionally, improvements to the member view allow for better image handling and display. These changes enhance the overall user experience and functionality of the member management system.
This commit is contained in:
Torsten Schulz (local)
2025-11-11 15:53:21 +01:00
parent f7eff0bcb7
commit 22e6913005
10 changed files with 1210 additions and 219 deletions

View File

@@ -0,0 +1,17 @@
-- Create table for storing multiple images per member
CREATE TABLE IF NOT EXISTS `member_image` (
`id` INT NOT NULL AUTO_INCREMENT,
`member_id` INT NOT NULL,
`file_name` VARCHAR(255) NOT NULL,
`sort_order` INT NOT NULL DEFAULT 0,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
INDEX `idx_member_image_member_id` (`member_id`),
CONSTRAINT `fk_member_image_member`
FOREIGN KEY (`member_id`)
REFERENCES `member` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;