chore: clean up test scripts and sync payload CRM collections
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Failing after 23s
Build & Deploy / 🏗️ Build (push) Failing after 27s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 5s

This commit is contained in:
2026-02-27 18:41:48 +01:00
parent 8907963d57
commit 4b5609a75e
15 changed files with 4301 additions and 106 deletions

View File

@@ -0,0 +1,79 @@
import type { CollectionConfig } from "payload";
export const CrmContacts: CollectionConfig = {
slug: "crm-contacts",
labels: {
singular: "Contact",
plural: "Contacts",
},
admin: {
useAsTitle: "email", // Fallback, will define an afterRead hook or virtual field for a better title
defaultColumns: ["firstName", "lastName", "email", "account"],
group: "CRM",
},
access: {
read: ({ req: { user } }) => Boolean(user),
create: ({ req: { user } }) => Boolean(user),
update: ({ req: { user } }) => Boolean(user),
delete: ({ req: { user } }) => Boolean(user),
},
fields: [
{
type: "row",
fields: [
{
name: "firstName",
type: "text",
required: true,
admin: {
width: "50%",
},
},
{
name: "lastName",
type: "text",
required: true,
admin: {
width: "50%",
},
},
],
},
{
name: "email",
type: "email",
required: true,
unique: true,
},
{
type: "row",
fields: [
{
name: "phone",
type: "text",
admin: {
width: "50%",
},
},
{
name: "linkedIn",
type: "text",
admin: {
width: "50%",
},
},
],
},
{
name: "role",
type: "text",
label: "Job Title / Role",
},
{
name: "account",
type: "relationship",
relationTo: "crm-accounts",
label: "Company / Account",
},
],
};