Fix Tiptap editor visual formatting and improve badge contrast

Tiptap Editor Improvements:
- Active toolbar buttons now use primary background (black) instead of accent (gray) for better visibility
- Added visual formatting for headings (h1: 2xl bold, h2: xl bold with proper spacing)
- Added visual styling for blockquotes (left border, italic, muted foreground)

Badge Contrast Fixes:
- Product detail page badges now use primary background (black with white text) instead of secondary/accent (gray)
- Fixed product type badge and "Anda memiliki akses" badge
- Fixed "Rekaman segera tersedia" badge

API Query Fix:
- Fixed consulting_slots 400 error by removing unsupported nested relationship filter
- Changed to filter in JavaScript after fetching data from Supabase

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dwindown
2025-12-25 11:51:46 +07:00
parent 5ae1632684
commit 52190ff26d
3 changed files with 24 additions and 18 deletions

View File

@@ -66,18 +66,24 @@ export default function MemberDashboard() {
qr_expires_at
)
`)
.eq('orders.payment_status', 'pending')
.eq('status', 'pending_payment')
.gt('orders.qr_expires_at', new Date().toISOString())
.order('created_at', { ascending: false });
if (!error && data) {
// Filter in JavaScript: only include slots where order is pending AND not expired
const now = new Date().toISOString();
const validSlots = data.filter((item: any) =>
item.orders?.payment_status === 'pending' &&
item.orders?.qr_expires_at &&
item.orders.qr_expires_at > now
);
// Get unique order IDs
const uniqueOrders = Array.from(
new Set(data.map((item: any) => item.order_id))
new Set(validSlots.map((item: any) => item.order_id))
).map((orderId) => {
// Find the corresponding order data
const orderData = data.find((item: any) => item.order_id === orderId);
const orderData = validSlots.find((item: any) => item.order_id === orderId);
return {
order_id: orderId,
qr_expires_at: (orderData as any)?.orders?.qr_expires_at || ''