Add admin.group to all 24 globals/collections so the Payload Admin sidebar is organized into logical sections (Сторінки, Контент сайту, Каталог, Блог, Заявки та замовлення, Медіа, Система). Add admin.meta titleSuffix '— Шуміленд CMS', defaultTimezone Europe/Kyiv, dateFormat dd.MM.yyyy HH:mm. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import type { GlobalConfig } from 'payload'
|
|
import { isAdminOrEditor } from '@/access/isAdminOrEditor'
|
|
import { revalidateGlobalAfterChange } from '@/hooks/revalidatePath'
|
|
|
|
export const Footer: GlobalConfig = {
|
|
slug: 'footer',
|
|
admin: { group: 'Контент сайту' },
|
|
access: { read: () => true, update: isAdminOrEditor },
|
|
hooks: { afterChange: [revalidateGlobalAfterChange] },
|
|
fields: [
|
|
{ name: 'logo', type: 'upload', relationTo: 'media' },
|
|
{ name: 'logoAlt', type: 'text' },
|
|
{
|
|
name: 'navLinks',
|
|
type: 'array',
|
|
fields: [
|
|
{ name: 'label', type: 'text' },
|
|
{ name: 'href', type: 'text' },
|
|
],
|
|
},
|
|
{
|
|
name: 'contacts',
|
|
type: 'group',
|
|
fields: [
|
|
{ name: 'phone', type: 'text' },
|
|
{ name: 'email', type: 'email' },
|
|
{ name: 'address', type: 'text' },
|
|
],
|
|
},
|
|
{
|
|
name: 'socials',
|
|
type: 'array',
|
|
fields: [
|
|
{
|
|
name: 'platform',
|
|
type: 'select',
|
|
options: [
|
|
{ label: 'Instagram', value: 'instagram' },
|
|
{ label: 'Facebook', value: 'facebook' },
|
|
{ label: 'YouTube', value: 'youtube' },
|
|
{ label: 'TikTok', value: 'tiktok' },
|
|
],
|
|
},
|
|
{ name: 'url', type: 'text' },
|
|
],
|
|
},
|
|
{ name: 'copyrightText', type: 'text' },
|
|
],
|
|
}
|