feat(mobile-fixes-phase4): Complete US-407 - Fix Editare Bonuri cu Eroare
Implemented by Ralph autonomous loop. Iteration: 7 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -265,7 +265,12 @@ class ReceiptCRUD:
|
|||||||
receipt: Receipt,
|
receipt: Receipt,
|
||||||
data: ReceiptUpdate,
|
data: ReceiptUpdate,
|
||||||
) -> Receipt:
|
) -> Receipt:
|
||||||
"""Update receipt fields."""
|
"""Update receipt fields.
|
||||||
|
|
||||||
|
US-407: When a receipt is manually updated, reset processing_status and
|
||||||
|
processing_error to NULL. This allows failed OCR receipts to be corrected
|
||||||
|
manually and then submitted for approval without showing as "error" status.
|
||||||
|
"""
|
||||||
update_data = data.model_dump(exclude_unset=True)
|
update_data = data.model_dump(exclude_unset=True)
|
||||||
|
|
||||||
# Recalculate tva_total from tva_breakdown if breakdown is being updated
|
# Recalculate tva_total from tva_breakdown if breakdown is being updated
|
||||||
@@ -285,6 +290,12 @@ class ReceiptCRUD:
|
|||||||
for field, value in update_data.items():
|
for field, value in update_data.items():
|
||||||
setattr(receipt, field, value)
|
setattr(receipt, field, value)
|
||||||
|
|
||||||
|
# US-407: Reset processing status when receipt is manually edited
|
||||||
|
# This clears the "failed" status so edited receipts can be submitted for approval
|
||||||
|
if receipt.processing_status == 'failed':
|
||||||
|
receipt.processing_status = None
|
||||||
|
receipt.processing_error = None
|
||||||
|
|
||||||
receipt.updated_at = datetime.utcnow()
|
receipt.updated_at = datetime.utcnow()
|
||||||
|
|
||||||
session.add(receipt)
|
session.add(receipt)
|
||||||
|
|||||||
@@ -136,8 +136,8 @@
|
|||||||
"npm run build passes",
|
"npm run build passes",
|
||||||
"Verify in browser: Editează bon cu eroare → Salvează → Statusul nu mai arată eroare"
|
"Verify in browser: Editează bon cu eroare → Salvează → Statusul nu mai arată eroare"
|
||||||
],
|
],
|
||||||
"passes": false,
|
"passes": true,
|
||||||
"notes": ""
|
"notes": "Completed in iteration 7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "US-408",
|
"id": "US-408",
|
||||||
|
|||||||
@@ -33,3 +33,14 @@ Stories: 8 (US-401 to US-408)
|
|||||||
[2026-01-12 19:31:11] Working on story: US-406
|
[2026-01-12 19:31:11] Working on story: US-406
|
||||||
[2026-01-12 19:31:11] Running Claude... (log: /workspace/roa2web/scripts/ralph/logs/iteration_5_US-406.log)
|
[2026-01-12 19:31:11] Running Claude... (log: /workspace/roa2web/scripts/ralph/logs/iteration_5_US-406.log)
|
||||||
[2026-01-12 19:36:45] SUCCESS: Story US-406 passed!
|
[2026-01-12 19:36:45] SUCCESS: Story US-406 passed!
|
||||||
|
[2026-01-12 19:36:45] Changes committed
|
||||||
|
[2026-01-12 19:36:45] Progress: 6/8 stories completed
|
||||||
|
[2026-01-12 19:36:47] === Iteration 6/50 ===
|
||||||
|
[2026-01-12 19:36:47] Working on story: US-407
|
||||||
|
[2026-01-12 19:36:47] Running Claude... (log: /workspace/roa2web/scripts/ralph/logs/iteration_6_US-407.log)
|
||||||
|
[2026-01-12 19:47:56] Story US-407 not yet complete, continuing...
|
||||||
|
[2026-01-12 19:47:56] Progress: 6/8 stories completed
|
||||||
|
[2026-01-12 19:47:58] === Iteration 7/50 ===
|
||||||
|
[2026-01-12 19:47:58] Working on story: US-407
|
||||||
|
[2026-01-12 19:47:58] Running Claude... (log: /workspace/roa2web/scripts/ralph/logs/iteration_7_US-407.log)
|
||||||
|
[2026-01-12 19:52:43] SUCCESS: Story US-407 passed!
|
||||||
|
|||||||
Reference in New Issue
Block a user