Merge pull request #247 from ONLYOFFICE/bugfix/fixed-incorrect-date

Web: People: fixed incorrect user date of birth
This commit is contained in:
Ilya Oleshko 2021-05-11 14:00:31 +03:00 committed by GitHub
commit a89cace9b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,17 +285,25 @@ class CreateUserForm extends React.Component {
handleSubmit = () => {
if (!this.validate()) return false;
const { setIsEditingForm, homepage } = this.props;
const {
setIsEditingForm,
homepage,
createProfile,
createdAvatar,
t,
history,
} = this.props;
const profile = this.state.profile;
if (!profile.birthday) profile.birthday = new Date();
this.setState({ isLoading: true });
this.props
.createProfile(this.state.profile)
createProfile(profile)
.then((profile) => {
if (this.props.createdAvatar.tmpFile !== "") {
if (createdAvatar.tmpFile !== "") {
this.createAvatar(profile.id, profile.userName);
} else {
toastr.success(this.props.t("ChangesSavedSuccessfully"));
this.props.history.push(
toastr.success(t("ChangesSavedSuccessfully"));
history.push(
combineUrl(
AppServerConfig.proxyURL,
homepage,