diff --git a/package.json b/package.json index 8e2d0f0f..b9066f2c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "glass", "description": "DHIS2 Glass App", - "version": "1.6.18", + "version": "1.6.20", "license": "GPL-3.0", "author": "EyeSeeTea team", "homepage": ".", diff --git a/src/domain/usecases/data-entry/amr-individual-fungal/ImportRISIndividualFungalFile.ts b/src/domain/usecases/data-entry/amr-individual-fungal/ImportRISIndividualFungalFile.ts index 81d6df83..c40ed272 100644 --- a/src/domain/usecases/data-entry/amr-individual-fungal/ImportRISIndividualFungalFile.ts +++ b/src/domain/usecases/data-entry/amr-individual-fungal/ImportRISIndividualFungalFile.ts @@ -319,9 +319,9 @@ export class ImportRISIndividualFungalFile { const sampleDateStr = AMRDataStage.find(de => de.dataElement === AMR_GLASS_AMR_DET_SAMPLE_DATE)?.value ?? `01-01-${period}`; - const sampleDate = moment(new Date(sampleDateStr)).toISOString().split("T").at(0) ?? period; + const sampleDate = moment(new Date(sampleDateStr)).toISOString()?.split("T").at(0) ?? period; - const createdAt = moment(new Date()).toISOString().split("T").at(0) ?? period; + const createdAt = moment(new Date()).toISOString()?.split("T").at(0) ?? period; const events: D2TrackerEvent[] = [ { diff --git a/src/domain/usecases/data-entry/egasp/CustomValidationForEventProgram.ts b/src/domain/usecases/data-entry/egasp/CustomValidationForEventProgram.ts index 55ddbed2..9a90eb3a 100644 --- a/src/domain/usecases/data-entry/egasp/CustomValidationForEventProgram.ts +++ b/src/domain/usecases/data-entry/egasp/CustomValidationForEventProgram.ts @@ -95,7 +95,9 @@ export class CustomValidationForEventProgram { countryName: string, checkClinics: boolean ): FutureData { - const clinicsInEvents = events.map(e => e.orgUnit); + const clinicsInEvents = _(events.map(e => e.orgUnit)) + .uniq() + .value(); return Future.joinObj({ clinicsInCountry: checkClinics ? this.metadataRepository.getClinicsAndLabsInOrgUnitId(countryId) diff --git a/src/domain/usecases/program-rules-processing/ProgramRuleValidationForBLEventProgram.ts b/src/domain/usecases/program-rules-processing/ProgramRuleValidationForBLEventProgram.ts index 7d0ec828..9a26308c 100644 --- a/src/domain/usecases/program-rules-processing/ProgramRuleValidationForBLEventProgram.ts +++ b/src/domain/usecases/program-rules-processing/ProgramRuleValidationForBLEventProgram.ts @@ -413,8 +413,6 @@ export class ProgramRuleValidationForBLEventProgram { const enrollment = event.enrollmentId ? enrollmentsById[event.enrollmentId] : undefined; - console.debug(`Process event: ${event.eventId}`); - const selectedEntity: TrackedEntityAttributeValuesMap | undefined = tei ? _(tei.attributes) .map(attr => [attr.attribute, attr.value] as [Id, string]) @@ -506,10 +504,6 @@ export class ProgramRuleValidationForBLEventProgram { return undefined; } - console.debug( - _.compact(["Get effects[results]:", `eventId=${event.eventId}`, `ASSIGNs: ${effects.length}`]).join(" ") - ); - if (!_.isEmpty(effects)) { const eventEffect: EventEffect = { program, diff --git a/src/domain/utils/ModuleProperties.ts b/src/domain/utils/ModuleProperties.ts index b7e331a3..25297039 100644 --- a/src/domain/utils/ModuleProperties.ts +++ b/src/domain/utils/ModuleProperties.ts @@ -100,7 +100,7 @@ export const moduleProperties = new Map([ { isbatchReq: false, isQuestionnaireReq: true, - completeStatusChange: "DATASET", + completeStatusChange: "QUESTIONNAIRE", isSecondaryFileApplicable: false, isDryRunReq: false, importLoadingMsg: { diff --git a/src/webapp/pages/app/App.tsx b/src/webapp/pages/app/App.tsx index d0f259e9..ea91e9a4 100644 --- a/src/webapp/pages/app/App.tsx +++ b/src/webapp/pages/app/App.tsx @@ -40,7 +40,7 @@ export const App: React.FC = React.memo(function App({ api, d2, instan setAppContext({ api, currentUser, compositionRoot, instance: instance, allCountries: allCountries ?? [] }); // setShowShareButton(isShareButtonVisible); - initFeedbackTool(d2, appConfig); + if (process.env.NODE_ENV !== "production") initFeedbackTool(d2, appConfig); setLoading(false); } setup();