mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
WIP find services by name
This commit is contained in:
@@ -23,6 +23,7 @@ from app.main.forms import (
|
|||||||
PDFUploadForm,
|
PDFUploadForm,
|
||||||
RequiredDateFilterForm,
|
RequiredDateFilterForm,
|
||||||
ReturnedLettersForm,
|
ReturnedLettersForm,
|
||||||
|
SearchByNameForm,
|
||||||
)
|
)
|
||||||
from app.statistics_utils import (
|
from app.statistics_utils import (
|
||||||
get_formatted_percentage,
|
get_formatted_percentage,
|
||||||
@@ -189,6 +190,23 @@ def platform_admin_services():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/find-services-by-name", methods=['GET', 'POST'])
|
||||||
|
@user_is_platform_admin
|
||||||
|
def find_services_by_name():
|
||||||
|
form = SearchByNameForm()
|
||||||
|
services_found = None
|
||||||
|
status = 200
|
||||||
|
if form.validate_on_submit():
|
||||||
|
services_found = service_api_client.get_service({"name": form.search.data})['data']
|
||||||
|
elif request.method == 'POST':
|
||||||
|
status = 400
|
||||||
|
return render_template(
|
||||||
|
'views/find-services/find-services-by-name.html',
|
||||||
|
form=form,
|
||||||
|
services_found=services_found
|
||||||
|
), status
|
||||||
|
|
||||||
|
|
||||||
@main.route("/platform-admin/reports")
|
@main.route("/platform-admin/reports")
|
||||||
@user_is_platform_admin
|
@user_is_platform_admin
|
||||||
def platform_admin_reports():
|
def platform_admin_reports():
|
||||||
|
|||||||
Reference in New Issue
Block a user