Fix invoice PDF table style, my-customers page dynamic rendering, add Supabase client import, disable cacheComponents
Files changed: 6 (7 insertions, 9 deletions)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
export const dynamic = 'force-dynamic';
|
||||
import { redirect } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { getEndCustomers } from '@/lib/actions/end-customers'
|
||||
import { ArrowLeft, Building2, Plus, Edit2, AlertTriangle } from 'lucide-react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Card, CardContent } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { createClient } from '@/lib/supabase/server';
|
||||
|
||||
export default async function MyCustomersPage() {
|
||||
const supabase = await createClient()
|
||||
@@ -15,10 +16,7 @@ export default async function MyCustomersPage() {
|
||||
const customers = await getEndCustomers()
|
||||
|
||||
// Anzahl Bestellungen pro Endkunde
|
||||
const { data: orderCounts } = await supabase
|
||||
.from('orders')
|
||||
.select('end_customer_id')
|
||||
.not('end_customer_id', 'is', null)
|
||||
const { data: orderCounts } = await supabase.from('orders').select('end_customer_id').not('end_customer_id', 'is', null);
|
||||
|
||||
const countMap: Record<string, number> = {}
|
||||
;(orderCounts ?? []).forEach(o => {
|
||||
|
||||
Reference in New Issue
Block a user