feat: the proof's photo or video opens beside Prova OK and from its order, also after the answer
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 6m43s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m11s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 6m43s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m11s
Marcus could not reach the review photo of the proof of #30 (card #31): in Revisão it sat at the end of the card's Pedido tab, away from the answer, and once the seller answered, the card left the board and the photo with it. - The board sends each order's proof card with its photos and videos. - "Responder a prova" has "Ver foto" / "Ver vídeo" beside Prova OK, or says the Revisor has not sent one yet. - The parent shows a Prova section (the card, its answer, who and when) with the same buttons, and "Aguardando prova" offers them too. - The viewer drops the print-file line for a review photo and reports a photo it could not load, in red and to Sentry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -217,12 +217,17 @@ def with_print_files(c, orders):
|
||||
([o['parent_id'] for o in orders if o.get('parent_id')],)).fetchall()}
|
||||
# Every order's review photos and videos, in one query like the print files.
|
||||
review_rows = reviews.by_order(c, ids)
|
||||
# The proof card's go on its order too: an answered card leaves the board,
|
||||
# and the photo the seller answered on must stay a click away (Marcus,
|
||||
# 2026-11-17, the proof of #30).
|
||||
proof_reviews = reviews.by_order(c, [r['id'] for r in children.values()])
|
||||
for order in orders:
|
||||
order['hot'] = hot.get(order['id'])
|
||||
order['reviews'] = review_rows.get(str(order['id']), [])
|
||||
child = children.get(order['id'])
|
||||
order['proof_card'] = child and {k: child[k] for k in ('id', 'number', 'state', 'proof_result',
|
||||
'proof_decided_at', 'proof_decided_by', 'proof_reason')}
|
||||
order['proof_card'] = child and {**{k: child[k] for k in ('id', 'number', 'state', 'proof_result',
|
||||
'proof_decided_at', 'proof_decided_by', 'proof_reason')},
|
||||
'reviews': proof_reviews.get(str(child['id']), [])}
|
||||
parent = parents.get(order.get('parent_id'))
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user