feat(shop): add dynamic linked fees to modules

This commit is contained in:
DanielS
2026-07-22 15:09:05 +02:00
parent acd8d6575c
commit 1c31918768
8 changed files with 208 additions and 21 deletions

View File

@@ -90,6 +90,7 @@ export async function createProduct(
requirements: m.requirements || [],
exclusions: m.exclusions || [],
has_quantity: m.has_quantity ?? false,
linked_fee_product_id: m.linked_fee_product_id || null,
}))
const { error: modulesError } = await supabase
.from('product_modules')
@@ -127,6 +128,7 @@ export async function updateProduct(id: string, product: Partial<Product>, modul
requirements: m.requirements || [],
exclusions: m.exclusions || [],
has_quantity: m.has_quantity ?? false,
linked_fee_product_id: m.linked_fee_product_id || null,
}))
const { error: modulesError } = await supabase
.from('product_modules')

View File

@@ -46,6 +46,7 @@ export type ProductModule = {
exclusions: string[] // UUID[] von Modulen, die nicht gleichzeitig aktiv sein dürfen
created_at: string
has_quantity?: boolean
linked_fee_product_id?: string | null
}
export type Profile = {