update order page udpates
This commit is contained in:
@@ -22,6 +22,12 @@ lunchControllers.controller 'UpdateOrderCtrl', ['$scope','socket','$routeParams'
|
||||
$scope.invitees = allResponse
|
||||
$scope.$apply()
|
||||
|
||||
socket.on 'message', (m) ->
|
||||
if m.verb is 'update' and m.data.run_id is $scope.run.id
|
||||
invitee = _.findWhere $scope.invitees, run_id: m.data.run_id
|
||||
_.extend invitee, m.data
|
||||
$scope.$apply()
|
||||
|
||||
$scope.submit = (invitee) ->
|
||||
socket.put '/invitee/' + $routeParams['inviteeId'], { order: invitee.order }, (response) ->
|
||||
$location.path '/run/' + $scope.run.id
|
||||
|
||||
Reference in New Issue
Block a user