modified detail view

added tenant querybyid and modified the index to pass in the id to the
detail view.