- Profile Picture\

Donation Tracking\
Validation Rejection\
Subscription Data Export\
Admin Dashboard Logo\
Admin Navbar Reorganization
This commit is contained in:
Koncept Kit
2025-12-18 17:04:00 +07:00
parent b7ab1a897f
commit db13f0e9de
13 changed files with 1915 additions and 103 deletions

View File

@@ -450,3 +450,117 @@ async def send_invitation_email(
"""
return await send_email(to_email, subject, html_content)
async def send_donation_thank_you_email(email: str, first_name: str, amount_cents: int):
"""Send donation thank you email"""
subject = "Thank You for Your Generous Donation!"
amount = f"${amount_cents / 100:.2f}"
html_content = f"""
<!DOCTYPE html>
<html>
<head>
<style>
body {{ font-family: 'Nunito Sans', Arial, sans-serif; line-height: 1.6; color: #422268; }}
.container {{ max-width: 600px; margin: 0 auto; padding: 20px; }}
.header {{ background: linear-gradient(135deg, #644c9f 0%, #48286e 100%); padding: 30px; text-align: center; border-radius: 10px 10px 0 0; }}
.header h1 {{ color: white; margin: 0; font-family: 'Inter', sans-serif; font-size: 32px; }}
.content {{ background: #FFFFFF; padding: 30px; border-radius: 0 0 10px 10px; }}
.amount-box {{ background: #f1eef9; padding: 20px; border-radius: 8px; margin: 20px 0; border: 2px solid #ddd8eb; text-align: center; }}
.amount {{ color: #422268; font-size: 36px; font-weight: bold; margin: 10px 0; }}
.impact-box {{ background: #f9f5ff; border-left: 4px solid #81B29A; padding: 20px; margin: 24px 0; border-radius: 8px; }}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>💜 Thank You!</h1>
</div>
<div class="content">
<p>Dear {first_name},</p>
<p>Thank you for your generous donation to LOAF!</p>
<div class="amount-box">
<p style="margin: 0; color: #664fa3; font-size: 16px;">Donation Amount</p>
<div class="amount">{amount}</div>
</div>
<div class="impact-box">
<p style="color: #422268; font-size: 16px; margin: 0;">
Your support helps us continue our mission to build and strengthen the LGBTQ+ community.
</p>
</div>
<p>Your donation is tax-deductible to the extent allowed by law. Please keep this email for your records.</p>
<p>We are deeply grateful for your commitment to our community and your belief in our work.</p>
<p style="margin-top: 30px;">
With gratitude,<br/>
<strong style="color: #422268;">The LOAF Team</strong>
</p>
<p style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #ddd8eb; color: #664fa3; font-size: 14px;">
Questions about your donation? Contact us at support@loaf.org
</p>
</div>
</div>
</body>
</html>
"""
return await send_email(email, subject, html_content)
async def send_rejection_email(email: str, first_name: str, reason: str):
"""Send rejection notification email"""
subject = "LOAF Membership Application Update"
html_content = f"""
<!DOCTYPE html>
<html>
<head>
<style>
body {{ font-family: 'Nunito Sans', Arial, sans-serif; line-height: 1.6; color: #422268; }}
.container {{ max-width: 600px; margin: 0 auto; padding: 20px; }}
.header {{ background: linear-gradient(135deg, #644c9f 0%, #48286e 100%); padding: 30px; text-align: center; border-radius: 10px 10px 0 0; }}
.header h1 {{ color: white; margin: 0; font-family: 'Inter', sans-serif; }}
.content {{ background: #FFFFFF; padding: 30px; border-radius: 0 0 10px 10px; }}
.reason-box {{ background: #f9f5ff; border-left: 4px solid #ff9e77; padding: 20px; margin: 24px 0; border-radius: 8px; }}
.reason-box p {{ color: #422268; font-size: 14px; margin: 0; white-space: pre-wrap; }}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Membership Application Update</h1>
</div>
<div class="content">
<p>Dear {first_name},</p>
<p>Thank you for your interest in joining LOAF. After careful review, we are unable to approve your membership application at this time.</p>
<div class="reason-box">
<p><strong>Reason:</strong></p>
<p>{reason}</p>
</div>
<p>If you have questions or would like to discuss this decision, please don't hesitate to contact us at support@loaf.org.</p>
<p style="margin-top: 30px;">
Warm regards,<br/>
<strong style="color: #422268;">The LOAF Team</strong>
</p>
<p style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #ddd8eb; color: #664fa3; font-size: 14px;">
Questions? Contact us at support@loaf.org
</p>
</div>
</div>
</body>
</html>
"""
return await send_email(email, subject, html_content)