Skip to content

Commit

Permalink
hotfix: remove picto / remove drinking water
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlesdoiron committed Apr 3, 2024
1 parent 8464daf commit 9ccc3e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions api-node/src/aggregators/drinking_water.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
DataAvailabilityEnum,
IndicatorsSlugEnum,
type User,
Prisma,
type Prisma,
} from '@prisma/client';
import { sendAlertNotification } from '~/utils/notifications/alert';
import {
Expand Down Expand Up @@ -115,7 +115,7 @@ async function fetchDrinkingWaterData(udi: User['udi']) {
};

Object.keys(hubeEauLastTestCheckQuery).forEach((key) => {
let value =
const value =
hubeEauLastTestCheckQuery[key as keyof typeof hubeEauLastTestCheckQuery];
if (value) {
hubEauLastTestCheckURL.searchParams.append(
Expand Down Expand Up @@ -180,7 +180,7 @@ async function fetchDrinkingWaterData(udi: User['udi']) {
};

Object.keys(hubEauQuery).forEach((key) => {
let value = hubEauQuery[key as keyof typeof hubEauQuery];
const value = hubEauQuery[key as keyof typeof hubEauQuery];
if (value) {
hubEauURL.searchParams.append(
key,
Expand Down Expand Up @@ -288,11 +288,12 @@ async function fetchDrinkingWaterData(udi: User['udi']) {
if (hubeauUdiResponse.next) {
getHubeauDataRecursive(hubeauUdiResponse.next);
} else {
if (currentPrelevementConclusions && currentPrelevementParametersCount)
if (currentPrelevementConclusions && currentPrelevementParametersCount) {
prelevements.push({
...currentPrelevementConclusions,
parameters_count: currentPrelevementParametersCount,
});
}
}
}

Expand Down
7 changes: 3 additions & 4 deletions api-node/src/getters/drinking_water.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Indicator, IndicatorByPeriod } from '~/types/api/indicator';
import type { ExtendedShortPrelevementResult } from '~/types/api/drinking_water';
import {
IndicatorsSlugEnum,
Prisma,
type Prisma,
type Municipality,
type User,
} from '@prisma/client';
Expand Down Expand Up @@ -82,9 +82,8 @@ async function getDrinkingWaterFromUdi({
checkPrelevementConformityBacteriological(drinkingWater),
},
status: lastPrelevementConformity,
recommendations: [
drinkingWater.conclusion_conformite_prelevement as string,
],
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
recommendations: [drinkingWater.conclusion_conformite_prelevement!],
},
values: ((drinkingWater.all_tests_results ?? []) as Prisma.JsonArray)?.map(
(jsonValue) => {
Expand Down
1 change: 1 addition & 0 deletions api-node/src/getters/indicators_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const indicatorsObject: Record<IndicatorsSlugEnum, IndicatorItem> = {
slug: IndicatorsSlugEnum.bathing_water,
},
[IndicatorsSlugEnum.drinking_water]: {
active: false,
name: 'Eau du robinet',
long_name: "La qualité de l'eau du robinet",
short_name: 'Eau du robinet',
Expand Down

0 comments on commit 9ccc3e3

Please sign in to comment.