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 2d0258e92a..5e5ecb8685 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 @@ -16,6 +16,11 @@ const avatarWrapper = { marginBottom: "24px" }; +const editButtonWrapper = { + marginTop: "16px", + width: "160px" +}; + const infoWrapper = { display: "inline-flex", marginBottom: "24px" @@ -44,6 +49,41 @@ const notesWrapper = { width: "100%" }; +const marginTop24 = { + marginTop: "24px" +}; + +const marginTop22 = { + marginTop: "22px" +}; + +const marginTop10 = { + marginTop: "10px" +}; + +const marginLeft18 = { + marginLeft: "18px" +}; + +const selfToggleWrapper = { + width: "100%", + marginBottom: "24px" +} + +const contactsToggleWrapper = { + width: "100%", + marginTop: "24px" +}; + +const notesToggleWrapper = { + width: "100%" +}; + +const contactWrapper = { + display: "inline-flex", + width: "300px" +}; + let socialProfiles = [ { type: "facebook", value: "", icon: "ShareFacebookIcon" }, { type: "livejournal", value: "", icon: "LivejournalIcon" }, @@ -90,9 +130,9 @@ const getFormattedContacts = (profile) => { }; const getFormattedDepartments = (departments) => { - let splittedDepartments = departments.split(','); + const splittedDepartments = departments.split(','); const departmentsLength = splittedDepartments.length - 1; - return splittedDepartments.map((department, index) => { + const formattedDepartments = splittedDepartments.map((department, index) => { return ( @@ -102,6 +142,8 @@ const getFormattedDepartments = (departments) => { ) }); + + return formattedDepartments; }; const sendMail = (email) => { @@ -114,24 +156,24 @@ const capitalizeFirstLetter = (string) => { }; const createContacts = (contacts) => { - return contacts.map((contact, index) => { + const completeContacts = contacts.map((contact, index) => { if (contact.value) return ( -
+
{ }} />
{contact.value}
); - }) + }); + + return completeContacts; }; const SectionBodyContent = (props) => { - const { profile, history, isSelf, settings} = props; + const { profile, history, isSelf, settings } = props; getFormattedContacts(profile); - console.log(props); - return (
@@ -141,7 +183,7 @@ const SectionBodyContent = (props) => { source={profile.avatarMax} userName={profile.displayName} /> -
@@ -155,7 +197,7 @@ const SectionBodyContent = (props) => { {profile.birthday && Date of birth:} {profile.location && Location:} {isSelf && Language:} - {isSelf && Affiliate status:} + {isSelf && Affiliate status:}
{profile.isVisitor ? "Guest" : "Employee"} @@ -168,24 +210,24 @@ const SectionBodyContent = (props) => { {getFormattedDate(profile.birthday)} {profile.location} {isSelf && {profile.cultureName}} - {isSelf &&
{isSelf && -
+
Two-factor authentication via code generating application was enabled for all users by cloud service administrator. -
+
{'Reset application'} - {'Show backup codes'} + {'Show backup codes'}
} {isSelf && -
+
} {profile.notes && -
+
{profile.notes} @@ -203,7 +245,7 @@ const SectionBodyContent = (props) => {
} {profile.contacts && -
+
{createContacts(userContacts)} @@ -212,7 +254,7 @@ const SectionBodyContent = (props) => {
} {profile.contacts && -
+
{createContacts(userSocialProfiles)}