codeforpdx / dwellingly-app

Application for property managers to communicate with social workers
48 stars 28 forks source link

Unable to view an AdminStaffMember #825

Closed NickSchimek closed 2 years ago

NickSchimek commented 2 years ago

Describe the bug

Unable to view StaffMember when StaffMember being viewed is an admin

To Reproduce

  1. Go to JoinStaff
  2. Click on StaffMember that is an admin

Expected behavior I should see the staff member

The root cause of the issue is that Admins will not be assigned tenants, and so we do not send back a tenants list for an admin. The code in TenantList should not be rendered when the staff member is an admin.

https://github.com/codeforpdx/dwellingly-app/blob/83ecddfed4eec99ed29eca69d83ba6d4c19b12d6/app/javascript/components/src/views/EditStaff/index.jsx#L142-L150