-
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.
- Loading branch information
Andy Andrianjatovo
committed
Aug 4, 2022
1 parent
018a47e
commit 2ca5dda
Showing
13 changed files
with
268 additions
and
20 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
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,6 +1,13 @@ | ||
<div *ngFor="let a of lieux"> | ||
{{ a.nom_lieu }} | ||
{{ a.adresse_lieu }} | ||
{{ a.coordonnees_lieu }} | ||
</div> | ||
Lieux :{{ lieux?.length }} | ||
<h1> | ||
{{ lieux!.nom_lieu }} | ||
{{ lieux!.adresse_lieu }} | ||
{{ lieux!.coordonnees_lieu }} | ||
</h1> | ||
<div *ngFor="let item of histoToDisp" > | ||
{{ | ||
item.date_passage | date: 'dd/MM/yyyy' | ||
}} | ||
{{ | ||
item.personne.nom | ||
}} | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- <table> | ||
<thead> | ||
<tr> | ||
<th>_id</th> | ||
<th>nom_lieu</th> | ||
<th>adresse_lieu</th> | ||
<th>statut_lieu</th> | ||
<th>Pays</th> | ||
<th>coordonnees_lieu</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let lieu of lieux"> | ||
<td>{{ lieu._id }}</td> | ||
<td>{{ lieu.nom_lieu }}</td> | ||
<td>{{ lieu.adresse_lieu }}</td> | ||
<td>{{ lieu.statut_lieu }}</td> | ||
<td>{{ lieu.coordonnees_lieu }}</td> | ||
<td> | ||
<button (click)="details(lieu._id)">Details</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> --> | ||
<ol class="articles"> | ||
<li | ||
class="articles__article" | ||
style="--animation-order: 1" | ||
*ngFor="let lieu of lieux" | ||
> | ||
<a class="articles__link" (click)="details(lieu._id)"> | ||
<div class="articles__content articles__content--lhs"> | ||
<h2 class="articles__title">{{ lieu.nom_lieu }}</h2> | ||
<div class="articles__footer"> | ||
<p>{{ lieu.adresse_lieu }}</p> | ||
<!-- <time>1 Jan 2020</time> --> | ||
</div> | ||
</div> | ||
<div class="articles__content articles__content--rhs" aria-hidden="true"> | ||
<h2 class="articles__title">{{ lieu.nom_lieu }}</h2> | ||
<div class="articles__footer"> | ||
<p>{{ lieu.adresse_lieu }}</p> | ||
<!-- <time>1 Jan 2020</time> --> | ||
</div> | ||
</div></a | ||
> | ||
</li> | ||
</ol> |
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,116 @@ | ||
|
||
*, :after, :before { | ||
box-sizing: border-box; | ||
margin: 0; | ||
} | ||
|
||
.articles { | ||
margin: calc(8px*2) auto calc(8px*5); | ||
display: grid; | ||
grid-row-gap: calc(8px*8); | ||
grid-column-gap: calc(8px*6); | ||
grid-template-columns: repeat(auto-fit,minmax(calc(8px*35),1fr)); | ||
justify-items: center; | ||
} | ||
|
||
.articles__article { | ||
cursor: pointer; | ||
display: block; | ||
position: relative; | ||
animation-name: animateIn; | ||
animation-duration: .35s; | ||
animation-delay: calc(var(--animation-order)*100ms); | ||
animation-fill-mode: both; | ||
animation-timing-function: ease-in-out; | ||
} | ||
|
||
.articles__article:before { | ||
content: ""; | ||
position: absolute; | ||
top: calc(8px*-2); | ||
left: calc(8px*-2); | ||
border: 2px dashed #0DB28A; | ||
background-image: repeating-linear-gradient(-24deg,transparent,transparent 4px,rgba(255,255,255,.5) 0, rgba(255,255,255,.5) 5px); | ||
z-index: -1; | ||
} | ||
|
||
.articles__article, | ||
.articles__article:before { | ||
width: calc(8px*35); | ||
height: calc(8px*35); | ||
} | ||
|
||
.articles__link { | ||
background-color: #0DB28A; | ||
border: 2px solid #fff; | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
perspective: 1000px; | ||
} | ||
|
||
.articles__link:after { | ||
content: ""; | ||
position: absolute; | ||
top: 50%; | ||
right: calc(8px*3); | ||
width: calc(8px*2); | ||
height: calc(8px*2); | ||
margin-top: calc(8px*-1); | ||
clip-path: polygon(75% 0,100% 50%,75% 100%,0 100%,25% 50%,0 0); | ||
-webkit-clip-path: polygon(75% 0,100% 50%,75% 100%,0 100%,25% 50%,0 0); | ||
background-color: #fff; | ||
opacity: 0; | ||
transition: opacity .5s ease-in,transform .3s ease-in-out 0ms; | ||
} | ||
|
||
.articles__content { | ||
background-color: #fff; | ||
color: #1a1a1a; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
padding: calc(8px*2); | ||
display: flex; | ||
flex-direction: column; | ||
border: 2px solid #0DB28A; | ||
} | ||
|
||
.articles__content--lhs { | ||
clip-path: polygon(0 0,51% 0,51% 100%,0 100%); | ||
-webkit-clip-path: polygon(0 0,51% 0,51% 100%,0 100%); | ||
} | ||
|
||
.articles__content--rhs { | ||
clip-path: polygon(50% 0,100% 0,100% 100%,50% 100%); | ||
-webkit-clip-path: polygon(50% 0,100% 0,100% 100%,50% 100%); | ||
transition: transform .5s ease-in-out,background-color .4s ease-in-out; | ||
} | ||
|
||
.articles__title { | ||
font-size: calc(8px*4); | ||
line-height: 1.125; | ||
font-weight: 700; | ||
letter-spacing: -.02em; | ||
} | ||
|
||
.articles__footer { | ||
margin-top: auto; | ||
font-size: calc(8px*2); | ||
line-height: calc(8px*2); | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.articles__link:hover .articles__content--rhs { | ||
background-color: #f5f5f5; | ||
transform: rotateY(-50deg); | ||
} | ||
|
||
.articles__link:hover:after { | ||
opacity: 1; | ||
transform: translateX(calc(8px*1.5)); | ||
transition: opacity .5s ease-in,transform .3s ease-in-out .25s; | ||
} |
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,29 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute, Router } from '@angular/router'; | ||
import { Lieu } from 'src/app/models/lieux'; | ||
import { LieuxService } from 'src/app/services/lieux.service'; | ||
|
||
@Component({ | ||
selector: 'app-liste-lieu', | ||
templateUrl: './liste-lieu.component.html', | ||
styleUrls: ['./liste-lieu.component.scss'] | ||
}) | ||
export class ListeLieuComponent implements OnInit { | ||
lieux: Lieu[] = []; | ||
|
||
constructor(private lieuService: LieuxService,private route: ActivatedRoute,private router: Router ) { } | ||
|
||
ngOnInit(): void { | ||
this.getLieux(); | ||
} | ||
|
||
getLieux() { | ||
this.lieuService.getLieux().subscribe((data: any) => { | ||
this.lieux = data.docs; | ||
}); | ||
} | ||
|
||
details(lieu_id: String) { | ||
this.router.navigate(['/lieux/details', lieu_id]); | ||
} | ||
} |
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,6 +1,14 @@ | ||
import { Personne } from 'src/app/models/personne'; | ||
export interface Historique { | ||
_id: String; | ||
lieu_id: String; | ||
personne_id: String; | ||
date_passage: Date; | ||
} | ||
|
||
export interface HistoriqueToDisplay{ | ||
_id: String; | ||
lieu_id: String; | ||
personne: Personne; | ||
date_passage: Date; | ||
} |
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