feat: Expedição profile, stamp sizes and the Montar folha screen (front 7a.1)
The new Expedição profile and the seller may assemble sheets (capability assemble). Gestão edits the size table (letter and width). The Montar tab reads Estampas/<code>-<size>.png or <code>.png from the orders folder, checks the resolution with the Site's 96/200 DPI ruler, merges repeated lines and estimates the metres. Montar itself is slice 2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -125,7 +125,7 @@ def login_failed(email):
|
||||
# backup, the Tiny log): the others see there only what is on and off.
|
||||
# The designer approves and refuses artwork and asks for corrections, on every
|
||||
# order whatever its machine. Which cards each profile moves is MOVES.
|
||||
ROLES = ('superadmin', 'admin', 'gestao', 'designer', 'operador', 'revisor', 'vendedor', 'financeiro')
|
||||
ROLES = ('superadmin', 'admin', 'gestao', 'designer', 'operador', 'revisor', 'vendedor', 'financeiro', 'expedicao')
|
||||
CAPABILITIES = {
|
||||
'view': set(ROLES),
|
||||
'produce': {'superadmin', 'admin', 'gestao', 'designer'},
|
||||
@@ -155,6 +155,9 @@ CAPABILITIES = {
|
||||
# The photo or video of the printed sheet in Revisão (Fase 2, front 2): who
|
||||
# releases to Finalizado, and Gestão, which may stand in for them.
|
||||
'inspect': {'superadmin', 'admin', 'gestao', 'revisor'},
|
||||
# Montar folha (Fase 2, front 7): the new Expedição profile and the seller,
|
||||
# who gets this one action although otherwise view-only (D-30).
|
||||
'assemble': {'superadmin', 'admin', 'gestao', 'vendedor', 'expedicao'},
|
||||
}
|
||||
|
||||
# Who moves which card (Dropstar's flow, 2026-10-23, and their rules of
|
||||
|
||||
@@ -444,3 +444,19 @@ class ArtworkSubmission(StrictModel):
|
||||
version: int = Field(ge=0, strict=True)
|
||||
files: list[FileReference] = Field(min_length=1, max_length=60)
|
||||
note: str = Field(min_length=1, max_length=1000)
|
||||
|
||||
class StampSize(StrictModel):
|
||||
"""One row of the montador's size table (Fase 2, front 7)."""
|
||||
letter: str = Field(pattern=r'^[A-Z]{1,2}$')
|
||||
width_cm: Decimal = Field(gt=0, le=56, decimal_places=2)
|
||||
|
||||
class StampSizeTable(StrictModel):
|
||||
"""The whole table, replaced in one go by Gestão."""
|
||||
sizes: list[StampSize] = Field(min_length=1, max_length=26)
|
||||
|
||||
@model_validator(mode='after')
|
||||
def letters_unique(self):
|
||||
letters = [row.letter for row in self.sizes]
|
||||
if len(letters) != len(set(letters)):
|
||||
raise ValueError('Cada tamanho tem uma letra própria.')
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user