Added preview, description, and default columns
This commit is contained in:
parent
1628b95589
commit
2a5b67607d
|
@ -126,6 +126,11 @@ export const Collectibles = buildVersionedCollectionConfig({
|
||||||
useAsTitle: fields.slug,
|
useAsTitle: fields.slug,
|
||||||
defaultColumns: [fields.slug, fields.status],
|
defaultColumns: [fields.slug, fields.status],
|
||||||
group: CollectionGroups.Collections,
|
group: CollectionGroups.Collections,
|
||||||
|
description:
|
||||||
|
"A physical or digital item. This can be a book, a CD/DVD, a video game copy...\
|
||||||
|
any product related to our Scope.\
|
||||||
|
This can also include merchandises such as figurines, music boxes, posters, key chains...",
|
||||||
|
preview: ({ slug }) => `https://v3.accords-library.com/en/collectibles/${slug}`,
|
||||||
hooks: {
|
hooks: {
|
||||||
beforeDuplicate: beforeDuplicatePiping([
|
beforeDuplicate: beforeDuplicatePiping([
|
||||||
beforeDuplicateUnpublish,
|
beforeDuplicateUnpublish,
|
||||||
|
|
|
@ -30,6 +30,10 @@ export const Folders = buildCollectionConfig({
|
||||||
admin: {
|
admin: {
|
||||||
useAsTitle: fields.slug,
|
useAsTitle: fields.slug,
|
||||||
group: CollectionGroups.Collections,
|
group: CollectionGroups.Collections,
|
||||||
|
defaultColumns: [fields.slug, fields.translations, fields.sections, fields.files, fields.icon],
|
||||||
|
description:
|
||||||
|
"Folders provide a way to structure our content. A folder can contain subfolders and/or files.",
|
||||||
|
preview: ({ slug }) => `https://v3.accords-library.com/en/folders/${slug}`,
|
||||||
},
|
},
|
||||||
endpoints: [getRootFoldersEndpoint, getBySlugEndpoint],
|
endpoints: [getRootFoldersEndpoint, getBySlugEndpoint],
|
||||||
fields: [
|
fields: [
|
||||||
|
@ -41,6 +45,8 @@ export const Folders = buildCollectionConfig({
|
||||||
translatedFields({
|
translatedFields({
|
||||||
name: fields.translations,
|
name: fields.translations,
|
||||||
admin: { useAsTitle: fields.translationsName },
|
admin: { useAsTitle: fields.translationsName },
|
||||||
|
required: true,
|
||||||
|
minRows: 1,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: fields.translationsName,
|
name: fields.translationsName,
|
||||||
|
@ -73,7 +79,7 @@ export const Folders = buildCollectionConfig({
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
name: fields.sectionsSubfolders,
|
name: fields.sectionsSubfolders,
|
||||||
type: "relationship",
|
type: "relationship",
|
||||||
relationTo: Collections.Folders,
|
relationTo: Collections.Folders,
|
||||||
hasMany: true,
|
hasMany: true,
|
||||||
|
|
|
@ -51,8 +51,17 @@ export const Pages = buildVersionedCollectionConfig({
|
||||||
defaultSort: fields.slug,
|
defaultSort: fields.slug,
|
||||||
admin: {
|
admin: {
|
||||||
useAsTitle: fields.slug,
|
useAsTitle: fields.slug,
|
||||||
defaultColumns: [fields.thumbnail, fields.slug],
|
defaultColumns: [
|
||||||
|
fields.slug,
|
||||||
|
fields.thumbnail,
|
||||||
|
fields.backgroundImage,
|
||||||
|
fields.type,
|
||||||
|
fields.tags,
|
||||||
|
fields.translations,
|
||||||
|
fields.folders,
|
||||||
|
],
|
||||||
group: CollectionGroups.Collections,
|
group: CollectionGroups.Collections,
|
||||||
|
preview: ({ slug }) => `https://v3.accords-library.com/en/pages/${slug}`,
|
||||||
components: {
|
components: {
|
||||||
BeforeListTable: [
|
BeforeListTable: [
|
||||||
() =>
|
() =>
|
||||||
|
|
Loading…
Reference in New Issue