mirror of
https://github.com/ceratic/project_vollidioten_website.git
synced 2026-05-14 00:16:47 +02:00
feat: add LogoManagementModal component for logo upload and management
This commit is contained in:
@@ -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, '[]']);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user