Fix member dashboard issues and webinar datetime loading
- Remove payment_provider filter to show all paid products (webinars now appear) - Fix webinar event_start field loading in AdminProducts (format to datetime-local) - Update order status badge colors for better visibility (green for paid, amber for pending) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -354,7 +354,7 @@ export default function ProductDetail() {
|
||||
<Badge className="bg-brand-accent text-white">Segera Hadir</Badge>
|
||||
)}
|
||||
{product.type === 'webinar' && !product.recording_url && product.event_start && new Date(product.event_start) <= new Date() && (
|
||||
<Badge className="bg-muted text-primary">Telah Selesai</Badge>
|
||||
<Badge className="bg-muted text-primary">Telah Lewat</Badge>
|
||||
)}
|
||||
{hasAccess && <Badge className="bg-primary text-primary-foreground">Anda memiliki akses</Badge>}
|
||||
</div>
|
||||
|
||||
@@ -88,7 +88,7 @@ export default function AdminProducts() {
|
||||
content: product.content || '',
|
||||
meeting_link: product.meeting_link || '',
|
||||
recording_url: product.recording_url || '',
|
||||
event_start: product.event_start,
|
||||
event_start: product.event_start ? product.event_start.slice(0, 16) : null,
|
||||
duration_minutes: product.duration_minutes,
|
||||
price: product.price,
|
||||
sale_price: product.sale_price,
|
||||
|
||||
@@ -126,8 +126,7 @@ export default function MemberDashboard() {
|
||||
`,
|
||||
)
|
||||
.eq("user_id", user!.id)
|
||||
.eq("payment_status", "paid")
|
||||
.eq("payment_provider", "pakasir"),
|
||||
.eq("payment_status", "paid"),
|
||||
supabase.from("profiles").select("whatsapp_number").eq("id", user!.id).single(),
|
||||
]);
|
||||
|
||||
@@ -299,7 +298,7 @@ export default function MemberDashboard() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<Badge className={order.payment_status === "paid" ? "bg-brand-accent text-white" : "bg-muted text-primary"}>
|
||||
<Badge className={order.payment_status === "paid" ? "bg-green-600 text-white border-2 border-green-700" : "bg-amber-500 text-white border-2 border-amber-600"}>
|
||||
{order.payment_status === "paid" ? "Lunas" : "Pending"}
|
||||
</Badge>
|
||||
<span className="font-bold">{formatIDR(order.total_amount)}</span>
|
||||
|
||||
Reference in New Issue
Block a user