Closed anselmbradford closed 9 years ago
Looks like this is coming up because http://ohana-api-demo.herokuapp.com/api/organizations/8/locations has categories listed in its services, which aren't displayed in https://github.com/codeforamerica/ohana-web-search/blob/master/app/views/component/organizations/detail/_body.html.haml#L175, but still make the services header show up because the services exist.
@monfresh any suggestion on the best way to check if the services exist, but just for the fields we want in https://github.com/codeforamerica/ohana-web-search/blob/master/app/views/component/organizations/detail/_body.html.haml#L175-L188?
The root of the issue is that none of the service attributes are required, so you can end up with a service like the one above. I would think that a few attributes should actually be required, such as the name at least. I would open an issue on OpenReferral for this.
I don't think it's the client's business to have to come up with complex logic just to be able to show or hide a header.
@monfresh Can this issue be closed? It looks like there are required fields for services now (e.g. the Name).
:ok_hand:
See http://ohana-web-search-demo.herokuapp.com/organizations/admin-test-org/admin-test-location?keyword=&service_area=&utf8=%E2%9C%93
The "Services" header shouldn't show when there are no services listed.