feat: complete full CRUD for products with unified edit dialog and robust mapping

This commit is contained in:
DanielS
2026-05-01 01:26:12 +02:00
parent e6d801e9df
commit e6cfc45c67
3 changed files with 43 additions and 22 deletions

View File

@@ -107,8 +107,8 @@ export async function updateProduct(id: string, product: Partial<Product>, modul
if (modules.length > 0) {
const modulesWithId = modules.map(m => ({
name: m.name,
description: m.description,
price: m.additional_price, // Match schema column name 'price'
description: m.description || null,
price: m.price,
is_required: m.is_required,
requirements: m.requirements || [],
exclusions: m.exclusions || [],