feat: show family assignment counts in notdienst planning dropdown and support editing unassigned days in published plans
This commit is contained in:
@@ -16,6 +16,9 @@ type SendAppEmailResult =
|
||||
| { success: false; error: string };
|
||||
|
||||
export function getAppEmailConfigError() {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
return null;
|
||||
}
|
||||
if (!process.env.RESEND_API_KEY) {
|
||||
return "RESEND_API_KEY ist nicht konfiguriert.";
|
||||
}
|
||||
@@ -35,6 +38,16 @@ export async function sendAppEmail({
|
||||
replyTo,
|
||||
}: SendAppEmailInput): Promise<SendAppEmailResult> {
|
||||
if (!process.env.RESEND_API_KEY) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
console.log("\n✉️ [DEV EMAIL SIMULATION]");
|
||||
console.log(`From: ${from || "not-configured"}`);
|
||||
console.log(`To: ${Array.isArray(to) ? to.join(", ") : to}`);
|
||||
console.log(`Subject: ${subject}`);
|
||||
console.log("-----------------------------------------");
|
||||
console.log("Email body react element is rendered.");
|
||||
console.log("=========================================\n");
|
||||
return { success: true, id: "dev-simulated-id" };
|
||||
}
|
||||
return {
|
||||
success: false,
|
||||
error: "RESEND_API_KEY ist nicht konfiguriert.",
|
||||
|
||||
Reference in New Issue
Block a user