feat(crm): implement bulk mail action for contacts
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🏗️ Build (push) Failing after 6m25s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 QA (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

- Add BulkMailButton component for Payload list view
- Add bulkMailEndpoint handler for processing prompts
- Integrate bulk mail action into CrmContacts collection
- Update dev:clean script to skip interactive prompts
This commit is contained in:
2026-03-30 19:27:56 +02:00
parent c52a132d62
commit 3f6fa36f9b
5 changed files with 355 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import type { CollectionConfig } from "payload";
import { bulkMailEndpointHandler } from "../endpoints/bulkMailEndpoint";
export const CrmContacts: CollectionConfig = {
slug: "crm-contacts",
labels: {
@@ -12,7 +12,21 @@ export const CrmContacts: CollectionConfig = {
group: "CRM",
description:
"Contacts are the individual people linked to an Account. A person should only be created once and can be assigned to a company here.",
components: {
views: {
list: {
actions: ["@/src/payload/components/BulkMailButton#BulkMailButton"],
},
},
},
},
endpoints: [
{
path: "/bulk-mail",
method: "post",
handler: bulkMailEndpointHandler,
},
],
access: {
read: ({ req: { user } }) => Boolean(user),
create: ({ req: { user } }) => Boolean(user),