mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 22:04:10 +00:00
- Add ServiceCategories collection for grouping services - Add Services collection with comprehensive service profiles: - Title, slug, descriptions (short + full) - Icon (text or image) and image gallery - Category relationship for grouping - Features/benefits array - Flexible pricing (on-request default, fixed, hourly, range, etc.) - CTA buttons (primary + secondary) - Related services, team members, and FAQs relationships - Detail page sections with testimonials - SEO fields (meta title, description, OG image) - Status flags (active, featured, new badge) - Add ServicesBlock with 8 layouts: - Grid, List, Tabs, Accordion, Featured+Grid, Slider, Compact, Masonry - Multi-tenant enabled via plugin configuration - Update documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
102 lines
2.2 KiB
TypeScript
102 lines
2.2 KiB
TypeScript
// src/collections/ServiceCategories.ts
|
|
|
|
import type { CollectionConfig } from 'payload'
|
|
import { authenticatedOnly, tenantScopedPublicRead } from '../lib/tenantAccess'
|
|
|
|
/**
|
|
* ServiceCategories Collection
|
|
*
|
|
* Kategorien für Dienstleistungen/Services.
|
|
* Ermöglicht Gruppierung und Filterung von Services.
|
|
* Tenant-scoped für Multi-Tenant-Betrieb.
|
|
*/
|
|
export const ServiceCategories: CollectionConfig = {
|
|
slug: 'service-categories',
|
|
admin: {
|
|
useAsTitle: 'name',
|
|
group: 'Content',
|
|
defaultColumns: ['name', 'slug', 'order', 'isActive'],
|
|
description: 'Kategorien für Leistungen/Services',
|
|
},
|
|
access: {
|
|
read: tenantScopedPublicRead,
|
|
create: authenticatedOnly,
|
|
update: authenticatedOnly,
|
|
delete: authenticatedOnly,
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'name',
|
|
type: 'text',
|
|
required: true,
|
|
label: 'Name',
|
|
localized: true,
|
|
admin: {
|
|
description: 'z.B. "Pflege", "Beratung", "Schulung"',
|
|
},
|
|
},
|
|
{
|
|
name: 'slug',
|
|
type: 'text',
|
|
required: true,
|
|
label: 'Slug',
|
|
unique: false,
|
|
admin: {
|
|
description: 'URL-freundlicher Name (z.B. "pflege", "beratung")',
|
|
},
|
|
},
|
|
{
|
|
name: 'description',
|
|
type: 'textarea',
|
|
label: 'Beschreibung',
|
|
localized: true,
|
|
admin: {
|
|
description: 'Kurze Beschreibung der Kategorie',
|
|
},
|
|
},
|
|
{
|
|
name: 'icon',
|
|
type: 'text',
|
|
label: 'Icon',
|
|
admin: {
|
|
description: 'Icon-Name (z.B. "heart", "users", "book")',
|
|
},
|
|
},
|
|
{
|
|
name: 'image',
|
|
type: 'upload',
|
|
relationTo: 'media',
|
|
label: 'Bild',
|
|
admin: {
|
|
description: 'Optionales Kategorie-Bild',
|
|
},
|
|
},
|
|
{
|
|
name: 'color',
|
|
type: 'text',
|
|
label: 'Farbe',
|
|
admin: {
|
|
description: 'Akzentfarbe für die Kategorie (z.B. "#3B82F6")',
|
|
},
|
|
},
|
|
{
|
|
name: 'isActive',
|
|
type: 'checkbox',
|
|
defaultValue: true,
|
|
label: 'Aktiv',
|
|
admin: {
|
|
position: 'sidebar',
|
|
},
|
|
},
|
|
{
|
|
name: 'order',
|
|
type: 'number',
|
|
defaultValue: 0,
|
|
label: 'Sortierung',
|
|
admin: {
|
|
position: 'sidebar',
|
|
description: 'Niedrigere Zahlen werden zuerst angezeigt',
|
|
},
|
|
},
|
|
],
|
|
}
|