feat(crm): end_customers table, RLS, wizard customer selector, /my-customers CRUD, GDPR anonymization
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
import { getProducts, getCategories } from '@/lib/actions/products'
|
||||
import { getEndCustomers } from '@/lib/actions/end-customers'
|
||||
import { OrderWizard } from '@/components/order-wizard'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { Suspense } from 'react'
|
||||
@@ -35,7 +36,8 @@ async function OrderDataWrapper() {
|
||||
|
||||
const products = await getProducts()
|
||||
const categories = await getCategories()
|
||||
|
||||
const endCustomers = await getEndCustomers()
|
||||
|
||||
// Fetch profile if exists
|
||||
const { data: profile } = await supabase
|
||||
.from('profiles')
|
||||
@@ -43,5 +45,5 @@ async function OrderDataWrapper() {
|
||||
.eq('id', user.id)
|
||||
.single()
|
||||
|
||||
return <OrderWizard products={products} categories={categories} initialProfile={profile} />
|
||||
return <OrderWizard products={products} categories={categories} initialProfile={profile} initialEndCustomers={endCustomers} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user