feat(cms): Partners + Media collection MVP (MITHOME-89)
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
Payload built-in upload collection (Media) + a Partners collection (name, url, logo -> Media relationship) mirroring home.json's partners.items. Scope decision (see Plane MITHOME-89/118): the old logo editor (crop/rotate/transparent-background — MITHOME-76/84) is entirely client-side canvas logic (scripts/cms-logo-client.js, 345 lines), not server-side processing. Porting that UX into the Payload admin is a real custom React field component, split into its own ticket (MITHOME-118) rather than bundled here. This ticket covers plain upload only. - src/collections/Media.ts, src/collections/Partners.ts, registered in payload.config.ts. - migrate-content-to-payload.ts: upsertPartner() uploads the existing processed logo file (filePath) into Media (idempotent — matched by `alt` == partner name) and upserts the Partner document (matched by `name`). - .gitignore: Payload's default local upload storage lands at proto/media/ (not proto/public/) — runtime data, not source, needs a persistent volume in staging/production (flagged for MITHOME-97). Also ignored the generated src/payload-types.ts. Verified: migration run twice against the real dev MongoDB produced exactly 1 Media doc + 1 Partner doc (no duplicates, confirmed via mongosh) with the correct file size (12289 bytes, matching the source PNG). Real browser: logged into /admin, Partners list shows the migrated entry, and the document editor renders the logo thumbnail (270x80, 12KB) correctly. build/lint/tsc/test (58 passed) all clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
928439bc7b
commit
776fa66bc8
@@ -8,7 +8,9 @@
|
||||
* MITHOME-87: Home/About/Services/Contact/Common Globals hozzáadva — ezek
|
||||
* tükrözik a proto/src/content/pages/*.json + common.json struktúráját.
|
||||
* MITHOME-88: LegalPages collection hozzáadva (adatvedelem, hasznalati-
|
||||
* feltetelek). A Partners/Media collectionök a MITHOME-89-ben kerülnek be.
|
||||
* feltetelek).
|
||||
* MITHOME-89: Partners + Media collection (MVP — feltöltés, a vágás/
|
||||
* áttetszővé tétel szerkesztő külön, MITHOME-118).
|
||||
*/
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
@@ -19,6 +21,8 @@ import sharp from 'sharp'
|
||||
|
||||
import { Users } from './collections/Users'
|
||||
import { LegalPages } from './collections/LegalPages'
|
||||
import { Media } from './collections/Media'
|
||||
import { Partners } from './collections/Partners'
|
||||
import { Home } from './globals/Home'
|
||||
import { About } from './globals/About'
|
||||
import { Services } from './globals/Services'
|
||||
@@ -37,7 +41,7 @@ export default buildConfig({
|
||||
|
||||
editor: lexicalEditor(),
|
||||
|
||||
collections: [Users, LegalPages],
|
||||
collections: [Users, LegalPages, Media, Partners],
|
||||
|
||||
globals: [Home, About, Services, Contact, Common],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user