feat: implement Project Management with Gantt Chart, Milestones, and CRM enhancements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { CollectionConfig } from "payload";
|
||||
import { convertInquiryEndpoint } from "../endpoints/convertInquiryEndpoint";
|
||||
|
||||
export const Inquiries: CollectionConfig = {
|
||||
slug: "inquiries",
|
||||
@@ -17,7 +18,36 @@ export const Inquiries: CollectionConfig = {
|
||||
update: ({ req: { user } }) => Boolean(user),
|
||||
delete: ({ req: { user } }) => Boolean(user),
|
||||
},
|
||||
endpoints: [
|
||||
{
|
||||
path: "/:id/convert-to-lead",
|
||||
method: "post",
|
||||
handler: convertInquiryEndpoint,
|
||||
},
|
||||
],
|
||||
fields: [
|
||||
{
|
||||
name: "convertButton",
|
||||
type: "ui",
|
||||
admin: {
|
||||
components: {
|
||||
Field:
|
||||
"@/src/payload/components/ConvertInquiryButton#ConvertInquiryButton",
|
||||
},
|
||||
condition: (data) => {
|
||||
return !data?.processed;
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "processed",
|
||||
type: "checkbox",
|
||||
defaultValue: false,
|
||||
admin: {
|
||||
description: "Has this inquiry been converted into a CRM Lead?",
|
||||
readOnly: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "name",
|
||||
type: "text",
|
||||
|
||||
Reference in New Issue
Block a user