Skip to content

Commit

Permalink
fix: [ANDROAPP-6354] line listing filters
Browse files Browse the repository at this point in the history
Signed-off-by: Manu Muñoz <[email protected]>
  • Loading branch information
mmmateos committed Dec 26, 2024
1 parent e398b73 commit 9447c3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ fun TrackerLineListItem.withFilters(
TrackerLineListItem.LastUpdatedBy -> this
is TrackerLineListItem.EnrollmentDate -> this.copy(
filters = this.filters + listOf(
DateFilter.Range(value, value),
DateFilter.Like(value),
),
)

is TrackerLineListItem.EventDate -> this.copy(
filters = this.filters + listOf(
DateFilter.Range(value, value),
DateFilter.Like(value),
),
)

is TrackerLineListItem.ScheduledDate -> this.copy(
filters = this.filters + listOf(
DateFilter.Range(value, value),
DateFilter.Like(value),
),
)

Expand All @@ -42,13 +42,13 @@ fun TrackerLineListItem.withFilters(

is TrackerLineListItem.IncidentDate -> this.copy(
filters = this.filters + listOf(
DateFilter.Range(value, value),
DateFilter.Like(value),
),
)

is TrackerLineListItem.LastUpdated -> this.copy(
filters = this.filters + listOf(
DateFilter.Range(value, value),
DateFilter.Like(value),
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ sealed class GraphFilters {
lineListFilters.isNotEmpty() || orgUnitsSelected.isNotEmpty() || periodToDisplaySelected.isNotEmpty()

override fun count(): Int {
var count = 0
if (hasFilters()) count++
return count
return columnsWithFilters().size
}

override fun canDisplayChart(dataIsNotEmpty: Boolean): Boolean {
Expand Down

0 comments on commit 9447c3f

Please sign in to comment.