feat(workshop): remove quality_check and add edit order modal
- Removed 'Control de calidad' from service order pipeline (VALID_TRANSITIONS, status labels, Kanban columns). - Added editable fields for customer, vehicle, branch, mechanic, priority, mileage, fuel level, estimated completion/cost and reception notes. - Added customer/vehicle autocomplete in the edit order modal.
This commit is contained in:
@@ -12,8 +12,7 @@ VALID_TRANSITIONS = {
|
||||
'received': ['diagnosis', 'cancelled'],
|
||||
'diagnosis': ['waiting_parts', 'repair', 'cancelled'],
|
||||
'waiting_parts': ['repair', 'cancelled'],
|
||||
'repair': ['quality_check', 'cancelled'],
|
||||
'quality_check': ['ready', 'cancelled'],
|
||||
'repair': ['ready', 'cancelled'],
|
||||
'ready': ['delivered', 'cancelled'],
|
||||
'delivered': [],
|
||||
'cancelled': [],
|
||||
@@ -455,9 +454,10 @@ def remove_labor(conn, labor_id):
|
||||
def update_service_order(conn, so_id, data):
|
||||
"""Update general service order fields."""
|
||||
cur = conn.cursor()
|
||||
allowed = ['priority', 'reception_notes', 'diagnosis_notes', 'repair_notes',
|
||||
allowed = ['customer_id', 'vehicle_id', 'branch_id', 'priority',
|
||||
'reception_notes', 'diagnosis_notes', 'repair_notes',
|
||||
'delivery_notes', 'estimated_cost', 'estimated_completion',
|
||||
'employee_id', 'mileage_out', 'fuel_level', 'final_cost',
|
||||
'employee_id', 'mileage_in', 'mileage_out', 'fuel_level', 'final_cost',
|
||||
'delivery_method', 'courier_id', 'is_direct']
|
||||
sets = []
|
||||
vals = []
|
||||
|
||||
Reference in New Issue
Block a user