Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Performance overview table with indicator linked #15

Merged

Conversation

delemaf
Copy link
Contributor

@delemaf delemaf commented Aug 28, 2024

📌 References

📝 Implementation

Needs EyeSeeTea/d2-api#150 to be merged before (it fixes ts error)

  • Dashboard page
  • Add stats cards for Respond, alert, watch
  • Add performance overview table
  • Date Range Filter
  • Filtering

📹 Screenshots/Screen capture

image
image

🔥 Notes to the tester

@delemaf delemaf changed the base branch from development to feature/full-create-edit-event-form August 28, 2024 10:01
@delemaf delemaf self-assigned this Aug 28, 2024
Base automatically changed from feature/full-create-edit-event-form to development September 4, 2024 10:23
Copy link
Contributor

@9sneha-n 9sneha-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @delemaf Some changes requested

src/data/repositories/AnalyticsD2Repository.ts Outdated Show resolved Hide resolved
src/data/repositories/AnalyticsD2Repository.ts Outdated Show resolved Hide resolved
src/data/repositories/AnalyticsD2Repository.ts Outdated Show resolved Hide resolved
src/data/repositories/AnalyticsD2Repository.ts Outdated Show resolved Hide resolved

export type DiseaseTotalAttrs = DiseaseEntry | HazardEntry;

export class AnalyticsD2Repository implements AnalyticsRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

analytics, indicators etc are DHIS concepts. As per clean architecture the repository should only deal with domain entities. So you can you rename the class, file and functions to not have any references to DHIS concepts but instead refer to Zebra concepts - performance overview table, performance overview repository etc.

import { FutureData } from "../../api-futures";
import { DataStoreClient } from "../../DataStoreClient";

export enum ProgramIndicatorsDatastoreKey {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, the enums and types should not refer to DHIS concepts like ProgramIndicators, please rename.

@@ -0,0 +1,221 @@
export enum IndicatorsId {
suspectedDisease = "jLvbkuvPdZ6",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing that these will be fetched from datastore in upcoming PRs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

(value: string) =>
setOrder &&
setOrder({
name: value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whenever your set of a react state depends on its previous state, you need to use an updater function. https://react.dev/reference/react/useState#updating-state-based-on-the-previous-state.

useEffect(() => {
if (dataPerformanceOverview) {
setDataPerformanceOverview(newDataPerformanceOverview =>
_(newDataPerformanceOverview)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whenever your set of a react state depends on its previous state, you need to use an updater function. https://react.dev/reference/react/useState#updating-state-based-on-the-previous-state. Then add dataPerformanceOverviewdata as a dependency to the useEffect

@bhavananarayanan bhavananarayanan merged commit e07e5f4 into development Oct 3, 2024
1 check passed
@bhavananarayanan bhavananarayanan deleted the feature/performace-overview-table-link-indicators branch October 3, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants