Skip to content

Commit

Permalink
fix: PeriodDimension style
Browse files Browse the repository at this point in the history
  • Loading branch information
BRaimbault committed Nov 20, 2024
1 parent 06d6d71 commit 67ff60d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 34 deletions.
6 changes: 0 additions & 6 deletions src/components/edit/styles/LayerDialog.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@
margin: 8px 0 0 -8px;
}

/* Periods */

.periodDimension {
height: 410px
}

/* Tracked entity */

.teiCheckbox {
Expand Down
43 changes: 21 additions & 22 deletions src/components/edit/thematic/ThematicDialog.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import cx from 'classnames'
import { PeriodDimension } from '@dhis2/analytics'
import i18n from '@dhis2/d2-i18n'
import PropTypes from 'prop-types'
Expand Down Expand Up @@ -51,11 +50,6 @@ import DimensionFilter from '../../dimensions/DimensionFilter.js'
import IndicatorGroupSelect from '../../indicator/IndicatorGroupSelect.js'
import IndicatorSelect from '../../indicator/IndicatorSelect.js'
import OrgUnitSelect from '../../orgunits/OrgUnitSelect.js'
import PeriodSelect from '../../periods/PeriodSelect.js'
import PeriodTypeSelect from '../../periods/PeriodTypeSelect.js'
import RelativePeriodSelect from '../../periods/RelativePeriodSelect.js'
import RenderingStrategy from '../../periods/RenderingStrategy.js'
import StartEndDates from '../../periods/StartEndDates.js'
import ProgramIndicatorSelect from '../../program/ProgramIndicatorSelect.js'
import ProgramSelect from '../../program/ProgramSelect.js'
import Labels from '../shared/Labels.js'
Expand All @@ -77,8 +71,8 @@ class ThematicDialog extends Component {
setNoDataColor: PropTypes.func.isRequired,
setOperand: PropTypes.func.isRequired,
setOrgUnits: PropTypes.func.isRequired,
//setPeriodType: PropTypes.func.isRequired,
setPeriods: PropTypes.func.isRequired,
setPeriodType: PropTypes.func.isRequired,
setProgram: PropTypes.func.isRequired,
setRenderingStrategy: PropTypes.func.isRequired,
setValueType: PropTypes.func.isRequired,
Expand All @@ -88,15 +82,15 @@ class ThematicDialog extends Component {
dataElementGroup: PropTypes.object,
endDate: PropTypes.string,
filters: PropTypes.array,
id: PropTypes.string,
//id: PropTypes.string,
indicatorGroup: PropTypes.object,
legendSet: PropTypes.object,
method: PropTypes.number,
noDataColor: PropTypes.string,
operand: PropTypes.bool,
orgUnits: PropTypes.object,
periodType: PropTypes.string,
periodsSettings: PropTypes.object,
//periodsSettings: PropTypes.object,
program: PropTypes.object,
radiusHigh: PropTypes.number,
radiusLow: PropTypes.number,
Expand Down Expand Up @@ -126,6 +120,7 @@ class ThematicDialog extends Component {
setPeriods,
setOrgUnits,
} = this.props
console.log('🚀 ~ componentDidMount ~ this.props:', this.props)
console.log(
'🚀 ~ ThematicDialog ~ componentDidMount ~ filters:',
filters
Expand All @@ -141,6 +136,11 @@ class ThematicDialog extends Component {
const { keyAnalysisRelativePeriod: defaultPeriod, hiddenPeriods } =
systemSettings

console.log(
'🚀 ~ ThematicDialog ~ componentDidMount ~ systemSettings:',
systemSettings
)

// Set value type if favorite is loaded
if (!valueType) {
if (dataItem && dataItem.dimensionItemType) {
Expand Down Expand Up @@ -259,19 +259,19 @@ class ThematicDialog extends Component {
columns,
dataElementGroup,
filters,
id,
// id,
indicatorGroup,
noDataColor,
operand,
periodType,
renderingStrategy,
startDate,
endDate,
// renderingStrategy,
// startDate,
// endDate,
program,
valueType,
thematicMapType,
systemSettings,
periodsSettings,
// periodsSettings,
} = this.props
console.log('🚀 ~ ThematicDialog ~ render ~ filters:', filters)
console.log('🚀 ~ ThematicDialog ~ render ~ periodType:', periodType)
Expand All @@ -284,8 +284,8 @@ class ThematicDialog extends Component {
setNoDataColor,
setOperand,
setPeriods,
setPeriodType,
setRenderingStrategy,
// setPeriodType,
// setRenderingStrategy,
setProgram,
setValueType,
} = this.props
Expand All @@ -301,8 +301,8 @@ class ThematicDialog extends Component {
calculationError,
eventDataItemError,
programIndicatorError,
periodTypeError,
periodError,
// periodTypeError,
//periodError,
orgUnitsError,
legendSetError,
} = this.state
Expand Down Expand Up @@ -473,10 +473,7 @@ class ThematicDialog extends Component {
)}
{tab === 'period' && (
<div
className={cx(
styles.flexRowFlow,
styles.periodDimension
)}
className={styles.flexRowFlow}
data-test="thematicdialog-periodtab"
>
<PeriodDimension
Expand All @@ -485,6 +482,8 @@ class ThematicDialog extends Component {
excludedPeriodTypes={
systemSettings.hiddenPeriods
}
infoBoxMessage={'infoBoxMessage'}
height="410px"
/>
</div>
)}
Expand Down
11 changes: 5 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2018,18 +2018,17 @@
classnames "^2.3.1"
prop-types "^15.7.2"

"@dhis2/analytics@^26.8.4":
version "26.8.4"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.8.4.tgz#e26bb345b729f3e3b27af03d763c9a8c3de4f8ee"
integrity sha512-kQsLcLt0b9FWnzrKNF4m44CSCok7eZft6iGXvl5Kq2Oo0B/k/P3kTosSL/Hx2Oub40CbT+V6Z2bQVrgRqJ49vg==
"@dhis2/analytics@git+https://github.com/d2-ci/analytics.git#feat/DHIS2-15796":
version "26.9.2"
resolved "git+https://github.com/d2-ci/analytics.git#c3860a94bfbb927719fcef4f8eaa57a7950018b2"
dependencies:
"@dhis2/multi-calendar-dates" "^1.2.2"
"@dnd-kit/core" "^6.0.7"
"@dnd-kit/sortable" "^7.0.2"
"@dnd-kit/utilities" "^3.2.1"
"@react-hook/debounce" "^4.0.0"
classnames "^2.3.1"
crypto-js "^4.1.1"
crypto-js "^4.2.0"
d2-utilizr "^0.2.16"
d3-color "^1.2.3"
highcharts "^10.3.3"
Expand Down Expand Up @@ -6747,7 +6746,7 @@ crypto-browserify@^3.0.0:
randombytes "^2.0.0"
randomfill "^1.0.3"

crypto-js@^4.1.1:
crypto-js@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631"
integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==
Expand Down

0 comments on commit 67ff60d

Please sign in to comment.