mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
Add query string parameter to search by recipient
> Service teams that use the admin interface often need to know the > outcome of a message... at the moment they have to page through all > the results in the activity stream. They should be able to find > notifications by email address or phone number. – https://www.pivotaltracker.com/n/projects/1443052 This commit adds an additional query string parameter (`to`) to the URL, which users can use to filter down the list of notifications. It: - takes the status into account - doesn’t update the counts based on the search term (in reality each service will only send a handful of notifications to one person in any 7 day period) In other words the funnel that filters down the notifications looks like: > all notifications for service → only failed → only to this phone > number
This commit is contained in:
@@ -198,7 +198,8 @@ def view_notifications(service_id, message_type):
|
||||
partials=get_notifications(service_id, message_type),
|
||||
message_type=message_type,
|
||||
status=request.args.get('status'),
|
||||
page=request.args.get('page', 1)
|
||||
page=request.args.get('page', 1),
|
||||
to=request.args.get('to'),
|
||||
)
|
||||
|
||||
|
||||
@@ -241,7 +242,9 @@ def get_notifications(service_id, message_type, status_override=None):
|
||||
page=page,
|
||||
template_type=[message_type],
|
||||
status=filter_args.get('status'),
|
||||
limit_days=current_app.config['ACTIVITY_STATS_LIMIT_DAYS'])
|
||||
limit_days=current_app.config['ACTIVITY_STATS_LIMIT_DAYS'],
|
||||
to=request.args.get('to'),
|
||||
)
|
||||
|
||||
url_args = {
|
||||
'message_type': message_type,
|
||||
|
||||
Reference in New Issue
Block a user