fix(web): remove redundant prop-types and unblock lint pipeline
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Failing after 2m24s
Build & Deploy / 🏗️ Build (push) Failing after 3m40s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Failing after 2m24s
Build & Deploy / 🏗️ Build (push) Failing after 3m40s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
This commit is contained in:
@@ -5,6 +5,8 @@ import {
|
||||
getInquiryEmailHtml,
|
||||
getConfirmationEmailHtml,
|
||||
} from "../components/ContactForm/EmailTemplates";
|
||||
import { getPayload } from "payload";
|
||||
import configPromise from "@payload-config";
|
||||
|
||||
export async function sendContactInquiry(data: {
|
||||
name: string;
|
||||
@@ -16,7 +18,22 @@ export async function sendContactInquiry(data: {
|
||||
config?: any;
|
||||
}) {
|
||||
try {
|
||||
// 1. Send Inquiry to Marc
|
||||
// 1. Save to Payload CMS (Replaces Directus)
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
await payload.create({
|
||||
collection: "inquiries",
|
||||
data: {
|
||||
name: data.name,
|
||||
email: data.email,
|
||||
companyName: data.companyName,
|
||||
projectType: data.projectType,
|
||||
message: data.message,
|
||||
isFreeText: data.isFreeText,
|
||||
config: data.config || null,
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Send Inquiry to Marc
|
||||
const inquiryResult = await sendEmail({
|
||||
subject: `[PROJEKT] ${data.isFreeText ? "DIREKTANFRAGE" : "KONFIGURATION"}: ${data.companyName || data.name}`,
|
||||
html: getInquiryEmailHtml(data),
|
||||
|
||||
Reference in New Issue
Block a user