Web: People: fixed access to editing the profile for the user, fixed the registration date

This commit is contained in:
Nikita Gopienko 2020-12-22 14:55:35 +03:00
parent 30656f4256
commit 50b45b785a
2 changed files with 3 additions and 3 deletions

View File

@ -586,7 +586,7 @@ class CreateUserForm extends React.Component {
inputOnChange={this.onWorkFromDateChange}
inputTabIndex={6}
calendarMinDate={
profile.birthday ? new Date(profile.birthday) : new Date()
profile.birthday ? new Date(profile.birthday) : undefined
}
/>
<TextField

View File

@ -790,7 +790,7 @@ class UpdateUserForm extends React.Component {
inputValue={
profile.workFrom ? new Date(profile.workFrom) : undefined
}
inputIsDisabled={isLoading}
inputIsDisabled={isLoading || !isAdmin}
inputOnChange={this.onWorkFromDateChange}
inputTabIndex={7}
calendarMinDate={
@ -809,7 +809,7 @@ class UpdateUserForm extends React.Component {
labelText={`${userPostCaption}:`}
inputName="title"
inputValue={profile.title}
inputIsDisabled={isLoading}
inputIsDisabled={isLoading || !isAdmin}
inputOnChange={this.onInputChange}
inputTabIndex={9}
/>