Skip to content

Commit

Permalink
chore: fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
9sneha-n committed Oct 26, 2024
1 parent 9040305 commit ed4011f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/data/repositories/AppConfigurationD2Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import { getHazardTypeByCode } from "./consts/DiseaseOutbreakConstants";
import { Future } from "../../domain/entities/generic/Future";
import { AppConfigurations } from "../../domain/entities/AppConfigurations";
import { RiskAssessmentGrading } from "../../domain/entities/risk-assessment/RiskAssessmentGrading";

const MAIN_SYNDROME_OPTION_SET_CODE = "AGENTS";
export const SUSPECTED_DISEASE_OPTION_SET_CODE = "RTSL_ZEB_OS_DISEASE";
export const NOTIFICATION_SOURCE_OPTION_SET_CODE = "RTSL_ZEB_OS_SOURCE";
const optionSetCode = {
dataSources: "RTSL_ZEB_OS_DATA_SOURCE",
hazardTypes: "RTSL_ZEB_OS_HAZARD_TYPE",
hazardTypesByCode: "RTSL_ZEB_OS_HAZARD_TYPE",
mainSyndromes: "AGENTS",
mainSyndromes: MAIN_SYNDROME_OPTION_SET_CODE,
suspectedDiseases: SUSPECTED_DISEASE_OPTION_SET_CODE,
notificationSources: NOTIFICATION_SOURCE_OPTION_SET_CODE,
incidentStatus: "RTSL_ZEB_OS_INCIDENT_STATUS",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IncidentActionPlan } from "../incident-action-plan/IncidentActionPlan";
import { IncidentManagementTeam } from "../incident-management-team/IncidentManagementTeam";
import { TeamMember } from "../incident-management-team/TeamMember";
import { OrgUnit } from "../OrgUnit";
import { Code, Id, NamedRef, Option } from "../Ref";
import { Code, Id, NamedRef } from "../Ref";
import { RiskAssessment } from "../risk-assessment/RiskAssessment";
import { Maybe } from "../../../utils/ts-utils";
import { ValidationError } from "../ValidationError";
Expand Down Expand Up @@ -87,9 +87,6 @@ export type DiseaseOutbreakEventAttrs = DiseaseOutbreakEventBaseAttrs & {
incidentManagementTeam: Maybe<IncidentManagementTeam>;
};




/**
* Note: DiseaseOutbreakEvent represents Event in the Figma.
* Not using event as it is a keyword and can also be confused with dhis event
Expand Down
7 changes: 2 additions & 5 deletions src/webapp/pages/form-page/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import { mapFormStateToEntityData } from "./mapFormStateToEntityData";
import { updateAndValidateFormState } from "./disease-outbreak-event/utils/updateDiseaseOutbreakEventFormState";
import { FormFieldState } from "../../components/form/FormFieldsState";
import { FormType } from "./FormPage";
import {
ConfigurableForm,
DiseaseOutbreakEventFormData,
FormLables,
} from "../../../domain/entities/ConfigurableForm";
import { ConfigurableForm, FormLables } from "../../../domain/entities/ConfigurableForm";
import { mapEntityToFormState } from "./mapEntityToFormState";
import { useCurrentEventTracker } from "../../contexts/current-event-tracker-context";
import {
Expand Down Expand Up @@ -99,6 +95,7 @@ export function useForm(formType: FormType, id?: Id): State {
id,
currentEventTracker,
appConfiguration.eventTrackerConfigurations,
appConfiguration,
]);

const handleAddNew = useCallback(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function useIncidentActionPlan(id: Id) {
setGlobalMessage(`Event tracker with id: ${id} does not exist`);
}
);
}, [compositionRoot, id, changeCurrentEventTracker, getCurrentEventTracker]);
}, [compositionRoot, id, changeCurrentEventTracker, getCurrentEventTracker, appConfiguration]);

return {
incidentActionExists: incidentActionExists,
Expand Down

0 comments on commit ed4011f

Please sign in to comment.