Files
calvana/pledge-now-pay-later/src/components/ui/progress.tsx
Omair Saleh c79b9bcabc production: reminder cron, dashboard overhaul, shadcn components, setup wizard
- /api/cron/reminders: processes pending reminders every 15min, sends WhatsApp with email fallback
- /api/cron/overdue: marks overdue pledges daily (7d deferred, 14d immediate)
- /api/pledges: GET handler with filtering, search, pagination, sort by dueDate
- Dashboard overview: stats, collection progress bar, needs attention, upcoming payments
- Dashboard pledges: proper table with status tabs, search, actions, pagination
- New shadcn components: Table, Tabs, DropdownMenu, Progress
- Setup wizard: 4-step onboarding (org → bank → event → QR code)
- Settings API: PUT handler for org create/update
- Org resolver: single-tenant fallback to first org
- Cron jobs installed: reminders every 15min, overdue check at 6am
- Auto-generates installment dates when not provided
- HOSTNAME=0.0.0.0 in compose for multi-network binding
2026-03-03 05:11:17 +08:00

26 lines
806 B
TypeScript

import * as React from "react"
import { cn } from "@/lib/utils"
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
value?: number
max?: number
indicatorClassName?: string
}
const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(
({ className, value = 0, max = 100, indicatorClassName, ...props }, ref) => {
const pct = Math.min(100, Math.max(0, (value / max) * 100))
return (
<div ref={ref} className={cn("relative h-3 w-full overflow-hidden rounded-full bg-muted", className)} {...props}>
<div
className={cn("h-full rounded-full bg-trust-blue transition-all duration-500 ease-out", indicatorClassName)}
style={{ width: `${pct}%` }}
/>
</div>
)
}
)
Progress.displayName = "Progress"
export { Progress }