feat: Montar creates the invoiced order card (front 7a.2b)
The montador sends each stamp to storage, splits the list into items of at most 20 sources and 4000 copies, packs each one with the Site's engine and creates the order in Arte recebida: typed customer, pickup, the Site's table price, payment 'faturado', origin dropflow for Expedição and atendimento otherwise. Until Dropstar decides, these orders do not go to Tiny and the customer gets no paid e-mail. Vendedor and Expedição may now upload through the operator upload routes (can_any). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -241,4 +241,15 @@ def can(capability):
|
||||
return check
|
||||
|
||||
|
||||
def can_any(*capabilities):
|
||||
"""A dependency that lets through a profile with any of these capabilities,
|
||||
and returns the operator's e-mail, as the routes record it."""
|
||||
def check(request: Request):
|
||||
account = signed_in(request)
|
||||
if not any(account['role'] in CAPABILITIES[capability] for capability in capabilities):
|
||||
raise HTTPException(403, 'Seu perfil não permite esta ação.')
|
||||
return account['email']
|
||||
return check
|
||||
|
||||
|
||||
operator = can('view')
|
||||
|
||||
Reference in New Issue
Block a user