notification + admin panel

This commit is contained in:
root
2025-12-21 11:39:41 +01:00
parent 514e04f43d
commit 5e65144934
15 changed files with 2423 additions and 883 deletions

View File

@@ -16,10 +16,14 @@ export async function GET(request: NextRequest) {
d.unit as drop_unit,
d.ppu as drop_ppu,
b.username as buyer_username,
b.email as buyer_email
b.email as buyer_email,
bd.fullname as buyer_fullname,
bd.address as buyer_address,
bd.phone as buyer_phone
FROM sales s
LEFT JOIN drops d ON s.drop_id = d.id
LEFT JOIN buyers b ON s.buyer_id = b.id
LEFT JOIN buyer_data bd ON s.buyer_data_id = bd.id
ORDER BY s.created_at DESC`
)
return NextResponse.json(rows)