feat: the art grade becomes configurable, off by default (front 8.5)

Gestão sets in the Site tab below which grade the designer is warned and
below which the designer treatment is required (only while it is offered).
The decision is stored with the approved quote, so a later change never
rewrites old orders; the card shows 'Nota N: conferir a arte', the Site
forces the treatment box with the reason. With no rule nothing changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-09 16:13:30 -03:00
parent 1d0353fe54
commit 272755d2bc
16 changed files with 338 additions and 13 deletions

View File

@@ -86,6 +86,12 @@ def unit_cents_for(c, product: str, metres: Decimal) -> int:
return band_price(row['unit_cents'], row['bands'], metres)
def treatment_offered(c) -> bool:
"""Whether the designer's treatment is on the Site: enabled and priced."""
offer = current(c)['tratamento']
return bool(offer['enabled'] and offer['unit_cents'] > 0)
def require_enabled(c, product: str) -> None:
"""Refuse a product someone switched off in the Kanban's Site tab."""
# Imported here so the pure helpers above load without the web framework