feat: payload cms
This commit is contained in:
@@ -17,7 +17,7 @@ import { ProductTabs } from '../blocks/ProductTabs';
|
||||
export const Products: CollectionConfig = {
|
||||
slug: 'products',
|
||||
admin: {
|
||||
defaultColumns: ['featuredImage', 'title', 'sku', 'locale', 'updatedAt', '_status'],
|
||||
defaultColumns: ['featuredImage', 'title', 'sku', 'updatedAt', '_status'],
|
||||
},
|
||||
versions: {
|
||||
drafts: true,
|
||||
@@ -42,6 +42,7 @@ export const Products: CollectionConfig = {
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
required: true,
|
||||
localized: true,
|
||||
},
|
||||
{
|
||||
name: 'sku',
|
||||
@@ -52,6 +53,7 @@ export const Products: CollectionConfig = {
|
||||
},
|
||||
},
|
||||
{
|
||||
// slug is shared: the cable name (e.g. "n2xy") is the same in DE and EN
|
||||
name: 'slug',
|
||||
type: 'text',
|
||||
required: true,
|
||||
@@ -63,19 +65,7 @@ export const Products: CollectionConfig = {
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'locale',
|
||||
type: 'select',
|
||||
required: true,
|
||||
admin: {
|
||||
position: 'sidebar',
|
||||
},
|
||||
options: [
|
||||
{ label: 'English', value: 'en' },
|
||||
{ label: 'German', value: 'de' },
|
||||
],
|
||||
defaultValue: 'de',
|
||||
localized: true,
|
||||
},
|
||||
{
|
||||
name: 'categories',
|
||||
@@ -112,11 +102,13 @@ export const Products: CollectionConfig = {
|
||||
{
|
||||
name: 'application',
|
||||
type: 'richText',
|
||||
localized: true,
|
||||
editor: lexicalEditor({}),
|
||||
},
|
||||
{
|
||||
name: 'content',
|
||||
type: 'richText',
|
||||
localized: true,
|
||||
editor: lexicalEditor({
|
||||
features: ({ defaultFeatures }) => [
|
||||
...defaultFeatures,
|
||||
|
||||
Reference in New Issue
Block a user