Improve the frontend and fix TODOs
This commit is contained in:
@@ -112,6 +112,7 @@ class ProductionBatch(Base):
|
||||
quality_score = Column(Float, nullable=True)
|
||||
waste_quantity = Column(Float, nullable=True)
|
||||
defect_quantity = Column(Float, nullable=True)
|
||||
waste_defect_type = Column(String(100), nullable=True) # Type of defect causing waste (burnt, misshapen, underproofed, temperature_issues, expired)
|
||||
|
||||
# Equipment and resources
|
||||
equipment_used = Column(JSON, nullable=True) # List of equipment IDs
|
||||
@@ -123,6 +124,7 @@ class ProductionBatch(Base):
|
||||
forecast_id = Column(UUID(as_uuid=True), nullable=True) # Associated demand forecast
|
||||
is_rush_order = Column(Boolean, default=False)
|
||||
is_special_recipe = Column(Boolean, default=False)
|
||||
is_ai_assisted = Column(Boolean, default=False) # Whether batch used AI forecasting/optimization
|
||||
|
||||
# Notes and tracking
|
||||
production_notes = Column(Text, nullable=True)
|
||||
@@ -163,6 +165,7 @@ class ProductionBatch(Base):
|
||||
"quality_score": self.quality_score,
|
||||
"waste_quantity": self.waste_quantity,
|
||||
"defect_quantity": self.defect_quantity,
|
||||
"waste_defect_type": self.waste_defect_type,
|
||||
"equipment_used": self.equipment_used,
|
||||
"staff_assigned": self.staff_assigned,
|
||||
"station_id": self.station_id,
|
||||
@@ -170,6 +173,7 @@ class ProductionBatch(Base):
|
||||
"forecast_id": str(self.forecast_id) if self.forecast_id else None,
|
||||
"is_rush_order": self.is_rush_order,
|
||||
"is_special_recipe": self.is_special_recipe,
|
||||
"is_ai_assisted": self.is_ai_assisted,
|
||||
"production_notes": self.production_notes,
|
||||
"quality_notes": self.quality_notes,
|
||||
"delay_reason": self.delay_reason,
|
||||
|
||||
Reference in New Issue
Block a user