feat(cms): partner categories, publication permission and CMS-managed references copy (MITHOME-131)
Per the managed web operations research (PLATFM-13), a client must not be
shown as a "partner" and names/logos need written permission. Partners
now carry a required relationship category and a publication permission
(default: none) with the permission's location and review date; only
entries with written permission, a category and a logo are public.
The homepage shows clients ("Akik már minket választottak") and other
relationships in separate blocks via ReferencesSection; every partner
shows its relationship type. The section copy moved from a hard-coded
constant into the Home global (localized). The 20260929_partner_references
migration marks Angele Pihenőház as a client reference with written
permission (owner-confirmed), hides any other uncategorised entry, and
seeds the copy in hu + en. The JSON seed uses the same source.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
526f413bfd
commit
5f9a53ed18
@@ -1,23 +1,64 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import { collectionVersions } from '../lib/payload-versions'
|
||||
import { PERMISSION_LABELS, PERMISSIONS, RELATIONSHIP_LABELS, RELATIONSHIPS } from '../lib/partner-references'
|
||||
|
||||
/**
|
||||
* Mirrors home.json `partners.items` (proto/src/content/pages/home.json) —
|
||||
* MITHOME-89 (MVP). Korábban a Home Global szándékosan NEM tartalmazta ezt
|
||||
* a listát (lásd src/globals/Home.ts megjegyzése) — itt lesz az önálló
|
||||
* collection, logo = Media upload reference.
|
||||
*
|
||||
* MITHOME-131: every entry carries its real relationship category (a client
|
||||
* is a reference, not a "partner") and a publication permission; only
|
||||
* entries with a written permission appear publicly (src/lib/partner-references.ts).
|
||||
*/
|
||||
export const Partners: CollectionConfig = {
|
||||
slug: 'partners',
|
||||
admin: {
|
||||
useAsTitle: 'name',
|
||||
group: 'Oldalak',
|
||||
defaultColumns: ['name', 'relationship', 'publicationPermission'],
|
||||
},
|
||||
versions: collectionVersions,
|
||||
fields: [
|
||||
{ name: 'name', type: 'text', required: true },
|
||||
{ name: 'url', type: 'text', required: true },
|
||||
{
|
||||
name: 'relationship',
|
||||
label: 'Kapcsolat típusa',
|
||||
type: 'select',
|
||||
required: true,
|
||||
options: RELATIONSHIPS.map((value) => ({ label: RELATIONSHIP_LABELS[value], value })),
|
||||
admin: {
|
||||
description:
|
||||
'Ügyfelet ne jelölj partnerként: az ügyfél „Ügyfélreferencia”. Ha csak előfizetőként használunk egy terméket, az „Használt technológia”, nem partnerség.',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'publicationPermission',
|
||||
label: 'Közzétételi engedély',
|
||||
type: 'select',
|
||||
required: true,
|
||||
defaultValue: 'none',
|
||||
options: PERMISSIONS.map((value) => ({ label: PERMISSION_LABELS[value], value })),
|
||||
admin: {
|
||||
position: 'sidebar',
|
||||
description: 'A név és a logó csak írásos engedéllyel jelenhet meg a weboldalon.',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'permissionReference',
|
||||
label: 'Engedély helye',
|
||||
type: 'text',
|
||||
admin: { position: 'sidebar', description: 'Hol található az írásos engedély (pl. e-mail, szerződés).' },
|
||||
},
|
||||
{
|
||||
name: 'permissionReviewDate',
|
||||
label: 'Következő felülvizsgálat',
|
||||
type: 'date',
|
||||
admin: { position: 'sidebar' },
|
||||
},
|
||||
{
|
||||
name: 'logo',
|
||||
type: 'upload',
|
||||
|
||||
Reference in New Issue
Block a user