From 59bc12d0841944a52944f0b5815858ed56f4e99f Mon Sep 17 00:00:00 2001 From: gcarron <gcarron@grandlyon.com> Date: Wed, 3 Feb 2021 11:40:15 +0100 Subject: [PATCH] Fixed profile service update --- src/models/profile.model.ts | 4 ++-- src/services/profile.service.ts | 29 ----------------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/models/profile.model.ts b/src/models/profile.model.ts index 111ba75ef..3ca90a5b6 100644 --- a/src/models/profile.model.ts +++ b/src/models/profile.model.ts @@ -14,6 +14,8 @@ export interface ProfileEntity { haveSeenOldFluidModal: string | boolean sendReportNotification: boolean monthlyReportDate: string + profileType: ProfileType + isProfileTypeCompleted: boolean _id?: string _rev?: string } @@ -25,6 +27,4 @@ export interface Profile lastConnectionDate: DateTime haveSeenOldFluidModal: DateTime | boolean monthlyReportDate: DateTime - profileType: ProfileType - isProfileTypeCompleted: boolean } diff --git a/src/services/profile.service.ts b/src/services/profile.service.ts index b9b49c992..489ca4e32 100644 --- a/src/services/profile.service.ts +++ b/src/services/profile.service.ts @@ -2,17 +2,6 @@ import { Client, Q, QueryDefinition, QueryResult } from 'cozy-client' import { Profile, ProfileEntity } from 'models' import { PROFILE_DOCTYPE } from 'doctypes' import { DateTime } from 'luxon' -import { - ConstructionYear, - FacilitiesInstallation, - Floor, - HotWaterEquipment, - HousingType, - IndividualOrCollective, - IndividualInsulationWork, - OutsideFacingWalls, -} from 'enum/profileType.enum' -import { FluidType } from 'enum/fluid.enum' export default class ProfileService { private readonly _client: Client @@ -43,24 +32,6 @@ export default class ProfileService { lastConnectionDate: DateTime.fromISO(profileEntity.lastConnectionDate, { zone: 'utc', }), - isProfileTypeCompleted: false, - profileType: { - housingType: HousingType.INDIVIDUAL_HOUSE, - constructionYear: ConstructionYear.BETWEEN_1975_AND_1989, - area: 100, - occupantsNumber: 4, - outsideFacingWalls: OutsideFacingWalls.TWO, - floor: Floor.NOT_APPLICABLE, - heating: IndividualOrCollective.INDIVIDUAL, - hotWater: IndividualOrCollective.INDIVIDUAL, - individualInsulationWork: - IndividualInsulationWork.WINDOW_REPLACEMENT_AND_WALL_INSULATION, - facilitiesInstallation: FacilitiesInstallation.NONE, - hotWaterEquipment: [HotWaterEquipment.SOLAR], - warmingFluid: FluidType.ELECTRICITY, - hotWaterFluid: FluidType.ELECTRICITY, - cookingFluid: FluidType.ELECTRICITY, - }, } return profile } -- GitLab