Bring in default autocomplete views for customers

This commit is contained in:
Lance Edgar 2020-08-02 21:29:14 -05:00
parent 69585ad15d
commit fdb63fc2d1

View file

@ -81,4 +81,14 @@ class CustomerView(base.CustomersView):
def includeme(config): def includeme(config):
# autocomplete
# TODO: ugh
config.add_route('customers.autocomplete', '/customers/autocomplete')
config.add_view(base.CustomerNameAutocomplete, route_name='customers.autocomplete',
renderer='json', permission='customers.list')
config.add_route('customers.autocomplete.phone', '/customers/autocomplete/phone')
config.add_view(base.CustomerPhoneAutocomplete, route_name='customers.autocomplete.phone',
renderer='json', permission='customers.list')
CustomerView.defaults(config) CustomerView.defaults(config)