mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
remove browsableitem
it was only used by the choose service page, and then only in kludgy ways (eg: creating a list containing one item called "add service"), so lets rip it out and make this page bespoke. Especially now that it's changed so much.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
from flask import url_for
|
||||
|
||||
from app.notify_client import NotifyAdminAPIClient, _attach_current_user
|
||||
from app.notify_client.service_api_client import ServicesBrowsableItem
|
||||
|
||||
|
||||
class OrganisationsClient(NotifyAdminAPIClient):
|
||||
@@ -54,12 +51,3 @@ class OrganisationsClient(NotifyAdminAPIClient):
|
||||
url="/organisations/unique",
|
||||
params={"org_id": org_id, "name": name}
|
||||
)["result"]
|
||||
|
||||
class OrganisationBrowsableItem(ServicesBrowsableItem):
|
||||
def __init__(self, organisation):
|
||||
self.services = [ServicesBrowsableItem(x) for x in organisation['services']]
|
||||
super().__init__(organisation)
|
||||
|
||||
@property
|
||||
def link(self):
|
||||
return url_for('main.organisation_dashboard', org_id=self._item['id'])
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from flask import url_for
|
||||
|
||||
from app.notify_client import NotifyAdminAPIClient, _attach_current_user
|
||||
from app.utils import BrowsableItem
|
||||
|
||||
|
||||
class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
@@ -426,21 +423,3 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
"updated_by_id": user_id
|
||||
}
|
||||
return self.post("/service/{}/delivery-receipt-api".format(service_id), data)
|
||||
|
||||
|
||||
class ServicesBrowsableItem(BrowsableItem):
|
||||
@property
|
||||
def title(self):
|
||||
return self._item['name']
|
||||
|
||||
@property
|
||||
def link(self):
|
||||
return url_for('main.service_dashboard', service_id=self._item['id'])
|
||||
|
||||
@property
|
||||
def destructive(self):
|
||||
return False
|
||||
|
||||
@property
|
||||
def hint(self):
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user