Create order page
This commit is contained in:
11
assets/linker/js/controllers/create-order-controller.coffee
Normal file
11
assets/linker/js/controllers/create-order-controller.coffee
Normal file
@@ -0,0 +1,11 @@
|
||||
lunchControllers = angular.module 'lunchControllers'
|
||||
|
||||
lunchControllers.controller 'CreateOrderCtrl', ['$scope','socket','$routeParams', ($scope, socket, $routeParams) ->
|
||||
$scope.show = false
|
||||
|
||||
socket.get '/run/' + $routeParams['id'],
|
||||
(response) ->
|
||||
$scope.show = true
|
||||
$scope.invitee = _.find response.invitees, (i) -> i.name.toLowerCase() == $routeParams['inviteeName']
|
||||
$scope.$apply()
|
||||
]
|
||||
@@ -3,11 +3,9 @@ lunchControllers = angular.module 'lunchControllers'
|
||||
lunchControllers.controller 'RunCtrl', ['$scope', 'socket', '$routeParams', ($scope, socket, $routeParams) ->
|
||||
$scope.show = false
|
||||
|
||||
socket.get '/run',
|
||||
where:
|
||||
id: $routeParams['id'],
|
||||
socket.get '/run/' + $routeParams['id'],
|
||||
(response) ->
|
||||
$scope.show = true
|
||||
$scope.run = response[0]
|
||||
$scope.run = response
|
||||
$scope.$apply()
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user