Skip to content

Commit

Permalink
rebase fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Herrmann committed Oct 22, 2024
1 parent 2e8dfe7 commit afdcee9
Showing 1 changed file with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import Aviator from 'aviator';
import PropTypes from 'prop-types';
import {
Panel, ListGroupItem, ButtonToolbar, Button,
Expand Down Expand Up @@ -50,6 +51,30 @@ import { ShowUserLabels } from 'src/components/UserLabels';
// eslint-disable-next-line import/no-named-as-default
import VersionsTable from 'src/apps/mydb/elements/details/VersionsTable';

const handleProductClick = (product) => {
const uri = Aviator.getCurrentURI();
const uriArray = uri.split(/\//);
Aviator.navigate(`/${uriArray[1]}/${uriArray[2]}/sample/${product.id}`, { silent: true });
sampleShowOrNew({ params: { sampleID: product.id } });
};

const productLink = (product) => (
<span>
Analysis: &nbsp;
<span
aria-hidden="true"
className="pseudo-link"
onClick={() => handleProductClick(product)}
style={{ cursor: 'pointer' }}
title="Open sample window"
>
<i className="icon-sample" />
&nbsp;
{product.title()}
</span>
</span>
);

export default class ReactionDetails extends Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -196,13 +221,6 @@ export default class ReactionDetails extends Component {
this.handleReactionChange(newReaction, options);
}

handleProductClick(product) {
const uri = Aviator.getCurrentURI();
const uriArray = uri.split(/\//);
Aviator.navigate(`/${uriArray[1]}/${uriArray[2]}/sample/${product.id}`, { silent: true });
sampleShowOrNew({ params: { sampleID: product.id } });
}

handleProductChange(product, cb) {
let { reaction } = this.state

Expand All @@ -212,23 +230,6 @@ export default class ReactionDetails extends Component {
this.setState({ reaction }, cb)
}

productLink(product) {
return (
<span>
Analysis:
&nbsp;
<span className="pseudo-link"
onClick={() => this.handleProductClick(product)}
style={{ cursor: 'pointer' }}
title="Open sample window">
<i className="icon-sample" />
&nbsp;
{product.title()}
</span>
</span>
)
}

handleSelect = (key) => {
UIActions.selectTab({ tabKey: key, type: 'reaction' });
this.setState({
Expand Down Expand Up @@ -522,7 +523,7 @@ export default class ReactionDetails extends Component {
}

render() {
const { reaction, visible, activeTab } = this.state;
const { reaction, visible, activeTab, sfn } = this.state;
this.updateReactionVesselSize(reaction);
const schemeTitle = reaction && activeTab === 'scheme' ? (
<div style={{ display: 'flex' }}>
Expand Down

0 comments on commit afdcee9

Please sign in to comment.