update order page udpates
This commit is contained in:
@@ -22,6 +22,12 @@ lunchControllers.controller 'UpdateOrderCtrl', ['$scope','socket','$routeParams'
|
|||||||
$scope.invitees = allResponse
|
$scope.invitees = allResponse
|
||||||
$scope.$apply()
|
$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) ->
|
$scope.submit = (invitee) ->
|
||||||
socket.put '/invitee/' + $routeParams['inviteeId'], { order: invitee.order }, (response) ->
|
socket.put '/invitee/' + $routeParams['inviteeId'], { order: invitee.order }, (response) ->
|
||||||
$location.path '/run/' + $scope.run.id
|
$location.path '/run/' + $scope.run.id
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.others-orders {
|
.others-orders {
|
||||||
.list-group-item {
|
.list-group-item {
|
||||||
border-width: 0 0 1px 0;
|
border-width: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,21 +18,22 @@ block interiorcontent
|
|||||||
div.form-group
|
div.form-group
|
||||||
textarea#order.form-control(ng-model='invitee.order',placeholder='Your order',rows=8)
|
textarea#order.form-control(ng-model='invitee.order',placeholder='Your order',rows=8)
|
||||||
|
|
||||||
button.btn.btn-lg.btn-primary.btn-block(ng-click='submit(invitee)') Submit Order
|
button.btn.btn-lg.btn-primary.btn-block(ng-click='submit(invitee)') Update Order
|
||||||
|
|
||||||
.col-xs-12.col-sm-6
|
.col-xs-12.col-sm-6
|
||||||
div.pod(ng-show='showMenuUrl')
|
|
||||||
h2
|
|
||||||
| Menu
|
|
||||||
a.btn.btn-sm.btn-default.pull-right(href='{{ run.menuUrl }}',target='_blank')
|
|
||||||
span.glyphicon.glyphicon-new-window
|
|
||||||
|
|
||||||
iframe(ng-src='{{ menuUrl }}',width='100%',height='400px')
|
|
||||||
|
|
||||||
div.pod.others-orders
|
div.pod.others-orders
|
||||||
h2 Other's orders
|
h2 Other's orders
|
||||||
ul.list-group(ng-repeat='i in invitees')
|
ul.list-group(ng-repeat='i in invitees')
|
||||||
li.list-group-item
|
li.list-group-item
|
||||||
|
span.glyphicon.glyphicon-user
|
||||||
|
|
|
||||||
strong {{ i.name }}
|
strong {{ i.name }}
|
||||||
| : {{ i.order }}
|
| : {{ i.order }}
|
||||||
|
|
||||||
|
div(ng-show='showMenuUrl')
|
||||||
|
h2
|
||||||
|
| Menu
|
||||||
|
a.btn.btn-sm.btn-default.pull-right(href='{{ run.menuUrl }}',target='_blank')
|
||||||
|
span.glyphicon.glyphicon-new-window
|
||||||
|
|
||||||
|
iframe(ng-src='{{ menuUrl }}',width='100%',height='400px')
|
||||||
|
|||||||
Reference in New Issue
Block a user