Skip to content
Snippets Groups Projects
Commit 59bc12d0 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Fixed profile service update

parent efa18c3b
Branches
Tags
1 merge request!229WIP : Features/us277 profile type form
...@@ -14,6 +14,8 @@ export interface ProfileEntity { ...@@ -14,6 +14,8 @@ export interface ProfileEntity {
haveSeenOldFluidModal: string | boolean haveSeenOldFluidModal: string | boolean
sendReportNotification: boolean sendReportNotification: boolean
monthlyReportDate: string monthlyReportDate: string
profileType: ProfileType
isProfileTypeCompleted: boolean
_id?: string _id?: string
_rev?: string _rev?: string
} }
...@@ -25,6 +27,4 @@ export interface Profile ...@@ -25,6 +27,4 @@ export interface Profile
lastConnectionDate: DateTime lastConnectionDate: DateTime
haveSeenOldFluidModal: DateTime | boolean haveSeenOldFluidModal: DateTime | boolean
monthlyReportDate: DateTime monthlyReportDate: DateTime
profileType: ProfileType
isProfileTypeCompleted: boolean
} }
...@@ -2,17 +2,6 @@ import { Client, Q, QueryDefinition, QueryResult } from 'cozy-client' ...@@ -2,17 +2,6 @@ import { Client, Q, QueryDefinition, QueryResult } from 'cozy-client'
import { Profile, ProfileEntity } from 'models' import { Profile, ProfileEntity } from 'models'
import { PROFILE_DOCTYPE } from 'doctypes' import { PROFILE_DOCTYPE } from 'doctypes'
import { DateTime } from 'luxon' 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 { export default class ProfileService {
private readonly _client: Client private readonly _client: Client
...@@ -43,24 +32,6 @@ export default class ProfileService { ...@@ -43,24 +32,6 @@ export default class ProfileService {
lastConnectionDate: DateTime.fromISO(profileEntity.lastConnectionDate, { lastConnectionDate: DateTime.fromISO(profileEntity.lastConnectionDate, {
zone: 'utc', 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 return profile
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment