show message for no match
This commit is contained in:
parent
b6edc6c913
commit
d0e4f2188f
3 changed files with 13 additions and 3 deletions
1
angular_app/js/app.js
vendored
1
angular_app/js/app.js
vendored
|
@ -17,6 +17,7 @@
|
||||||
/* Register our fantastic app. */
|
/* Register our fantastic app. */
|
||||||
var eventManApp = angular.module('eventManApp', [
|
var eventManApp = angular.module('eventManApp', [
|
||||||
'ngRoute',
|
'ngRoute',
|
||||||
|
'ngAnimate',
|
||||||
'eventManServices',
|
'eventManServices',
|
||||||
'eventManControllers',
|
'eventManControllers',
|
||||||
'ui.bootstrap',
|
'ui.bootstrap',
|
||||||
|
|
|
@ -816,10 +816,14 @@ class EventsHandler(CollectionHandler):
|
||||||
self.send_ws_message('event/%s/tickets/updates' % id_, json.dumps(ret))
|
self.send_ws_message('event/%s/tickets/updates' % id_, json.dumps(ret))
|
||||||
self.set_status(400)
|
self.set_status(400)
|
||||||
return ret
|
return ret
|
||||||
elif nr_matches == 1:
|
elif nr_matches == 0:
|
||||||
old_ticket_data = matching_tickets[0]
|
ret = {'error': True, 'message': 'no ticket matched', 'query': query,
|
||||||
|
'uuid': uuid, 'username': self.current_user_info.get('username', '')}
|
||||||
|
self.send_ws_message('event/%s/tickets/updates' % id_, json.dumps(ret))
|
||||||
|
self.set_status(400)
|
||||||
|
return ret
|
||||||
else:
|
else:
|
||||||
old_ticket_data = {}
|
old_ticket_data = matching_tickets[0]
|
||||||
|
|
||||||
# We have changed the "cancelled" status of a ticket to False; check if we still have a ticket available
|
# We have changed the "cancelled" status of a ticket to False; check if we still have a ticket available
|
||||||
if 'number_of_tickets' in current_event and old_ticket_data.get('cancelled') and not data.get('cancelled'):
|
if 'number_of_tickets' in current_event and old_ticket_data.get('cancelled') and not data.get('cancelled'):
|
||||||
|
|
|
@ -103,3 +103,8 @@ input[type=text].form-control, input[type=search].form-control {
|
||||||
#toast-container.toast-bottom-center>div, #toast-container.toast-center>div, #toast-container.toast-top-center>div {
|
#toast-container.toast-bottom-center>div, #toast-container.toast-center>div, #toast-container.toast-top-center>div {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:not(.no-enter)#toast-container > div.ng-enter
|
||||||
|
{
|
||||||
|
transition-duration: .1s;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue