fix: a proof card shows the film it prints, the Kanban's tooltips stay whole on screen, and a session that changed is a warning (DTF-WEB-26)
A proof card bills 0 m: the board now carries proof_film_cm per item (the same measure as Números), the card reads 'prova · 0,15 m', the column totals count it, and the drawer says 'prova sem custo', the proof's film and 'Folha do pedido'. The [data-tip] tooltips were CSS boxes inside the card, cut by the column and over the card below; one box fixed to the window now sits under the element, or over it near the bottom, inside the screen. 'Sua conta ou sessão mudou' is guidance shown as a warning, so it stays out of Sentry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from uuid import UUID
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, Response
|
||||
from pydantic import Field
|
||||
|
||||
from ... import hotfolder, machines, mail, payments, prumo, receipt, reviews
|
||||
from ... import hotfolder, machine_log, machines, mail, payments, prumo, receipt, reviews
|
||||
from ...cart_pricing import designer_hours
|
||||
from ...core import db
|
||||
from ...core.auth import audit, can, operator
|
||||
@@ -252,6 +252,13 @@ def with_print_files(c, orders):
|
||||
order['proof_parent'] = parent and {'id': parent['id'], 'number': parent['number'], 'state': parent['state']}
|
||||
order['correction_reason'] = reasons.get(order['id']) if order['state'] == 'cor' else None
|
||||
order['print_files'] = [row for row in generated if row['order_id'] == order['id']]
|
||||
# A proof card bills nothing (0 m) but prints film: the board shows the
|
||||
# film of each sheet, the same measure as Números (machine_log).
|
||||
if (order.get('snapshot') or {}).get('proof_of'):
|
||||
windows = {str(row['item_index']): row['detail']['proof_windows'] for row in order['print_files']
|
||||
if isinstance(row.get('detail'), dict) and row['detail'].get('proof_windows')}
|
||||
order['proof_film_cm'] = {str(index): float(machine_log.film_metres(order['snapshot'], {index}, windows) * 100)
|
||||
for index in range(len(order['snapshot'].get('items') or []))}
|
||||
order['prumo'] = prumo.report(order, uploads)
|
||||
approved = [row for row in finals if row['order_id'] == order['id']]
|
||||
order['final_items'] = sorted({row['item_index'] for row in approved})
|
||||
|
||||
Reference in New Issue
Block a user