Skip to content

Commit

Permalink
[#259] Remove range field
Browse files Browse the repository at this point in the history
  • Loading branch information
wayangalihpratama committed Jan 24, 2024
1 parent 2b6de1b commit 1ea32be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion backend/models/reference_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class ReferenceData(Base):
type_cost_of_production = Column(String, nullable=True)
type_diversified_income = Column(String, nullable=True)

created_by = Column(Integer, ForeignKey("user.id"))
created_by = Column(Integer, ForeignKey("user.id"), nullable=True)
created_at = Column(DateTime, nullable=False, server_default=func.now())
updated_at = Column(
DateTime,
Expand Down
23 changes: 12 additions & 11 deletions frontend/src/pages/explore-studies/ReferenceDataForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ const confidenceLevelOptions = [
{ label: "Undefined", value: "Undefined" },
];

const rangeOptions = [
{ label: "Low value", value: "Low value" },
{ label: "Median value", value: "Median value" },
{
label: "High value",
value: "High value",
},
];
// const rangeOptions = [
// { label: "Low value", value: "Low value" },
// { label: "Median value", value: "Median value" },
// {
// label: "High value",
// value: "High value",
// },
// ];

const typeOptions = [
{ label: "Mean", value: "Mean" },
Expand Down Expand Up @@ -119,6 +119,7 @@ const ReferenceDataForm = ({
const payload = {
...values,
currency: "",
range: null,
};
onSave({
payload: payload,
Expand Down Expand Up @@ -301,7 +302,7 @@ const ReferenceDataForm = ({
<Col span={24}>
<Card title="Details about the data">
<Row gutter={[16, 16]}>
<Col span={12}>
<Col span={24}>
<Form.Item
label={
<LabelWithTooltip
Expand All @@ -317,7 +318,7 @@ const ReferenceDataForm = ({
/>
</Form.Item>
</Col>
<Col span={12}>
{/* <Col span={12}>
<Form.Item
label={
<LabelWithTooltip
Expand All @@ -329,7 +330,7 @@ const ReferenceDataForm = ({
>
<Select {...selectProps} options={rangeOptions} />
</Form.Item>
</Col>
</Col> */}
{/* <Col span={8}>
<Form.Item label="Type" name="type">
<Select {...selectProps} options={typeOptions} />
Expand Down

0 comments on commit 1ea32be

Please # to comment.