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, | ||||
|     defaultColumns: [fields.slug, fields.status], | ||||
|     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: { | ||||
|       beforeDuplicate: beforeDuplicatePiping([ | ||||
|         beforeDuplicateUnpublish, | ||||
|  | ||||
| @ -30,6 +30,10 @@ export const Folders = buildCollectionConfig({ | ||||
|   admin: { | ||||
|     useAsTitle: fields.slug, | ||||
|     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], | ||||
|   fields: [ | ||||
| @ -41,6 +45,8 @@ export const Folders = buildCollectionConfig({ | ||||
|     translatedFields({ | ||||
|       name: fields.translations, | ||||
|       admin: { useAsTitle: fields.translationsName }, | ||||
|       required: true, | ||||
|       minRows: 1, | ||||
|       fields: [ | ||||
|         { | ||||
|           name: fields.translationsName, | ||||
| @ -73,7 +79,7 @@ export const Folders = buildCollectionConfig({ | ||||
|           ], | ||||
|         }), | ||||
|         { | ||||
|           name: fields.sectionsSubfolders,   | ||||
|           name: fields.sectionsSubfolders, | ||||
|           type: "relationship", | ||||
|           relationTo: Collections.Folders, | ||||
|           hasMany: true, | ||||
|  | ||||
| @ -51,8 +51,17 @@ export const Pages = buildVersionedCollectionConfig({ | ||||
|   defaultSort: fields.slug, | ||||
|   admin: { | ||||
|     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, | ||||
|     preview: ({ slug }) => `https://v3.accords-library.com/en/pages/${slug}`, | ||||
|     components: { | ||||
|       BeforeListTable: [ | ||||
|         () => | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 DrMint
						DrMint