diff --git a/src/blocks/MenuSection.ts b/src/blocks/MenuSection.ts deleted file mode 100644 index 27911be..0000000 --- a/src/blocks/MenuSection.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Block } from "payload"; - -export const MenuSectionBlock: Block = { - slug: "menu-section", - fields: [ - { - name: "name", - type: "text", - localized: true, - required: true, - }, - { - name: "description", - type: "richText", - localized: true, - }, - ], -}; diff --git a/src/collections/MenuCategory.ts b/src/collections/MenuCategory.ts index ab49c0c..3cec7d7 100644 --- a/src/collections/MenuCategory.ts +++ b/src/collections/MenuCategory.ts @@ -1,7 +1,5 @@ import type { CollectionConfig } from "payload"; import { Menu } from "../groups/Menu"; -import { MenuItemBlock } from "@/blocks/MenuItem"; -import { MenuSectionBlock } from "@/blocks/MenuSection"; export const MenuCategory: CollectionConfig = { slug: "menu-category", diff --git a/src/collections/MenuSection.ts b/src/collections/MenuSection.ts deleted file mode 100644 index 5e78ab9..0000000 --- a/src/collections/MenuSection.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { CollectionConfig } from "payload"; -import { Menu } from "../groups/Menu"; - -export const MenuSection: CollectionConfig = { - slug: "menu-section", - access: { - read: () => true, - }, - admin: { - useAsTitle: "name", - group: Menu, - }, - fields: [ - { - name: "name", - type: "text", - required: true, - localized: true, - }, - { - name: "description", - type: "richText", - localized: true, - }, - ], -}; diff --git a/src/payload-types.ts b/src/payload-types.ts index 07729ca..81bd4e3 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -20,7 +20,6 @@ export interface Config { 'menu-item': MenuItem; 'menu-category': MenuCategory; 'menu-item-tag': MenuItemTag; - 'menu-section': MenuSection; 'food-declaration': FoodDeclaration; 'payload-preferences': PayloadPreference; 'payload-migrations': PayloadMigration; @@ -251,31 +250,6 @@ export interface MenuCategory { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "menu-section". - */ -export interface MenuSection { - id: string; - name: string; - description?: { - root: { - type: string; - children: { - type: string; - version: number; - [k: string]: unknown; - }[]; - direction: ('ltr' | 'rtl') | null; - format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; - indent: number; - version: number; - }; - [k: string]: unknown; - } | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "food-declaration". diff --git a/src/payload.config.ts b/src/payload.config.ts index efbd954..d23addd 100644 --- a/src/payload.config.ts +++ b/src/payload.config.ts @@ -14,7 +14,6 @@ import { Menu } from "@/globals/Menu"; import { MenuCategory } from "@/collections/MenuCategory"; import { MenuItem } from "@/collections/MenuItem"; import { MenuItemTag } from "@/collections/MenuItemTag"; -import { MenuSection } from "@/collections/MenuSection"; import { OpeningTime } from "@/collections/OpeningTime"; import { Settings } from "@/globals/Settings"; import { Users } from "@/collections/Users"; @@ -23,12 +22,12 @@ import { Vacation } from "@/collections/Vacation"; // import { betterUseAsTitle } from "@payload-enchants/better-use-as-title"; // import { cachedPayloadPlugin } from "@/utils/payload"; import { de } from "@payloadcms/translations/languages/de"; -// import { docsReorder } from "@payload-enchants/docs-reorder"; import { en } from "@payloadcms/translations/languages/en"; import { fileURLToPath } from "url"; import { fr } from "@payloadcms/translations/languages/fr"; import { it } from "@payloadcms/translations/languages/it"; import { lexicalEditor } from "@payloadcms/richtext-lexical"; +// import { docsReorder } from "@payload-enchants/docs-reorder"; import { mongooseAdapter } from "@payloadcms/db-mongodb"; import path from "path"; import sharp from "sharp"; @@ -54,7 +53,6 @@ export default buildConfig({ MenuItem, MenuCategory, MenuItemTag, - MenuSection, FoodDeclaration, ], globals: [Home, Gallery, Menu, About, Contact, Settings],