simplify: zakat yes/no per campaign, remove 5 fund types, add I've Donated button for external pledges

- Event.zakatEligible (boolean) replaces Organization.zakatEnabled + 5 fund types
- Pledge.isZakat (boolean) replaces Pledge.fundType enum
- Removed fundAllocation from Event (campaign IS the allocation)
- Identity step: simple checkbox instead of 5-option grid
- Campaign creation: Zakat toggle + optional external URL for self-payment
- External redirect step: 'I've Donated' button calls /api/pledges/[id]/mark-initiated
- Landing page: simplified Zakat section (toggle preview, not 5 fund descriptions)
- Settings: removed org-level Zakat toggle (it's per campaign now)
- Migration: ALTER TABLE adds zakatEligible/isZakat, drops fundAllocation
This commit is contained in:
2026-03-03 07:19:52 +08:00
parent f87aec7beb
commit fc80a43a89
14 changed files with 131 additions and 179 deletions

View File

@@ -161,7 +161,7 @@ export default function HomePage() {
<div className="grid md:grid-cols-4 gap-6">
{[
{ step: "1", icon: "🔗", title: "Share a pledge link", desc: "Create a trackable link. Share via QR code, WhatsApp, social media, email, or send directly to a major donor." },
{ step: "2", icon: "🤲", title: "Donor pledges", desc: "They pick an amount, choose Zakat/Sadaqah, and decide: pay now, on a date, or in monthly instalments." },
{ step: "2", icon: "🤲", title: "Donor pledges", desc: "They pick an amount, mark as Zakat if eligible, and decide: pay now, on a date, or in monthly instalments." },
{ step: "3", icon: "💬", title: "WhatsApp follows up", desc: "Automated reminders with bank details or a link to your fundraising page. They reply PAID when done." },
{ step: "4", icon: "📊", title: "You see everything", desc: "Live dashboard: who pledged, who paid, what fund, which source. Export for HMRC Gift Aid." },
].map((s) => (
@@ -222,31 +222,17 @@ export default function HomePage() {
</div>
</section>
{/* Fund Types */}
{/* Zakat */}
<section className="py-14 px-4">
<div className="max-w-4xl mx-auto space-y-8">
<div className="text-center">
<h2 className="text-3xl font-black text-gray-900">Islamic fund types built-in</h2>
<p className="text-muted-foreground mt-2">Donors choose their fund type. You get clean reporting. Zakat never mixes with Sadaqah.</p>
</div>
<div className="grid grid-cols-2 md:grid-cols-5 gap-3">
{[
{ name: "Zakat", icon: "🌙", desc: "Obligatory 2.5%" },
{ name: "Sadaqah", icon: "🤲", desc: "Voluntary" },
{ name: "Sadaqah Jariyah", icon: "🌱", desc: "Ongoing" },
{ name: "Lillah", icon: "🕌", desc: "For institution" },
{ name: "Fitrana", icon: "🍽️", desc: "Before Eid" },
].map((f) => (
<div key={f.name} className="rounded-2xl border bg-white p-4 text-center space-y-1">
<span className="text-2xl">{f.icon}</span>
<p className="text-sm font-bold">{f.name}</p>
<p className="text-[11px] text-muted-foreground">{f.desc}</p>
</div>
))}
</div>
<p className="text-center text-xs text-muted-foreground">
Enable in Settings Fund Types. Donors see the picker during pledge. Reports break down by type.
<div className="max-w-3xl mx-auto text-center space-y-6">
<h2 className="text-3xl font-black text-gray-900">🌙 Zakat tracking built-in</h2>
<p className="text-muted-foreground max-w-xl mx-auto">
Mark any campaign as Zakat-eligible. Donors see a simple checkbox to flag their pledge as Zakat. You get clean reporting Zakat pledges are tracked separately so funds never mix.
</p>
<div className="inline-flex items-center gap-3 rounded-2xl border-2 border-trust-blue/20 bg-trust-blue/5 px-6 py-4">
<div className="w-5 h-5 rounded border-2 bg-trust-blue border-trust-blue flex items-center justify-center"><span className="text-white text-xs font-bold"></span></div>
<span className="text-sm font-bold">🌙 This is Zakat</span>
</div>
</div>
</section>
@@ -262,9 +248,9 @@ export default function HomePage() {
{ icon: "📅", title: "Flexible Scheduling", desc: "Pay now, pick a date, or split into 2-12 monthly instalments. Each instalment tracked separately." },
{ icon: "💬", title: "WhatsApp Reminders", desc: "Automated multi-step: 2 days before → due day → gentle nudge → final. Donors reply PAID, HELP, STATUS." },
{ icon: "🎁", title: "Gift Aid + HMRC Export", desc: "Collect declarations inline with live math. One-click HMRC-ready CSV export." },
{ icon: "☪️", title: "Fund Type Tracking", desc: "Zakat, Sadaqah, Lillah, Fitrana. Clean fund-level reporting. Optional — enable when you need it." },
{ icon: "🌙", title: "Zakat Tracking", desc: "Mark campaigns as Zakat-eligible. Donors tick a checkbox. Zakat pledges tracked separately." },
{ icon: "📊", title: "Live Dashboard", desc: "Real-time pipeline: new → initiated → paid → overdue. Needs-attention alerts. Auto-refreshes." },
{ icon: "🏦", title: "Fund Allocation", desc: "Link campaigns to specific funds. Charities can also link external fundraising pages for allocation tracking." },
{ icon: "🏦", title: "External Payment Tracking", desc: "Donors pledge here, pay on LaunchGood/Enthuse. They click 'I\\'ve Donated' or reply PAID on WhatsApp." },
{ icon: "🏆", title: "Leaderboard", desc: "See which volunteer, table, or link source brings in the most pledges. Friendly competition." },
{ icon: "📱", title: "QR Codes for Events", desc: "Print a QR code per table. Works alongside WhatsApp sharing, social posts, and direct links." },
{ icon: "📤", title: "CRM Export", desc: "Download all pledge data as CSV. Filter by fund type, campaign, status, or source." },