Skip to content

Commit

Permalink
feat: added versions to screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Herrmann committed Sep 18, 2024
1 parent 0d75a9b commit 9106529
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions app/packs/src/apps/mydb/elements/details/screens/ScreenDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import CommentActions from 'src/stores/alt/actions/CommentActions';
import CommentModal from 'src/components/common/CommentModal';
import { commentActivation } from 'src/utilities/CommentHelper';
import { formatTimeStampsOfElement } from 'src/utilities/timezoneHelper';
// eslint-disable-next-line import/no-named-as-default
import VersionsTable from 'src/apps/mydb/elements/details/VersionsTable';

export default class ScreenDetails extends Component {
constructor(props) {
Expand Down Expand Up @@ -385,7 +387,22 @@ export default class ScreenDetails extends Component {
saveResearchPlan={(researchPlan) => this.saveResearchPlan(researchPlan)}
/>
</Tab>
)
),
versions: (
<Tab
eventKey="versioning"
title="Versions"
key={`Versions_Reaction_${screen.id.toString()}`}
>
<VersionsTable
type="screens"
id={screen.id}
element={screen}
parent={this}
isEdited={screen.isEdited}
/>
</Tab>
),
};

const tabTitlesMap = {
Expand Down Expand Up @@ -435,7 +452,13 @@ export default class ScreenDetails extends Component {
tabTitles={tabTitlesMap}
onTabPositionChanged={this.onTabPositionChanged}
/>
<Tabs activeKey={activeTab} onSelect={(key) => this.handleSelect(key)} id="screen-detail-tab">
<Tabs
mountOnEnter
unmountOnExit
activeKey={activeTab}
onSelect={(key) => this.handleSelect(key)}
id="screen-detail-tab"
>
{tabContents}
</Tabs>
<ButtonToolbar>
Expand Down

0 comments on commit 9106529

Please sign in to comment.