From bb1f5d0ade10e2ad36185fa06171b956d458fb60 Mon Sep 17 00:00:00 2001 From: LautaroCesso <59095036+LautaroCesso@users.noreply.github.com> Date: Fri, 13 Nov 2020 14:41:59 -0300 Subject: [PATCH] Fix bug with departments info in staff editor component (#931) --- client/src/app/admin/panel/staff/staff-editor.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/app/admin/panel/staff/staff-editor.js b/client/src/app/admin/panel/staff/staff-editor.js index ffd67351..3cc0cfa5 100644 --- a/client/src/app/admin/panel/staff/staff-editor.js +++ b/client/src/app/admin/panel/staff/staff-editor.js @@ -219,11 +219,13 @@ class StaffEditor extends React.Component { ); } - renderDepartmentsInfo() { + const { departments } = this.state; + const departmentsAssigned = this.getDepartments().filter((_department, index) => departments.includes(index)) + return ( -
- this.state.departments.includes(index))}} /> + index)}}> + ); }