feat: review photo or video in Revisão (front 2)
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 6m4s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m6s
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 6m4s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m6s
In Revisão the card gets "Revisar": a photo or a video of up to 30 s of the printed sheet, from the computer's or the phone's camera in the browser, or a file already recorded. It is attached to the order as DTF-<n>-revisao-<seq> with when and who, kept 180 days, and copied by the computers with the order folders to Kanban/Revisões/. A photo needs 1600 px on its longer side. An order above 1 m cannot reach Finalizado without one. In Finalizado the customer's order page shows the photo. The Revisor, Gestão and the administrators take it (capability "inspect"). Dialogs opened from a card's face or the board (Revisar, Editar tempos) now show over the page when the order panel is closed; inside the closed panel they were invisible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -501,10 +501,18 @@ def detail(oid: UUID, identity=Depends(owner)):
|
||||
# only a correction's reason is written for the customer.
|
||||
history = c.execute('''SELECT from_state,to_state,CASE WHEN to_state='cor' THEN reason ELSE '' END AS reason,
|
||||
created_at FROM dtf_local.movements WHERE order_id=%s AND NOT back ORDER BY id''', (oid,)).fetchall()
|
||||
# The review photos only once the order is Finalizado; a video stays
|
||||
# on the Kanban card (app/reviews.py).
|
||||
photos = c.execute('''SELECT r.id,u.name,r.created_at FROM dtf_local.order_reviews r
|
||||
JOIN dtf_local.uploads u ON u.id=r.upload_id
|
||||
WHERE r.order_id=%s AND r.kind='photo' ORDER BY r.seq''', (oid,)).fetchall() \
|
||||
if row['state'] == 'fin' else []
|
||||
return {'id': row['id'], 'number': row['number'], 'code': order_code(row['id']),
|
||||
'state': row['state'], 'version': row['version'],
|
||||
'created_at': row['created_at'], 'snapshot': row['snapshot'], 'history': history,
|
||||
'files': file_rows(c,oid)}
|
||||
'files': file_rows(c,oid),
|
||||
'reviews': [{'id': photo['id'], 'name': photo['name'], 'created_at': photo['created_at']}
|
||||
for photo in photos]}
|
||||
|
||||
@router.post('/api/customer/orders/{oid}/corrections')
|
||||
def correction(oid: UUID, body: ArtworkSubmission, identity=Depends(owner)):
|
||||
|
||||
Reference in New Issue
Block a user