feat(shop): move linked fee configuration to product level
All checks were successful
Staging Build / build (push) Successful in 2m52s
All checks were successful
Staging Build / build (push) Successful in 2m52s
This commit is contained in:
@@ -9,7 +9,7 @@ export async function getProducts() {
|
||||
const supabase = await createClient()
|
||||
const { data, error } = await supabase
|
||||
.from('products')
|
||||
.select('*, category:categories(*), modules:product_modules!product_modules_product_id_fkey(*)')
|
||||
.select('*, category:categories(*), modules:product_modules(*)')
|
||||
.order('created_at', { ascending: false })
|
||||
|
||||
if (error) throw error
|
||||
@@ -90,7 +90,6 @@ 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')
|
||||
@@ -128,7 +127,6 @@ 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')
|
||||
|
||||
Reference in New Issue
Block a user