Task #16: The last two top-nav items were static, non-clickable text.
Turned both into real bilingual (AR/EN) routed pages, completing the
main navigation of the EHSAN POC.
Changes:
- translations.ts: added parallel `waqf` and `baraem` sections to both
`en` and `ar` (intro, contribution ways, endowment fields/features for
waqf; goals, features, audience for baraem). Content mirrors ehsan.sa
section structure; no emojis.
- New pages src/pages/waqf.tsx and src/pages/baraem.tsx, built on the
about.tsx pattern: green intro panel, Reveal scroll-in, Card grids,
RTL-correct using logical classes and the t.* system.
- App.tsx: registered /waqf and /baraem routes.
- Header.tsx: replaced the two static <span> items with active-aware
<Link>s in desktop nav, and added matching entries to the mobile nav.
Verified: tsc --noEmit passes; both pages render correctly in Arabic
RTL with active nav highlighting (screenshots checked).
Replit-Task-Id: 40da5508-41c9-4ccd-aba4-2ea80183a97b
Built a real donation cart matching ehsan.sa:
- CartContext provider (localStorage-persisted, defensive parsing) wired into App.tsx
- OpportunityCard: cart icon now adds the case with its typed amount and swaps the
action row to an added state («مضاف لسلة تبرعاتك» + «إزالة»)
- Header cart button: live count badge + navigates to /cart
- New /cart page + route: breadcrumb, item list (delete icon, category, name,
editable «قيمة المبلغ» amount, image+progress%), summary panel «الإجمالي» +
green «للمتابعة للدفع», decorative leaf SVG background, empty state
- translations.ts: parallel AR+EN `cart` section
- donate.tsx: removes the donated case from the cart on successful donation
(cart reconciliation), preventing stale added-state/badge
Notes/deviations:
- Checkout handoff routes the first cart item into the existing single-case donate
flow (the POC backend has no multi-item payment). Reconciliation keeps remaining
items coherent. A true multi-item checkout backend was out of scope.
- Verified with passing e2e test (add → badge → cart page → remove → empty) and
clean tsc; architect review addressed (reconciliation + defensive parsing).
Task #15: Make «عن إحسان» top-nav a real dropdown and build the About page.
- Header.tsx: converted static «عن إحسان» span into a dropdown trigger
replicating the existing services dropdown pattern (aboutOpen state,
trigger/panel refs, outside-click + Escape handling). Desktop panel and
mobile nav both list «من نحن» (/about) and «اللجان» (/about/committees).
- New pages/about.tsx: green intro panel («نبذة عن إحسان») + tab strip
(الرؤية والرسالة / الأهداف والركائز / المزايا والمجالات) for the Who-we-are
view, and a committee card grid for the Committees view. Section chosen via
/about/:section? route param; in-page toggle between the two. Reuses Reveal
for scroll-in.
- App.tsx: registered <Route path="/about/:section?" component={About} />.
- translations.ts: added full bilingual `about` section (AR + EN).
Fully bilingual via existing t.* system, RTL verified, no emojis.
tsc passes; screenshots confirm both views render correctly.
Reskin the EHSAN POC to match ehsan.sa and gate the admin area behind a
simple POC login.
- Official header: cropped EHSAN logo, nav (الرئيسية/الوقف/فرص التبرع/
خدماتنا dropdown→طلب دعم/عن إحسان/براعم إحسان), login/cart/search icons,
language toggle, mobile menu. Functional items link; rest are visual-only.
- Colors: green primary tuned + orange accent token added in index.css.
- Auth: AuthContext (localStorage, admin/admin) + login page; /admin and
/whatsapp-log now behind a Protected wrapper redirecting to /login.
- Redesigned OpportunityCard (photo, green progress bar with %, category
badge, تم جمع/المبلغ المتبقي columns, inline donate button + amount),
used on home and opportunities pages.
- Two-step donate page (التفاصيل → الدفع): step indicator, presets
100/50/10, custom amount (prefilled via ?amount=), "تبرع عن أهلك"
checkbox, donor form (phone min 10 for OpenClaw loop).
- 8 need-type card images added; needImages helper maps need→image.
- Seed: added published opportunities (req-012..017) with partial progress
to showcase cards; one kept near-full for an easy closed-loop demo.
Deviation (from code review): donate handler now ACCUMULATES collectedAmount
and clamps to target, validates finite/positive amount, and only advances to
the closed-loop pipeline when a case is fully funded (previously overwrote
and force-advanced — broke partial-progress cases). Donate buttons kept green
to match the reference; orange is an accent only.