-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(frontend): fix search of date birth
- Loading branch information
Showing
13 changed files
with
150 additions
and
64 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
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
89 changes: 50 additions & 39 deletions
89
...-admins/src/app/modules/structure/components/structure-info/structure-info.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,44 +1,55 @@ | ||
<div class="row pb-5" *ngIf="structure"> | ||
<div class="col-md-6"> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<h2>Informations</h2> | ||
</div> | ||
<div class="col-12"> | ||
<h2>Informations</h2> | ||
</div> | ||
|
||
<div class="col-6 my-1 align-self-center"> | ||
<p class="my-1"><b>Nom : </b>{{ structure.nom }}</p> | ||
<p class="my-1"> | ||
<b>Type de structure :</b> {{ structure.structureType }} | ||
</p> | ||
<p class="my-1"><b>Département :</b> {{ structure.departement }}</p> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Nom</span> | ||
<span class="valeur">{{ structure.nom }}</span> | ||
</p> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Type de structure</span> | ||
<span class="valeur">{{ structure.structureType }}</span> | ||
</p> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Département</span> | ||
<span class="valeur">{{ structure.departement }}</span> | ||
</p> | ||
|
||
<p class="my-1"> | ||
<b>Adresse : </b> | ||
</p> | ||
<ul> | ||
<li>{{ structure.adresse }}</li> | ||
<li>{{ structure.codePostal }}, {{ structure.ville }}</li> | ||
</ul> | ||
<p></p> | ||
<p class="my-1"> | ||
<b> Coordonnées de la structure: </b> | ||
</p> | ||
<ul> | ||
<li>{{ structure.email }}</li> | ||
<li>{{ structure.telephone }}</li> | ||
</ul> | ||
<!-- Adresse --> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Adresse</span> | ||
<span class="valeur">{{ structure.adresse }}</span> | ||
</p> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Ville</span> | ||
<span class="valeur" | ||
>{{ structure.codePostal }}, {{ structure.ville }}</span | ||
> | ||
</p> | ||
|
||
<p class="my-1"> | ||
<b>Responsable de la structure: </b> | ||
</p> | ||
<ul> | ||
<li> | ||
{{ structure?.responsable?.nom }} | ||
{{ structure?.responsable?.prenom }} | ||
</li> | ||
<li>{{ structure?.responsable?.fonction }}</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- Coordonnées --> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Email</span> | ||
<span class="valeur">{{ structure.email }}</span> | ||
</p> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Téléphone</span> | ||
<span class="valeur">{{ | ||
structure.telephone | formatInternationalPhoneNumber | ||
}}</span> | ||
</p> | ||
|
||
<!-- Responsable --> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Nom du responsable</span> | ||
<span class="valeur" | ||
>{{ structure?.responsable?.nom }} | ||
{{ structure?.responsable?.prenom }}</span | ||
> | ||
</p> | ||
<p class="col-md-4 reponses"> | ||
<span class="question">Fonction du responsable</span> | ||
<span class="valeur">{{ structure?.responsable?.fonction }}</span> | ||
</p> | ||
</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
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
34 changes: 34 additions & 0 deletions
34
packages/portail-admins/src/app/shared/utils/formatInternationalPhoneNumber.pipe.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,34 @@ | ||
import { Pipe, PipeTransform } from "@angular/core"; | ||
import { Telephone } from "@domifa/common"; | ||
import { PhoneNumberFormat, PhoneNumberUtil } from "google-libphonenumber"; | ||
|
||
@Pipe({ name: "formatInternationalPhoneNumber", standalone: true }) | ||
export class FormatInternationalPhoneNumberPipe implements PipeTransform { | ||
public transform(telephone: Telephone): string { | ||
const phoneUtil = PhoneNumberUtil.getInstance(); | ||
if (!telephone) { | ||
return "Non renseigné"; | ||
} | ||
|
||
if ( | ||
telephone?.numero === "" || | ||
!telephone?.numero || | ||
!telephone?.countryCode | ||
) { | ||
return "Non renseigné"; | ||
} | ||
|
||
try { | ||
const numero = phoneUtil.parse( | ||
telephone.numero, | ||
telephone.countryCode.toLowerCase() | ||
); | ||
if (!phoneUtil.isValidNumber(numero) || !numero) { | ||
return "Non renseigné"; | ||
} | ||
return phoneUtil.format(numero, PhoneNumberFormat.INTERNATIONAL); | ||
} catch (error) { | ||
return "Numéro introuvable"; | ||
} | ||
} | ||
} |
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