-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(App): Remove FicheInfo model redondant with Thematic model
- Loading branch information
1 parent
052588f
commit dd1e69f
Showing
37 changed files
with
341 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
...p/shared-reglementation/components/reglementation-view/reglementation-view.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@if (reglementation) { | ||
<div [innerHTML]="reglementation.description"></div> | ||
<div [innerHTML]="reglementation.impactReglementaire"></div> | ||
<div [innerHTML]="reglementation.impactProcedure"></div> | ||
<p> | ||
<a [href]="reglementation.referenceUrl">Accès référence réglementaire</a> | ||
</p> | ||
<p> | ||
Point de concat {{ reglementation.contact }}. | ||
</p> | ||
} @else { | ||
<p>Aucune reglementation ou recommandation.</p> | ||
} |
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
...app/shared-reglementation/components/reglementation-view/reglementation-view.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Reglementation } from '../../models/reglementation.model'; | ||
import { REGLEMENTATION_LIST } from '../../models/reglementation-list.enum'; | ||
|
||
@Component({ | ||
selector: 'app-reglementation-view', | ||
templateUrl: './reglementation-view.component.html', | ||
styleUrl: './reglementation-view.component.css' | ||
}) | ||
export class ReglementationViewComponent implements OnInit { | ||
|
||
@Input() layerReference: string = ''; | ||
|
||
@Input() reglementation?: Reglementation; | ||
|
||
constructor() {} | ||
|
||
ngOnInit() { | ||
if (!this.reglementation) { | ||
this.reglementation = REGLEMENTATION_LIST[0]; | ||
} | ||
// todo rechercher reglementation par reference | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/app/shared-reglementation/models/reglementation-list.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Reglementation } from './reglementation.model'; | ||
|
||
export const REGLEMENTATION_LIST = [ | ||
new Reglementation().deserialise({ | ||
thematicName: 'Biodiversité', | ||
layerName: 'TODO', | ||
title: 'Sites Natura 2000 au titre de la Directive Habitats', | ||
description: '<p>Espace désigné à l\'échelle européenne pour la rareté ou la fragilité des habitats et des espèces animales et végétales qu’il abrite.</p>', | ||
impactReglementaire: '<p>Les créations de voies forestières, de places de dépôt de bois et les premiers boisements sont susceptibles d\'être soumis à une évaluation des incidences.</p><p>Elle doit également être réalisée pour tous autres travaux (notamment les coupes), s\'ils sont soumis à une autorisation administrative.</p>', | ||
impactProcedure: '<p>L\'évaluation des incidences a pour but de déterminer si le projet peut avoir un impact significatif sur les habitats, les espèces végétales et les espèces animales ayant justifié la désignation du site Natura 2000. </p>', | ||
referenceUrl: 'https://www.natura2000.fr/', | ||
contact: 'Direction départementale des territoires' | ||
}), | ||
new Reglementation().deserialise({ | ||
thematicName: 'Biodiversité', | ||
layerName: 'TODO', | ||
title: 'Sites Natura 2000 au titre de la Directive Habitats', | ||
description: '<p>Espace désigné à l\'échelle européenne pour la rareté ou la fragilité des habitats et des espèces animales et végétales qu’il abrite.</p>', | ||
impactReglementaire: '<p>Les créations de voies forestières, de places de dépôt de bois et les premiers boisements sont susceptibles d\'être soumis à une évaluation des incidences.</p><p>Elle doit également être réalisée pour tous autres travaux (notamment les coupes), s\'ils sont soumis à une autorisation administrative.</p>', | ||
impactProcedure: '<p>L\'évaluation des incidences a pour but de déterminer si le projet peut avoir un impact significatif sur les habitats, les espèces végétales et les espèces animales ayant justifié la désignation du site Natura 2000. </p>', | ||
referenceUrl: 'https://www.natura2000.fr/', | ||
contact: 'Direction départementale des territoires' | ||
}), | ||
]; |
54 changes: 54 additions & 0 deletions
54
src/app/shared-reglementation/models/reglementation.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Serializable } from '../../core/models/serializable.model'; | ||
|
||
export class Reglementation implements Serializable { | ||
|
||
thematicName: string = ''; | ||
|
||
layerName: string = ''; | ||
|
||
title: string = ''; | ||
|
||
// rich html content | ||
description: string = ''; | ||
|
||
// rich html content | ||
impactReglementaire : string = ''; | ||
|
||
// rich html content | ||
impactProcedure : string = ''; | ||
|
||
// must be http URI | ||
referenceUrl: string = ''; | ||
|
||
contact: string = ''; | ||
|
||
constructor() { } | ||
|
||
deserialise(input: any) { | ||
Object.assign(this, { | ||
thematicName: input.thematicName, | ||
layerName: input.layerName, | ||
title: input.title, | ||
description: input.description, | ||
impactReglementaire: input.impactReglementaire, | ||
impactProcedure: input.impactProcedure, | ||
referenceUrl: input.referenceUrl, | ||
contact: input.contact | ||
}); | ||
return this; | ||
} | ||
|
||
serialise() { | ||
return { | ||
thematicName: this.thematicName, | ||
layerName: this.layerName, | ||
title: this.title, | ||
description: this.description, | ||
impactReglementaire: this.impactReglementaire, | ||
impactProcedure: this.impactProcedure, | ||
referenceUrl: this.referenceUrl, | ||
contact: this.contact | ||
}; | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/app/shared-reglementation/shared-reglementation.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { ReglementationViewComponent } from './components/reglementation-view/reglementation-view.component'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
ReglementationViewComponent | ||
], | ||
imports: [ | ||
CommonModule | ||
], | ||
exports: [ | ||
ReglementationViewComponent | ||
] | ||
}) | ||
export class SharedReglementationModule { } |
11 changes: 0 additions & 11 deletions
11
src/app/shared-thematic/components/fiche-info-view/fiche-info-view.component.html
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/app/shared-thematic/components/fiche-info-view/fiche-info-view.component.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...fo-view/layer-info-view.component.spec.ts → ...e-view/layer-fiche-view.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
...er-info-view/layer-info-view.component.ts → ...-fiche-view/layer-fiche-view.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/app/shared-thematic/components/reglementation-view/reglementation-view.component.html
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/app/shared-thematic/components/reglementation-view/reglementation-view.component.ts
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
src/app/shared-thematic/components/thematic-list/thematic-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.