feat: implement Project Management with Gantt Chart, Milestones, and CRM enhancements

This commit is contained in:
2026-03-01 00:26:59 +01:00
parent 4b5609a75e
commit 6444cf1e81
47 changed files with 15312 additions and 7373 deletions

View File

@@ -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",