From c8455ed31ffe4a89eb651ee02602905e1f7b0ef8 Mon Sep 17 00:00:00 2001 From: augurk Date: Tue, 24 Jan 2023 15:15:42 +0100 Subject: [PATCH] makes sure the value titels are shown not just the ID's --- src/collections/Dispatches.ts | 6 +++--- src/collections/Examples.ts | 17 ----------------- src/collections/Makers.ts | 6 +++--- src/collections/Products.ts | 6 +++--- src/collections/Retailers.ts | 6 +++--- 5 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 src/collections/Examples.ts diff --git a/src/collections/Dispatches.ts b/src/collections/Dispatches.ts index 8c36f75..8352de4 100644 --- a/src/collections/Dispatches.ts +++ b/src/collections/Dispatches.ts @@ -2,9 +2,9 @@ import { CollectionConfig } from 'payload/types'; const Dispatches: CollectionConfig = { slug: 'dispatches', -// admin: { -// useAsTitle: 'email', -// }, + admin: { + useAsTitle: 'dispatchesCode', + }, access: { read: () => true, }, diff --git a/src/collections/Examples.ts b/src/collections/Examples.ts deleted file mode 100644 index bb3dab1..0000000 --- a/src/collections/Examples.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CollectionConfig } from 'payload/types'; - -// Example Collection - For reference only, this must be added to payload.config.ts to be used. -const Examples: CollectionConfig = { - slug: 'examples', - admin: { - useAsTitle: 'someField', - }, - fields: [ - { - name: 'someField', - type: 'text', - }, - ], -} - -export default Examples; \ No newline at end of file diff --git a/src/collections/Makers.ts b/src/collections/Makers.ts index aa7d205..910202b 100644 --- a/src/collections/Makers.ts +++ b/src/collections/Makers.ts @@ -2,9 +2,9 @@ import { CollectionConfig } from 'payload/types'; const Makers: CollectionConfig = { slug: 'makers', -// admin: { -// useAsTitle: 'email', -// }, + admin: { + useAsTitle: 'name', + }, access: { read: () => true, }, diff --git a/src/collections/Products.ts b/src/collections/Products.ts index c39c3d9..68e29e5 100644 --- a/src/collections/Products.ts +++ b/src/collections/Products.ts @@ -2,9 +2,9 @@ import { CollectionConfig } from 'payload/types'; const Products: CollectionConfig = { slug: 'products', -// admin: { -// useAsTitle: 'email', -// }, + admin: { + useAsTitle: 'productTitle', + }, access: { read: () => true, }, diff --git a/src/collections/Retailers.ts b/src/collections/Retailers.ts index d56014b..715f7b1 100644 --- a/src/collections/Retailers.ts +++ b/src/collections/Retailers.ts @@ -2,9 +2,9 @@ import { CollectionConfig } from 'payload/types'; const Retailers: CollectionConfig = { slug: 'retailers', -// admin: { -// useAsTitle: 'email', -// }, + admin: { + useAsTitle: 'name', + }, access: { read: () => true, },