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
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user