feat: Add email field to end_customers table and UI screens
All checks were successful
Staging Build / build (push) Successful in 2m36s
All checks were successful
Staging Build / build (push) Successful in 2m36s
This commit is contained in:
@@ -169,6 +169,7 @@ export async function adminCreateEndCustomer(data: {
|
||||
street?: string
|
||||
zip?: string
|
||||
city?: string
|
||||
email?: string
|
||||
}) {
|
||||
const admin = createAdminClient()
|
||||
const { data: dbData, error } = await admin
|
||||
@@ -182,6 +183,7 @@ export async function adminCreateEndCustomer(data: {
|
||||
street: data.street || null,
|
||||
zip: data.zip || null,
|
||||
city: data.city || null,
|
||||
email: data.email || null,
|
||||
}])
|
||||
.select()
|
||||
.single()
|
||||
@@ -198,6 +200,7 @@ export async function adminUpdateEndCustomer(id: string, data: {
|
||||
street?: string
|
||||
zip?: string
|
||||
city?: string
|
||||
email?: string
|
||||
}) {
|
||||
const admin = createAdminClient()
|
||||
const { data: dbData, error } = await admin
|
||||
@@ -211,6 +214,7 @@ export async function adminUpdateEndCustomer(id: string, data: {
|
||||
street: data.street || null,
|
||||
zip: data.zip || null,
|
||||
city: data.city || null,
|
||||
email: data.email || null,
|
||||
})
|
||||
.eq('id', id)
|
||||
.select()
|
||||
|
||||
@@ -15,6 +15,7 @@ export type EndCustomerFormData = {
|
||||
street?: string
|
||||
zip?: string
|
||||
city?: string
|
||||
email?: string
|
||||
}
|
||||
|
||||
// ─── Lesen ───────────────────────────────────────────────────────────────────
|
||||
@@ -72,6 +73,7 @@ export async function createEndCustomer(formData: EndCustomerFormData): Promise<
|
||||
street: formData.street || null,
|
||||
zip: formData.zip || null,
|
||||
city: formData.city || null,
|
||||
email: formData.email || null,
|
||||
}])
|
||||
.select()
|
||||
.single()
|
||||
@@ -101,6 +103,7 @@ export async function updateEndCustomer(id: string, formData: EndCustomerFormDat
|
||||
street: formData.street || null,
|
||||
zip: formData.zip || null,
|
||||
city: formData.city || null,
|
||||
email: formData.email || null,
|
||||
})
|
||||
.eq('id', id)
|
||||
|
||||
@@ -134,6 +137,7 @@ export async function anonymizeEndCustomer(id: string): Promise<void> {
|
||||
street: null,
|
||||
zip: null,
|
||||
city: null,
|
||||
email: null,
|
||||
is_anonymized: true,
|
||||
})
|
||||
.eq('id', id)
|
||||
|
||||
@@ -62,6 +62,7 @@ export type EndCustomer = {
|
||||
street: string | null
|
||||
zip: string | null
|
||||
city: string | null
|
||||
email?: string | null
|
||||
is_anonymized: boolean
|
||||
created_at: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user