redesing product lists

This commit is contained in:
2025-05-28 11:01:42 +02:00
parent 330124837f
commit eb3ae05425
12 changed files with 1569 additions and 809 deletions

View File

@@ -30,7 +30,7 @@ def build_shopping_event_response(event: models.ShoppingEvent, db: Session) -> s
product_data = db.execute(
text("""
SELECT p.id, p.name, p.organic, p.weight, p.weight_unit,
sep.amount, sep.price,
sep.amount, sep.price, sep.discount,
gc.id as category_id, gc.name as category_name,
gc.created_at as category_created_at, gc.updated_at as category_updated_at,
b.id as brand_id, b.name as brand_name,
@@ -73,7 +73,8 @@ def build_shopping_event_response(event: models.ShoppingEvent, db: Session) -> s
weight=row.weight,
weight_unit=row.weight_unit,
amount=row.amount,
price=row.price
price=row.price,
discount=row.discount
)
)
@@ -413,7 +414,8 @@ def create_shopping_event(event: schemas.ShoppingEventCreate, db: Session = Depe
shopping_event_id=db_event.id,
product_id=product_item.product_id,
amount=product_item.amount,
price=product_item.price
price=product_item.price,
discount=product_item.discount
)
)
@@ -470,7 +472,8 @@ def update_shopping_event(event_id: int, event_update: schemas.ShoppingEventCrea
shopping_event_id=event_id,
product_id=product_item.product_id,
amount=product_item.amount,
price=product_item.price
price=product_item.price,
discount=product_item.discount
)
)