diff --git a/products/ASC.People/Client/src/components/pages/Profile/index.js b/products/ASC.People/Client/src/components/pages/Profile/index.js index a5fa01a523..eb9fac8ca1 100644 --- a/products/ASC.People/Client/src/components/pages/Profile/index.js +++ b/products/ASC.People/Client/src/components/pages/Profile/index.js @@ -30,10 +30,6 @@ class Profile extends React.Component { } } - componentWillUnmount() { - this.props.resetProfile(); - } - render() { console.log("Profile render") diff --git a/products/ASC.People/Client/src/components/pages/ProfileAction/Section/Body/Form/userForm.js b/products/ASC.People/Client/src/components/pages/ProfileAction/Section/Body/Form/userForm.js deleted file mode 100644 index ee0d289b39..0000000000 --- a/products/ASC.People/Client/src/components/pages/ProfileAction/Section/Body/Form/userForm.js +++ /dev/null @@ -1,394 +0,0 @@ -import React, { useCallback } from 'react' -import { withRouter } from 'react-router' -import { connect } from 'react-redux' -import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form' -import { device, Avatar, Button, TextInput, Textarea, DateInput, Label, RadioButton, Text, toastr, SelectedItem } from 'asc-web-components' -import styled from 'styled-components'; -import { useTranslation } from 'react-i18next'; -import { createProfile, updateProfile } from '../../../../../../store/profile/actions'; - -const formName = "userForm"; - -const getUserRole = user => { - if(user.isOwner) return "owner"; - if(user.isAdmin) return "admin"; - if(user.isVisitor) return "guest"; - return "user"; -}; - -const onEditAvatar = () => {}; - -const MainContainer = styled.div` - display: flex; - flex-direction: row; - - @media ${device.tablet} { - flex-direction: column; - } -`; - -const AvatarContainer = styled.div` - margin: 0 32px 32px 0; - width: 160px; -`; - -const MainFieldsContainer = styled.div` - flex-grow: 1; -`; - -const FieldContainer = styled.div` - display: flex; - flex-direction: row; - margin: 0 0 16px 0; - - .field-label { - line-height: 32px; - margin: 0; - width: 110px; - } - - .field-input { - width: 320px; - } - - .radio-group { - line-height: 32px; - display: flex; - - label:not(:first-child) { - margin-left: 33px; - } - } - - @media ${device.tablet} { - flex-direction: column; - align-items: start; - - .field-label { - line-height: unset; - margin: 0 0 4px 0; - width: auto; - flex-grow: 1; - } - } -`; - -const FieldBody = styled.div` - flex-grow: 1; -`; - -const RadioGroupFieldBody = styled(FieldBody).attrs({ - className: "radio-group" -})``; - -const renderTextField = ({ input, label, isRequired, meta: { touched, error } }) => ( - - -); - -const renderPasswordField = ({ input, isDisabled }) => ( - -); - -const renderDateField = ({ input, label, isRequired, meta: { touched, error } }) => ( - - -); - -const renderRadioField = ({ input, label, isChecked }) => ( - -); - -const renderDepartmentField = ({ input, onClick }) => ( - -); - -const renderDepartmentsField = ({ fields, label }) => { - return ( - - - ) -}; - -const renderTextareaField = ({ input }) => ( -