feat: add LogoManagementModal component for logo upload and management

This commit is contained in:
Lars Behrends
2025-12-28 21:19:10 +01:00
parent 2481187fe7
commit 81f1e90b85
13 changed files with 2963 additions and 52 deletions

View File

@@ -69,19 +69,19 @@ const SEED_ORGS = [
];
const SEED_PROJECTS = [
{
id: 'ven-1',
title: 'DrkButz Architektur',
{
id: 'ven-1',
title: 'DrkButz Architektur',
description: 'Führendes Architekturbüro...',
category: 'Enterprise',
status: 'active',
status: 'active',
progress: 85,
owner: 'DrKButz',
employees: JSON.stringify([]),
hiring: 0,
foundedDate: 'Zyklus 12',
associatedOrgId: 'org-4',
bannerUrl: 'images/screenshots/2025-12-28_01.11.49.png',
bannerImageId: null,
shopCatalog: JSON.stringify([])
}
];
@@ -130,10 +130,23 @@ function setupTables() {
status VARCHAR(50),
mayor VARCHAR(255),
establishedYear VARCHAR(100),
bannerUrl VARCHAR(255),
bannerImageId VARCHAR(50),
logoImageId VARCHAR(50),
gallery JSON,
cityStats JSON
)`,
`CREATE TABLE IF NOT EXISTS images (
id VARCHAR(50) PRIMARY KEY,
filename VARCHAR(255) NOT NULL,
originalName VARCHAR(255),
mimeType VARCHAR(100),
size INTEGER,
uploadDate DATETIME DEFAULT CURRENT_TIMESTAMP,
altText VARCHAR(255),
entityType VARCHAR(50), -- 'project', 'org', 'player'
entityId VARCHAR(50), -- ID of the owning entity
imageType VARCHAR(50) -- 'banner', 'gallery'
)`,
`CREATE TABLE IF NOT EXISTS projects (
id VARCHAR(50) PRIMARY KEY,
title VARCHAR(255),
@@ -146,7 +159,8 @@ function setupTables() {
hiring TINYINT,
foundedDate VARCHAR(100),
associatedOrgId VARCHAR(50),
bannerUrl VARCHAR(255),
bannerImageId VARCHAR(50),
logoImageId VARCHAR(50),
shopCatalog JSON,
gallery JSON
)`
@@ -177,8 +191,8 @@ function seedData() {
if (!err && rows[0].count === 0) {
console.log("Seeding Orgs...");
SEED_ORGS.forEach(o => {
pool.query("INSERT INTO orgs VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
[o.id, o.name, o.type, o.description, o.memberCount, o.status, o.mayor, o.establishedYear, o.bannerUrl, o.gallery, o.cityStats]);
pool.query("INSERT INTO orgs VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
[o.id, o.name, o.type, o.description, o.memberCount, o.status, o.mayor, o.establishedYear, null, null, o.gallery, o.cityStats]);
});
}
});
@@ -187,8 +201,8 @@ function seedData() {
if (!err && rows[0].count === 0) {
console.log("Seeding Projects...");
SEED_PROJECTS.forEach(p => {
pool.query("INSERT INTO projects VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
[p.id, p.title, p.description, p.category, p.status, p.progress, p.owner, p.employees, p.hiring, p.foundedDate, p.associatedOrgId, p.bannerUrl, p.shopCatalog, '[]']);
pool.query("INSERT INTO projects VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
[p.id, p.title, p.description, p.category, p.status, p.progress, p.owner, p.employees, p.hiring, p.foundedDate, p.associatedOrgId, p.bannerImageId, null, p.shopCatalog, '[]']);
});
}
});