Web: Client: added opening additional information in the account

This commit is contained in:
DmitrySychugov 2023-06-14 19:17:42 +05:00
parent 99d8a86ce1
commit 59a211c1c9
3 changed files with 9 additions and 3 deletions

View File

@ -75,7 +75,7 @@ class PureVersionHistoryPanel extends React.Component {
</StyledHeaderContent> </StyledHeaderContent>
<StyledBody className="version-history-panel-body"> <StyledBody className="version-history-panel-body">
<SectionBodyContent /> <SectionBodyContent onClose={this.onClose} />
</StyledBody> </StyledBody>
{showProgressBar && ( {showProgressBar && (
<FloatingButton <FloatingButton

View File

@ -48,6 +48,8 @@ const VersionRow = (props) => {
theme, theme,
canChangeVersionFileHistory, canChangeVersionFileHistory,
openUser, openUser,
onClose,
setIsVisible,
} = props; } = props;
const [showEditPanel, setShowEditPanel] = useState(false); const [showEditPanel, setShowEditPanel] = useState(false);
const [commentValue, setCommentValue] = useState(info.comment); const [commentValue, setCommentValue] = useState(info.comment);
@ -73,6 +75,8 @@ const VersionRow = (props) => {
}; };
const onUserClick = () => { const onUserClick = () => {
onClose(true);
setIsVisible(true);
openUser(info?.updatedBy, history); openUser(info?.updatedBy, history);
}; };
@ -263,7 +267,7 @@ const VersionRow = (props) => {
export default inject(({ auth, versionHistoryStore, selectedFolderStore }) => { export default inject(({ auth, versionHistoryStore, selectedFolderStore }) => {
const { user } = auth.userStore; const { user } = auth.userStore;
const { openUser } = auth.infoPanelStore; const { openUser, setIsVisible } = auth.infoPanelStore;
const { culture, isTabletView } = auth.settingsStore; const { culture, isTabletView } = auth.settingsStore;
const language = (user && user.cultureName) || culture || "en"; const language = (user && user.cultureName) || culture || "en";
@ -289,6 +293,7 @@ export default inject(({ auth, versionHistoryStore, selectedFolderStore }) => {
isEditing: isEdit, isEditing: isEdit,
canChangeVersionFileHistory, canChangeVersionFileHistory,
openUser, openUser,
setIsVisible,
}; };
})( })(
withRouter( withRouter(

View File

@ -74,7 +74,7 @@ class SectionBodyContent extends React.Component {
}; };
renderRow = memo(({ index, style }) => { renderRow = memo(({ index, style }) => {
const { versions, culture } = this.props; const { versions, culture, onClose } = this.props;
const prevVersion = versions[index > 0 ? index - 1 : index].versionGroup; const prevVersion = versions[index > 0 ? index - 1 : index].versionGroup;
let isVersion = true; let isVersion = true;
@ -85,6 +85,7 @@ class SectionBodyContent extends React.Component {
return ( return (
<div style={style}> <div style={style}>
<VersionRow <VersionRow
onClose={onClose}
getFileVersions={this.getFileVersions} getFileVersions={this.getFileVersions}
isVersion={isVersion} isVersion={isVersion}
key={`${versions[index].id}-${index}`} key={`${versions[index].id}-${index}`}