fix: align proof, treatment, metrics and site videos with PDF
All checks were successful
Build and deploy / Validate source (push) Successful in 11s
Build and deploy / Integration suite on a real stack (push) Successful in 5m44s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m22s
All checks were successful
Build and deploy / Validate source (push) Successful in 11s
Build and deploy / Integration suite on a real stack (push) Successful in 5m44s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m22s
This commit is contained in:
27
app/prumo.py
27
app/prumo.py
@@ -67,21 +67,23 @@ def report(order, uploads):
|
||||
else:
|
||||
lines.append(f'{lead}Formato detectado: {_ext(final).upper() or "desconhecido"}')
|
||||
exts = {_ext(name) for name in names}
|
||||
if exts & {'pdf', 'ai'}:
|
||||
lines.append(f'{lead}PDF → PNG 300 DPI')
|
||||
elif exts & MANUAL:
|
||||
lines.append(f'{lead}{"/".join(sorted(exts & MANUAL)).upper()} com texto vivo → conferência manual')
|
||||
row = generated.get(index)
|
||||
ready = bool(row and row.get('status') == 'ready')
|
||||
if row and row.get('status') == 'manual':
|
||||
lines.append(f'{lead}Arquivo exige preparo manual')
|
||||
dpi = item.get('source_dpi')
|
||||
if dpi:
|
||||
lines.append(f'{lead}Veio em {dpi} DPI, ampliado para 300' if dpi < 300 else f'{lead}Resolução {dpi} DPI')
|
||||
lines.append(f'{lead}Fundo conferido na sala (arquivo manual)' if exts & MANUAL
|
||||
else f'{lead}Fundo transparente')
|
||||
lines.append(f'{lead}Resolução detectada: {dpi} DPI')
|
||||
if ready:
|
||||
detail = row.get('detail') or {}
|
||||
if exts & {'pdf', 'ai'} and detail.get('format') == 'png':
|
||||
lines.append(f'{lead}PDF → PNG {detail.get("dpi", 300)} DPI')
|
||||
elif detail.get('format'):
|
||||
lines.append(f'{lead}Arquivo final em {detail["format"].upper()} {detail.get("dpi", 300)} DPI')
|
||||
dots = int(item.get('residue_accepted') or 0)
|
||||
if dots:
|
||||
lines.append(f'{lead}{dots} ponto{"s" if dots > 1 else ""} < 2 mm — cliente aceitou' +
|
||||
_hora(item.get('residue_accepted_at')))
|
||||
else:
|
||||
lines.append(f'{lead}0 pontos de recorte')
|
||||
production = item.get('production') or {}
|
||||
placements = production.get('placements') or []
|
||||
if item.get('mode') in ('avulsa', 'uv'):
|
||||
@@ -100,7 +102,6 @@ def report(order, uploads):
|
||||
lines.append(f'{lead}Aviso de traço fino disparou — cliente escolheu imprimir em C1')
|
||||
else:
|
||||
lines.append(f'{lead}Aviso de traço fino não disparou')
|
||||
row = generated.get(index)
|
||||
if row:
|
||||
detail = row.get('detail') or {}
|
||||
parts = detail.get('parts') or []
|
||||
@@ -108,9 +109,7 @@ def report(order, uploads):
|
||||
sizes = [Decimal(str(p.get('to_cm', 0))) - Decimal(str(p.get('from_cm', 0))) for p in parts]
|
||||
lines.append(f'{lead}{_m(billed)} m → {len(parts)} partes (' +
|
||||
' + '.join(_m(size) for size in sizes) + ')')
|
||||
elif detail.get('format'):
|
||||
lines.append(f'{lead}Arquivo final em {detail["format"].upper()} {detail.get("dpi", 300)} DPI')
|
||||
if row.get('finished_at') and row.get('created_at'):
|
||||
if ready and row.get('finished_at') and row.get('created_at'):
|
||||
seconds = (row['finished_at'] - row['created_at']).total_seconds()
|
||||
lines.append(f'{lead}Prumo levou {max(1, round(seconds))} s')
|
||||
return lines
|
||||
@@ -123,7 +122,7 @@ def customer_summary(items):
|
||||
lead = f'Item {index + 1}: ' if len(items) > 1 else ''
|
||||
dpi = item.get('source_dpi')
|
||||
if dpi and dpi < 300:
|
||||
lines.append(f'{lead}Sua arte veio em {dpi} DPI e foi ampliada para 300.')
|
||||
lines.append(f'{lead}Sua arte foi medida em {dpi} DPI. O arquivo de impressão será preparado em 300 DPI após o pagamento.')
|
||||
dots = int(item.get('residue_accepted') or 0)
|
||||
if dots:
|
||||
lines.append(f'{lead}Há {dots} pontinho{"s" if dots > 1 else ""} solto{"s" if dots > 1 else ""} '
|
||||
|
||||
Reference in New Issue
Block a user