-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add observations list on synthesis interface
- Loading branch information
Showing
4 changed files
with
187 additions
and
8 deletions.
There are no files selected for viewing
66 changes: 64 additions & 2 deletions
66
front-end/src/app/synthesis-interface/synthesis-interface.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 |
---|---|---|
@@ -1,7 +1,69 @@ | ||
<div id="map"></div> | ||
<div class="tune-button-container"> | ||
<div id="map" [class.map-panel-open]="expansionPanelIsOpen"></div> | ||
<div | ||
class="tune-button-container" | ||
[class.tune-button-container-panel-open]="expansionPanelIsOpen" | ||
> | ||
<button mat-fab extended color="primary" (click)="openFilterDialog()"> | ||
<mat-icon>tune</mat-icon> | ||
Filtrer | ||
</button> | ||
</div> | ||
|
||
<mat-accordion> | ||
<mat-expansion-panel | ||
(opened)="expansionPanelOpen()" | ||
(closed)="expansionPanelClose()" | ||
(afterCollapse)="expansionPanelAfterCollapse()" | ||
(afterExpand)="expansionPanelAfterExpand()" | ||
class="expansion-panel" | ||
[class.expansion-panel-open]="expansionPanelIsOpen" | ||
> | ||
<mat-expansion-panel-header> | ||
<mat-panel-title> | ||
{{ currentObservationsFeatureCollection.features.length }} observations | ||
</mat-panel-title> | ||
</mat-expansion-panel-header> | ||
<mat-list class="mat-expansion-panel-body-visible"> | ||
@for ( | ||
observation of currentObservationsFeatureCollection.features; | ||
track observation.properties.id_event | ||
) { | ||
<mat-list-item> | ||
<span matListItemIcon | ||
><button | ||
mat-icon-button | ||
(click)="handleObservationView(observation)" | ||
> | ||
<mat-icon>place</mat-icon> | ||
</button></span | ||
> | ||
|
||
<span matListItemTitle>{{ observation.properties.name_event }}</span> | ||
<span matListItemLine>{{ | ||
observation.properties.date_event | date: "dd/MM/yyyy" | ||
}}</span> | ||
<span matListItemMeta> | ||
<button | ||
mat-icon-button | ||
class="mt-16" | ||
[routerLink]="[ | ||
'/detail-d-une-observation', | ||
slugify( | ||
observation.properties.id_event | ||
.toString() | ||
.concat( | ||
observation.properties.name_event | ||
? '-'.concat(observation.properties.name_event) | ||
: '' | ||
) | ||
), | ||
]" | ||
> | ||
<mat-icon>arrow_forward</mat-icon> | ||
</button> | ||
</span> | ||
</mat-list-item> | ||
} | ||
</mat-list> | ||
</mat-expansion-panel> | ||
</mat-accordion> |
34 changes: 32 additions & 2 deletions
34
front-end/src/app/synthesis-interface/synthesis-interface.component.scss
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 |
---|---|---|
@@ -1,13 +1,43 @@ | ||
$panel-height: 50vh; | ||
|
||
.tune-button-container { | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
position: absolute; | ||
bottom: 16px; | ||
bottom: calc(16px + 48px); | ||
z-index: 400; | ||
} | ||
|
||
#map { | ||
height: 100%; | ||
height: calc(100% - 48px); | ||
width: 100%; | ||
} | ||
|
||
.map-panel-open { | ||
height: calc(100% - $panel-height) !important; | ||
} | ||
|
||
.tune-button-container-panel-open { | ||
bottom: calc(16px + $panel-height); | ||
} | ||
|
||
.expansion-panel { | ||
border-radius: unset !important; | ||
} | ||
|
||
.expansion-panel-open { | ||
height: $panel-height; | ||
mat-list { | ||
overflow: scroll; | ||
max-height: calc($panel-height - var(--mat-toolbar-standard-height) - 16px); | ||
} | ||
} | ||
|
||
@media (max-width: 599px) { | ||
.expansion-panel-open { | ||
mat-list { | ||
max-height: calc($panel-height - var(--mat-toolbar-mobile-height) - 16px); | ||
} | ||
} | ||
} |
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