Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(owner): 🐛 allow DPE with no emission or comsumption #1612

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions df-shared-next/src/models/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export class Property {
creation_date!: string
count_visit!: number
rentCost!: number
co2Emission!: number
energyConsumption!: number
co2Emission?: number
energyConsumption?: number
dpeDate!: string
chargesCost!: number
displayed!: boolean
Expand Down
5 changes: 4 additions & 1 deletion df-shared-next/src/services/SharedPropertyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Property } from '../models/Property'

export const SharedPropertyService = {
hasDpe(property: Property) {
return (property.co2Emission > 0 && property.energyConsumption > 0) || property.dpeNotRequired
return (
(property.co2Emission !== undefined && property.energyConsumption !== undefined) ||
property.dpeNotRequired
)
}
}
2 changes: 1 addition & 1 deletion owner/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
"no-dpe-list-3": "<a href='https://www.anil.org/lanil-et-les-adil/votre-adil/' target='_blank' rel='noopener noreferrer'>Contacter l’ANIL ou l’ADIL la plus proche</a>, ils pourront vous renseigner sur les recours juridiques à votre disposition.",
"detail-form-title": "Si vous n’avez pas de numéro DPE, veuillez remplir les informations suivantes :",
"date-dpe": "Date de votre DPE",
"no-dpe": "Mon bien n'est pas soumis au DPE. <a href='https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000006896276' target='_blank' rel='noopener noreferrer'>En savoir plus.</a>",
"no-dpe": "Mon bien n'est pas soumis au DPE.&nbsp;<a href='https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000006896276' target='_blank' rel='noopener noreferrer'>En savoir plus.</a>",
"details": {
"title": "Votre DPE en détail",
"subtitle": "Votre logement est classé {0}, cela signifie :",
Expand Down
Loading