Supplier dashboard fixes
This commit is contained in:
@@ -15,4 +15,4 @@ Qsupplier.App.List = DS.Model.extend
|
||||
@get('orders').forEach (order)->
|
||||
order.close()
|
||||
@set('table', null)
|
||||
@list.set('state', 'closed')
|
||||
@set('state', 'closed')
|
||||
|
||||
@@ -21,7 +21,7 @@ DS.Model.reopenClass
|
||||
relation = relation[0]
|
||||
if relation.kind == 'belongsTo' and attributes["#{relation.name}_id"]
|
||||
attributes[relation.name] = model.find(attributes["#{relation.name}_id"])
|
||||
delete attributes["#{relation.name}_id"]
|
||||
#delete attributes["#{relation.name}_id"]
|
||||
|
||||
#store.push @, attributes
|
||||
@createRecord attributes
|
||||
|
||||
+1
-1
@@ -281,7 +281,7 @@ class List
|
||||
broadcast_user user_id, 'new_order', order: order.with_products_as_json, total_amount: price
|
||||
end
|
||||
broadcast_supplier supplier.id, 'list_update', active_model_serializer.new(self).as_json
|
||||
broadcast_supplier supplier.id, 'new_order', order: order.with_products_as_json
|
||||
broadcast_supplier supplier.id, 'new_order', OrderSerializer.new(order)
|
||||
order
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user