feat: 🔥 remove MenuSection as unnecessary

main
RaviAnand Mohabir 3 months ago
parent 23c3fed826
commit 85d8945eb1

@ -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,
},
],
};

@ -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",

@ -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,
},
],
};

@ -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".

@ -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],

Loading…
Cancel
Save