diff --git a/frontend/src/components/IndividualModel/GoodnessFit.js b/frontend/src/components/IndividualModel/GoodnessFit.js
index 38f4ea4e..2668df33 100644
--- a/frontend/src/components/IndividualModel/GoodnessFit.js
+++ b/frontend/src/components/IndividualModel/GoodnessFit.js
@@ -159,12 +159,11 @@ class GoodnessFit extends Component {
render() {
const {store} = this.props,
settings = store.modalModel.settings,
- // if modalDataset, means MT then do other table?
- // is there a better way to detect MT?
- dataset = store.modalDataset ? store.modalDataset : store.selectedDataset,
+ // MT has a different Dataset & dtype
+ dataset = store.isMultiTumor ? store.modalDataset : store.selectedDataset,
{dtype} = dataset;
let data;
- if (store.modalDataset) {
+ if (store.isMultiTumor) {
data = this.getMultitumorData(dtype, settings);
} else {
if (dtype == Dtype.DICHOTOMOUS) {
diff --git a/frontend/src/components/IndividualModel/InfoTable.js b/frontend/src/components/IndividualModel/InfoTable.js
index f6b12af4..0ee95b1c 100644
--- a/frontend/src/components/IndividualModel/InfoTable.js
+++ b/frontend/src/components/IndividualModel/InfoTable.js
@@ -3,19 +3,31 @@ import PropTypes from "prop-types";
import React, {Component} from "react";
import TwoColumnTable from "@/components/common/TwoColumnTable";
-
+import {getNameFromDegrees} from "@/constants/modelConstants";
@inject("outputStore")
@observer
class InfoTable extends Component {
render() {
const {outputStore} = this.props,
model = outputStore.modalModel,
- dataset = outputStore.selectedDataset,
+ // MT has a different Dataset
+ dataset = outputStore.isMultitumor
+ ? outputStore.modalDataset
+ : outputStore.selectedDataset;
+ let data;
+ if (outputStore.isMultitumor) {
+ data = [
+ ["Dataset", dataset.metadata.name],
+ ["Model", getNameFromDegrees(model)],
+ ["Equation", "P[dose] = g + (1 - g) * (1 - exp(-b1 * dose^1 - b2 * dose^2 - ...))"],
+ ];
+ } else {
data = [
["Dataset", dataset.metadata.name],
["Model", model.name],
["Equation", model.model_class.model_form_str],
];
+ }
return ;
}
}
diff --git a/frontend/src/components/Output/Multitumor/InfoTable.js b/frontend/src/components/Output/Multitumor/InfoTable.js
deleted file mode 100644
index 2e205aad..00000000
--- a/frontend/src/components/Output/Multitumor/InfoTable.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import {inject, observer} from "mobx-react";
-import PropTypes from "prop-types";
-import React, {Component} from "react";
-
-import TwoColumnTable from "@/components/common/TwoColumnTable";
-import {getNameFromDegrees} from "@/constants/modelConstants";
-
-@inject("outputStore")
-@observer
-class InfoTable extends Component {
- render() {
- const {outputStore} = this.props,
- model = outputStore.modalModel,
- dataset = outputStore.modalDataset,
- data = [
- ["Dataset", dataset.metadata.name],
- ["Model", getNameFromDegrees(model)],
- ["Equation", "P[dose] = g + (1 - g) * (1 - exp(-b1 * dose^1 - b2 * dose^2 - ...))"],
- ];
- return ;
- }
-}
-InfoTable.propTypes = {
- outputStore: PropTypes.object,
-};
-export default InfoTable;
diff --git a/frontend/src/components/Output/Multitumor/ModalBody.js b/frontend/src/components/Output/Multitumor/ModalBody.js
index 3b2d2bed..a09db52f 100644
--- a/frontend/src/components/Output/Multitumor/ModalBody.js
+++ b/frontend/src/components/Output/Multitumor/ModalBody.js
@@ -5,9 +5,9 @@ import {Col, Modal, Row} from "react-bootstrap";
import DoseResponsePlot from "../../common/DoseResponsePlot";
import GoodnessFit from "../../IndividualModel/GoodnessFit";
+import InfoTable from "../../IndividualModel/InfoTable";
import ModelParameters from "../../IndividualModel/ModelParameters";
import AnalysisOfDeviance from "./AnalysisOfDeviance";
-import InfoTable from "./InfoTable";
import ModelOptions from "./ModelOptions";
import {MsComboInfo, MsComboSummary} from "./MsCombo";
import MultitumorPlot from "./MultitumorPlot";