feat: time in "Aguardando contato" no longer counts in Números (Dropstar's rule D-38)
All checks were successful
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Successful in 3m20s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s
All checks were successful
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Successful in 3m20s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s
Dropstar's internal rules (2026-10-26): waiting for a word with the customer has no deadline and does not enter the time figures. - each wait is kept, from the mark to "Contato feito" (and from checkout when the customer asks for a proof), in a new table; waits open today are recorded from their start - the time in each stage and "Do pagamento ao Finalizado" leave those waits out, and the Números page says so Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -157,6 +157,13 @@ def run():
|
||||
day = client.call(f'/operator/stats?start={alone}&end={alone}', operator=True)
|
||||
assert day['stages']['tra'] == {'orders': 1, 'passages': 2, 'median_hours': 2.0}, day['stages']
|
||||
assert day['stages']['rec']['median_hours'] == 1.0, day['stages']
|
||||
# Half an hour of it waiting for the customer does not count (D-38).
|
||||
with db.connect() as c:
|
||||
c.execute('''INSERT INTO dtf_local.contact_waits(order_id, started_at, ended_at)
|
||||
VALUES(%s, %s::timestamptz, %s::timestamptz)''', (order_id, f'{alone} 09:15-03', f'{alone} 09:45-03'))
|
||||
day = client.call(f'/operator/stats?start={alone}&end={alone}', operator=True)
|
||||
assert day['stages']['tra']['median_hours'] == 1.5, day['stages']
|
||||
assert day['stages']['rec']['median_hours'] == 1.0, day['stages']
|
||||
|
||||
# The company's name from the registry: on the board, and found by the search.
|
||||
from app import cnpj as registry
|
||||
|
||||
Reference in New Issue
Block a user