feat: bump client-services (accumulated feature work + deploy fixes)
Snapshot of in-progress work across local_backend, manager_dashboard, and waiter_pwa (pricing, chat, fiscal, prep zones, recovery codes, CRM, inventory, permissions), plus the nginx/docker-compose deploy fixes for the Unraid + NPM reverse-proxy setup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,14 +16,19 @@ class SelectedOptionInput(BaseModel):
|
||||
|
||||
class OrderItemInput(BaseModel):
|
||||
product_id: int
|
||||
quantity: int
|
||||
quantity: float
|
||||
selected_options: Optional[List[SelectedOptionInput]] = None
|
||||
removed_ingredients: Optional[List[str]] = None
|
||||
notes: Optional[str] = None
|
||||
price_adjustment: Optional[float] = None # on-the-fly price delta, applied at add-time
|
||||
is_service_item: bool = False # priceless: print-once ephemeral; priced: saved as real item
|
||||
course_id: Optional[int] = None
|
||||
|
||||
|
||||
class AddItemsRequest(BaseModel):
|
||||
items: List[OrderItemInput]
|
||||
order_note: Optional[str] = None # whole-order note, written to Order.notes
|
||||
customer_count: Optional[int] = None # number of customers at the table
|
||||
|
||||
|
||||
class ProductNameOut(BaseModel):
|
||||
@@ -38,18 +43,24 @@ class OrderItemOut(BaseModel):
|
||||
product_id: int
|
||||
product: Optional[ProductNameOut] = None
|
||||
added_by: int
|
||||
quantity: int
|
||||
quantity: float
|
||||
unit_type: str = "piece"
|
||||
unit_price: float
|
||||
selected_options: Optional[str] = None
|
||||
removed_ingredients: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
status: str
|
||||
kds_status: str = "pending"
|
||||
added_at: UTCDatetime
|
||||
printed: bool
|
||||
paid_by: Optional[int] = None
|
||||
paid_at: Optional[UTCDatetime] = None
|
||||
payment_method: Optional[str] = None
|
||||
paid_in_shift_id: Optional[int] = None
|
||||
price_adjustment: float = 0.0
|
||||
course_id: Optional[int] = None
|
||||
deal_id: Optional[int] = None
|
||||
linked_item_id: Optional[int] = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
@@ -63,12 +74,14 @@ class PrintResultOut(BaseModel):
|
||||
class AddItemsResponse(BaseModel):
|
||||
order: "OrderOut"
|
||||
print_results: List[PrintResultOut]
|
||||
deal_offers: List[dict] = [] # DealOfferOut dicts — serialized to avoid circular imports
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class OrderCreate(BaseModel):
|
||||
table_id: int
|
||||
table_id: Optional[int] = None
|
||||
order_type: Optional[str] = "here" # here | takeaway | delivery
|
||||
|
||||
|
||||
class PayItemsRequest(BaseModel):
|
||||
@@ -109,6 +122,23 @@ class AuditLogOut(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class PrintJobOut(BaseModel):
|
||||
id: int
|
||||
printer_id: int
|
||||
zone_id: Optional[int] = None
|
||||
item_ids: str
|
||||
copies: int = 1
|
||||
status: str
|
||||
retry_count: int = 0
|
||||
first_attempted_at: Optional[UTCDatetime] = None
|
||||
last_attempted_at: Optional[UTCDatetime] = None
|
||||
succeeded_at: Optional[UTCDatetime] = None
|
||||
cancelled_at: Optional[UTCDatetime] = None
|
||||
cancel_reason: Optional[str] = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class OrderOut(BaseModel):
|
||||
id: int
|
||||
table_id: Optional[int] = None
|
||||
@@ -129,8 +159,11 @@ class OrderOut(BaseModel):
|
||||
online_customer_address: Optional[str] = None
|
||||
online_customer_notes: Optional[str] = None
|
||||
online_order_type: Optional[str] = None
|
||||
order_type: str = "here"
|
||||
customer_count: Optional[int] = None
|
||||
items: List[OrderItemOut] = []
|
||||
waiters: List[OrderWaiterOut] = []
|
||||
audit_logs: List[AuditLogOut] = []
|
||||
print_jobs: List[PrintJobOut] = []
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
Reference in New Issue
Block a user