diff --git a/custom_ui/api/db/estimates.py b/custom_ui/api/db/estimates.py index ab1a9af..0368422 100644 --- a/custom_ui/api/db/estimates.py +++ b/custom_ui/api/db/estimates.py @@ -176,13 +176,14 @@ def manual_response(name, response): new_status = "Estimate Accepted" if accepted else "Lost" estimate.custom_response = response - estimate.custom_current_status = new_status - estimate.status = "Ordered" if accepted else "Closed" + # estimate.custom_current_status = new_status + # estimate.status = "Ordered" if accepted else "Closed" estimate.flags.ignore_permissions = True print("DEBUG: Updating estimate with response:", response, "and status:", new_status) estimate.save() + return build_success_response(estimate.as_dict()) except Exception as e: - return e + return build_error_response(str(e), 500) @frappe.whitelist(allow_guest=True) diff --git a/frontend/src/components/pages/Estimate.vue b/frontend/src/components/pages/Estimate.vue index e6b1275..9048950 100644 --- a/frontend/src/components/pages/Estimate.vue +++ b/frontend/src/components/pages/Estimate.vue @@ -2,7 +2,9 @@

{{ isNew ? 'Create Estimate' : 'View Estimate' }}

-
@@ -108,8 +110,8 @@

Customer Response:

- - {{ getResponseText(estimate.customResponse) }} + + {{ getResponseText(estimateResponse) }}
@@ -122,7 +124,7 @@ :options="{ showActions: false }" > -