Improve the frontend 2

This commit is contained in:
Urtzi Alfaro
2025-10-29 06:58:05 +01:00
parent 858d985c92
commit 36217a2729
98 changed files with 6652 additions and 4230 deletions

View File

@@ -102,7 +102,7 @@ async def create_quality_template(
# Add created_by from current user
template_dict = template_data.dict()
template_dict['created_by'] = UUID(current_user["sub"])
template_dict['created_by'] = UUID(current_user["user_id"])
template_create = QualityCheckTemplateCreate(**template_dict)
# Create template via service (handles validation and business rules)
@@ -111,6 +111,9 @@ async def create_quality_template(
template_data=template_create
)
# Commit the transaction to persist changes
await db.commit()
logger.info("Created quality template",
template_id=str(template.id),
template_name=template.name,
@@ -202,6 +205,9 @@ async def update_quality_template(
detail="Quality template not found"
)
# Commit the transaction to persist changes
await db.commit()
logger.info("Updated quality template",
template_id=str(template_id),
tenant_id=str(tenant_id))
@@ -259,6 +265,9 @@ async def delete_quality_template(
detail="Quality template not found"
)
# Commit the transaction to persist changes
await db.commit()
logger.info("Deleted quality template",
template_id=str(template_id),
tenant_id=str(tenant_id))