feat: an order can be marked "Aguardando contato" until the customer is reached
All checks were successful
Build and deploy / Validate source (push) Successful in 16s
Build and deploy / Integration suite on a real stack (push) Successful in 4m8s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m7s

The 7 October meeting asked for a way to flag orders whose file needs a word
with the customer before printing: rename Arte tratada, or tag the card. A tag
keeps the stage meaning "file checked" and the order where it is in the
queue. In the order panel, "☎ Aguardando contato" asks what has to be agreed;
the card then shows the mark, the board has an "Aguardando contato" filter,
and the panel shows the note, who marked it and when, the customer's WhatsApp
and "Contato feito", which clears it. The customer is not told. Sellers see
the mark but cannot set it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-13 14:41:59 -03:00
parent bcce64fff8
commit cf12566e86
6 changed files with 83 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
"""Discarding an unpaid quote, deleting a test order, cancelling a paid one.
"""Discarding an unpaid quote, deleting a test order, marking an order as waiting
for contact, cancelling a paid one.
Run inside the API container: python -m tests.order_actions_test
"""
@@ -52,6 +53,17 @@ def run():
test_order = None
assert str(test_quote) in listed()
# "Aguardando contato": a mark with what to agree, on the board until cleared.
client.call(f'/operator/orders/{paid_order}/contact', {'waiting': True, 'note': ' '}, operator=True, expected=422)
client.call(f'/operator/orders/{paid_order}/contact', {'waiting': True, 'note': 'Confirmar a cor do fundo'},
operator=True)
marked = {o['id']: o for o in client.call('/operator/board', operator=True)['orders']}[str(paid_order)]
assert marked['contact_note'] == 'Confirmar a cor do fundo' and marked['contact_since'], marked
assert marked['contact_by'] and marked['state'] == 'rec'
client.call(f'/operator/orders/{paid_order}/contact', {'waiting': False}, operator=True)
cleared = {o['id']: o for o in client.call('/operator/board', operator=True)['orders']}[str(paid_order)]
assert cleared['contact_since'] is None and cleared['contact_note'] is None
# A paid order is cancelled with a reason, kept, and can no longer move.
# A paid order in progress is not deleted: it is cancelled first.
client.call(f'/operator/orders/{paid_order}/delete', {}, operator=True, expected=409)