Add supplier and imporve inventory frontend 2
This commit is contained in:
@@ -178,7 +178,7 @@ class Ingredient(Base):
|
||||
else:
|
||||
# Final fallback
|
||||
category = "other"
|
||||
|
||||
|
||||
return {
|
||||
'id': str(self.id),
|
||||
'tenant_id': str(self.tenant_id),
|
||||
@@ -209,12 +209,12 @@ class Ingredient(Base):
|
||||
'delivery_days': self.delivery_days,
|
||||
'minimum_order_quantity': self.minimum_order_quantity,
|
||||
'pack_size': self.pack_size,
|
||||
'is_active': self.is_active,
|
||||
'is_perishable': self.is_perishable,
|
||||
'is_active': self.is_active if self.is_active is not None else True,
|
||||
'is_perishable': self.is_perishable if self.is_perishable is not None else False,
|
||||
'allergen_info': self.allergen_info,
|
||||
'nutritional_info': self.nutritional_info,
|
||||
'created_at': self.created_at.isoformat() if self.created_at else None,
|
||||
'updated_at': self.updated_at.isoformat() if self.updated_at else None,
|
||||
'updated_at': self.updated_at.isoformat() if self.updated_at else datetime.now(timezone.utc).isoformat(),
|
||||
'created_by': str(self.created_by) if self.created_by else None,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user