diff --git a/products/ASC.People/Client/src/components/pages/Profile/Section/Body/index.js b/products/ASC.People/Client/src/components/pages/Profile/Section/Body/index.js index adb7112829..e438131df9 100644 --- a/products/ASC.People/Client/src/components/pages/Profile/Section/Body/index.js +++ b/products/ASC.People/Client/src/components/pages/Profile/Section/Body/index.js @@ -109,7 +109,7 @@ const getFormattedDepartments = departments => { const formattedDepartments = splittedDepartments.map((department, index) => { return ( - + {department.trim()} {departmentsLength !== index ? ", " : ""} @@ -142,8 +142,8 @@ const createContacts = contacts => { }; const SectionBodyContent = props => { - const { profile, history, isSelf, settings, isAdmin, viewer } = props; - //console.log(profile, settings); + const { profile, history, settings, isAdmin, viewer } = props; + //console.log(props); const contacts = profile.contacts && getUserContacts(profile.contacts); const role = getUserRole(profile); const workFrom = getFormattedDate(profile.workFrom); @@ -152,6 +152,7 @@ const SectionBodyContent = props => { const formatedDepartments = getFormattedDepartments(profile.department); const socialContacts = contacts && createContacts(contacts.social); const infoContacts = contacts && createContacts(contacts.contact); + const isSelf = isMe(viewer, profile.userName); const onEmailClick = useCallback( () => window.open("mailto:" + profile.email), @@ -184,7 +185,7 @@ const SectionBodyContent = props => { source={profile.avatarMax} userName={profile.displayName} /> - {(isAdmin || isMe(viewer, profile.userName)) && ( + {(isAdmin || isSelf) && (