Files
websitedev/proto/src/globals/HostingPlans.ts
T
Do SikiandClaude Opus 5.5 1e0742a548
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Canceled after 0s
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Canceled after 0s
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Canceled after 0s
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Canceled after 0s
feat(cms): hosting plans page with lifecycle gate and net + VAT prices (MITHOME-130)
- Products collection (interim mirror of the PLATFM-14 catalogue contract):
  lifecycle status, product type, required whole-forint net price, yearly
  billing, service definition, per-product English gate
- HostingPlans global: page copy, comparison labels, VAT rate (27%)
- Gate: production shows only active plans, staging all but retired; with no
  showable plan the page is 404 and left out of the menu and the sitemap
- /hu/tarhely-csomagok <-> /en/hosting-plans via PAGE_SLUGS (hreflang,
  language switcher, CTA page picker)
- Seed migration 20260929_hosting_plans: mIT Start (14 900 Ft/yr, 5 mailboxes)
  and mIT Mid (23 900 Ft/yr) as drafts, English AI draft; idempotent
- Production SEO suite expects at least 12 sitemap URLs; new SMOKE-10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:36:44 +02:00

84 lines
2.2 KiB
TypeScript

import type { GlobalConfig } from 'payload'
import { globalVersions } from '../lib/payload-versions'
import { DEFAULT_VAT_RATE_PERCENT } from '../lib/products'
import { translationStatusField } from './fields/translationStatus'
const LABEL_FIELDS = [
'storage',
'mailStorage',
'domains',
'domainAliases',
'databases',
'mailboxes',
'backup',
'ssl',
'spamFilter',
'perYear',
'perMonth',
'oneTime',
'plusVat',
'grossPrice',
'recommended',
'included',
'priceNote',
] as const
export type HostingPlansLabel = (typeof LABEL_FIELDS)[number]
/**
* MITHOME-130: copy of the hosting plans page (/hu/tarhely-csomagok,
* /en/hosting-plans). The plans themselves live in the Products collection.
*/
export const HostingPlans: GlobalConfig = {
slug: 'hosting-plans',
label: 'Tárhelycsomagok oldal',
admin: { group: 'Oldalak' },
versions: globalVersions,
fields: [
{
name: 'meta',
type: 'group',
fields: [
{ name: 'title', type: 'text', required: true, localized: true },
{ name: 'description', type: 'textarea', required: true, localized: true },
],
},
{
name: 'hero',
type: 'group',
fields: [
{ name: 'title', type: 'text', required: true, localized: true },
{ name: 'subtitle', type: 'textarea', required: true, localized: true },
],
},
{
name: 'labels',
label: 'Feliratok',
type: 'group',
fields: LABEL_FIELDS.map((name) => ({ name, type: 'text' as const, required: true, localized: true })),
},
{
name: 'largerNeeds',
label: 'Nagyobb igény blokk',
type: 'group',
fields: [
{ name: 'title', type: 'text', required: true, localized: true },
{ name: 'text', type: 'textarea', required: true, localized: true },
{ name: 'button', type: 'text', required: true, localized: true },
],
},
{
name: 'vatRatePercent',
label: 'ÁFA-kulcs (%)',
type: 'number',
required: true,
min: 0,
max: 100,
defaultValue: DEFAULT_VAT_RATE_PERCENT,
admin: { position: 'sidebar', description: 'A bruttó árak ebből számolódnak.' },
},
translationStatusField(),
],
}