- Vous trouverez ci-dessous, l'ensemble des courriers, colis et avis de - passage reçus et déjà récupérés -
--
Aucune interaction enregistrée
-+ Vous trouverez ci-dessous, l'ensemble des courriers, colis et avis de + passage reçus et déjà récupérés +
++
Aucune interaction enregistrée
+- {{ interaction.dateInteraction | date : "dd MMMM yyyy à HH:mm" }} -
-- {{ interaction.label }} -
- ++ {{ interaction.dateInteraction | date : "dd MMMM yyyy à HH:mm" }} +
++ {{ interaction.label }} +
+ ++
+
+ Bonjour {{ usagerProfile.usager.prenom }} + {{ usagerProfile.usager.nom }}. +
+ Bienvenue dans votre espace de suivi de courrier +Votre courrier
+Votre courrier
-Vous avez du courrier !
+Vous avez du courrier !
diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/section-infos/section-infos.component.html b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/section-infos/section-infos.component.html index 761fd1bebf..fe4302839e 100644 --- a/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/section-infos/section-infos.component.html +++ b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/section-infos/section-infos.component.html @@ -1,5 +1,5 @@ -
Votre domiciliation
+Votre domiciliation
Liens utiles
- -- Découvrez les aides et prestations sociales auxquelles vous êtes éligibles - en vous rendant sur le site AidesJeunes -
-Liens utiles
++ Soliguide rassemble tous les services, initiatives et ressources pour + les personnes qui rencontrent une difficulté +
+ Consulter Soliguide + ++ Découvrez en quelques clics les prestations sociales que vous pouvez + demander (aides au logement, complémentaire santé, etc) +
+ Consulter "Mes droits sociaux" + ++ Découvrez les aides et prestations sociales auxquelles vous êtes + éligibles en vous rendant sur le site AidesJeunes +
+ + Aides 1 jeune 1 solution + +Transfert et procurations
+Transfert et procurations
+
+
{{ structureInformation.length > 1 ? "Messages" : "Message" }} de votre
structure 📩
diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.spec.ts b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.spec.ts
similarity index 100%
rename from packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.spec.ts
rename to packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.spec.ts
diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.ts b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.ts
new file mode 100644
index 0000000000..32ddf25c9d
--- /dev/null
+++ b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.ts
@@ -0,0 +1,16 @@
+import { Component, Input } from "@angular/core";
+import {
+ STRUCTURE_INFORMATION_TYPES,
+ StructureInformation,
+} from "@domifa/common";
+
+@Component({
+ selector: "app-structure-information",
+ templateUrl: "./structure-information.component.html",
+ styleUrls: ["./structure-information.component.css"],
+})
+export class StructureInformationComponent {
+ public readonly STRUCTURE_INFORMATION_TYPES = STRUCTURE_INFORMATION_TYPES;
+
+ @Input() structureInformation: StructureInformation[] = [];
+}
diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.ts b/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.ts
deleted file mode 100644
index 1eec8ab1d9..0000000000
--- a/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Component, OnInit } from "@angular/core";
-import {
- STRUCTURE_INFORMATION_TYPES,
- StructureInformation,
-} from "@domifa/common";
-import { Subscription } from "rxjs";
-import { StructureInformationService } from "../../services/structure-information.service";
-import { addDays, isAfter } from "date-fns";
-
-@Component({
- selector: "app-structure-information",
- templateUrl: "./structure-information.component.html",
- styleUrls: ["./structure-information.component.css"],
-})
-export class StructureInformationComponent implements OnInit {
- public readonly STRUCTURE_INFORMATION_TYPES = STRUCTURE_INFORMATION_TYPES;
- private subscription = new Subscription();
- public structureInformation: StructureInformation[] = [];
-
- constructor(
- private readonly structureInformationService: StructureInformationService,
- ) {}
-
- ngOnInit(): void {
- this.getStructureInformation();
- }
-
- public getStructureInformation() {
- this.subscription.add(
- this.structureInformationService.getAllStructureInformation().subscribe({
- next: (structureInformation: StructureInformation[]) => {
- const today = new Date();
- const futureDate = addDays(today, 15);
-
- this.structureInformation = structureInformation.filter((info) => {
- if (!info.isTemporary) {
- return true;
- }
- if (info.endDate) {
- return isAfter(new Date(info.endDate), futureDate);
- }
- return false;
- });
- },
- }),
- );
- }
-}
diff --git a/packages/portail-usagers/src/app/modules/usager-account/pipes/formatInternationalPhoneNumber.pipe.ts b/packages/portail-usagers/src/app/modules/usager-account/pipes/formatInternationalPhoneNumber.pipe.ts
new file mode 100644
index 0000000000..83e3005b1a
--- /dev/null
+++ b/packages/portail-usagers/src/app/modules/usager-account/pipes/formatInternationalPhoneNumber.pipe.ts
@@ -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";
+ }
+ }
+}
diff --git a/packages/portail-usagers/src/app/modules/shared/pipes/index.ts b/packages/portail-usagers/src/app/modules/usager-account/pipes/index.ts
similarity index 59%
rename from packages/portail-usagers/src/app/modules/shared/pipes/index.ts
rename to packages/portail-usagers/src/app/modules/usager-account/pipes/index.ts
index 9ceb66dafb..e35c1637a1 100644
--- a/packages/portail-usagers/src/app/modules/shared/pipes/index.ts
+++ b/packages/portail-usagers/src/app/modules/usager-account/pipes/index.ts
@@ -1,4 +1,2 @@
// @index('./*', f => `export * from '${f.path}'`)
export * from "./formatInternationalPhoneNumber.pipe";
-export * from "./nl2br.pipe";
-export * from "./usager-nom-complet.pipe";
diff --git a/packages/portail-usagers/src/app/modules/usager-account/pipes/nl2br.pipe.ts b/packages/portail-usagers/src/app/modules/usager-account/pipes/nl2br.pipe.ts
deleted file mode 100644
index 6f1053bc0b..0000000000
--- a/packages/portail-usagers/src/app/modules/usager-account/pipes/nl2br.pipe.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { Pipe, PipeTransform } from "@angular/core";
-@Pipe({ name: "nl2br", standalone: true })
-export class ReplaceLineBreaks implements PipeTransform {
- public transform(value: string): string {
- return value.replace(/\n/g, "
");
- }
-}
diff --git a/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts b/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts
index e0de73c33f..b7ff032c68 100644
--- a/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts
+++ b/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts
@@ -5,26 +5,27 @@ import { CommonModule } from "@angular/common";
import { UsagerAccountRoutingModule } from "./usager-account-routing.module";
import { HomeUsagerComponent } from "./components/home-usager/home-usager.component";
import { SectionCourriersComponent } from "./components/home-usager/sections/section-courriers/section-courriers.component";
-import { SectionInfosComponent } from "./components/home-usager/sections/section-infos/section-infos.component";
import { SectionOptionsComponent } from "./components/home-usager/sections/section-options/section-options.component";
import { SharedModule } from "../shared/shared.module";
import { UsagerAcceptCguComponent } from "./components/usager-accept-cgu/usager-accept-cgu.component";
import { GeneralModule } from "../general/general.module";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { HistoriqueCourriersComponent } from "./components/historique-courriers/historique-courriers.component";
-import { ReplaceLineBreaks } from "./pipes/nl2br.pipe";
import { NgbPagination } from "@ng-bootstrap/ng-bootstrap";
-import { StructureInformationComponent } from "./components/structure-information/structure-information.component";
+import { StructureInformationComponent } from "./components/home-usager/sections/structure-information/structure-information.component";
+import { SectionLinksComponent } from "./components/home-usager/sections/section-links/section-links.component";
+import { SectionInfosComponent } from "./components/home-usager/sections/section-infos/section-infos.component";
+import { FormatInternationalPhoneNumberPipe } from "./pipes";
@NgModule({
declarations: [
HomeUsagerComponent,
- SectionInfosComponent,
SectionCourriersComponent,
SectionOptionsComponent,
UsagerAcceptCguComponent,
HistoriqueCourriersComponent,
StructureInformationComponent,
+ SectionInfosComponent,
],
imports: [
CommonModule,
@@ -34,8 +35,9 @@ import { StructureInformationComponent } from "./components/structure-informatio
FormsModule,
ReactiveFormsModule,
FontAwesomeModule,
- ReplaceLineBreaks,
NgbPagination,
+ SectionLinksComponent,
+ FormatInternationalPhoneNumberPipe,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
diff --git a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.css b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.css
deleted file mode 100644
index a318c17625..0000000000
--- a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.form-check-label {
- width: 90%;
-}
diff --git a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.scss b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.scss
new file mode 100644
index 0000000000..6242e643cd
--- /dev/null
+++ b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.scss
@@ -0,0 +1,15 @@
+.form-check-label {
+ width: 90%;
+}
+
+.indications div {
+ padding-top: 5px;
+}
+
+.indications {
+ padding: 5px;
+}
+
+.indications .ng-fa-icon {
+ margin-right: 5px;
+}
diff --git a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts
index be83a04dba..9f9415a0b5 100644
--- a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts
+++ b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts
@@ -21,7 +21,7 @@ import {
@Component({
selector: "app-usager-login",
- styleUrls: ["./usager-login.component.css"],
+ styleUrls: ["./usager-login.component.scss"],
templateUrl: "./usager-login.component.html",
})
export class UsagerLoginComponent implements OnInit, OnDestroy {
diff --git a/packages/portail-usagers/src/assets/css/bootstrap-custom.css b/packages/portail-usagers/src/assets/css/bootstrap-custom.css
deleted file mode 100644
index bad0a56d7c..0000000000
--- a/packages/portail-usagers/src/assets/css/bootstrap-custom.css
+++ /dev/null
@@ -1,123 +0,0 @@
-.alert {
- position: relative;
- display: flex;
- align-items: left;
- justify-content: left;
- word-break: break-all;
-}
-
-.alert p {
- margin: 0 0;
-}
-
-.alert .svg-icon {
- display: table-cell;
- margin-right: 10px;
- width: 35px;
- height: 35px;
- padding: 6px;
- box-sizing: border-box;
- -webkit-mask-size: 98%;
- mask-size: 98%;
-}
-
-.alert div,
-.alert span {
- padding-left: 5px;
- flex-shrink: 1;
- align-self: center;
-}
-
-.close {
- opacity: 1 !important;
-}
-
-.modal-title {
- font-style: normal;
- font-weight: bold;
- font-size: 1.4rem;
- margin-bottom: 0.2rem;
- margin-top: 0.2rem;
-}
-
-.alert-warning .svg-icon {
- background-color: #f0870c;
-}
-
-.alert-danger .svg-icon {
- background-color: #f00c0c;
-}
-
-.alert-success {
- color: #155724;
- background-color: #d4edda;
- border-color: #c3e6cb;
-}
-
-.alert-success hr {
- border-top-color: #b1dfbb;
-}
-
-.alert-success .alert-link {
- color: #0b2e13;
-}
-
-.alert-info {
- color: #000000;
- background-color: #e1ecff;
- border-color: #a4c7ff;
-}
-
-.alert-info hr {
- border-color: #a4c7ff;
-}
-.alert-info .svg-icon {
- background-color: var(--bs-primary);
-}
-
-.alert-info .alert-link {
- color: #062c33;
-}
-
-.alert-warning {
- color: black;
- background-color: #fff9f4;
- border-color: #ffe1c6;
-}
-
-.alert-warning hr {
- border-top-color: #ffe1c6;
-}
-
-.alert-warning .alert-link {
- color: #533f03;
-}
-
-.alert-danger {
- color: black;
- background-color: #fff4f5;
- border-color: #ffcccf;
-}
-
-.alert-danger hr {
- border-top-color: #f1b0b7;
-}
-
-.alert-danger .alert-link {
- color: #491217;
-}
-
-#modal-title {
- font-style: normal;
- font-weight: bold;
- font-size: 1.4rem;
- margin-bottom: 0.2rem;
- margin-top: 0.2rem;
-}
-
-@media (min-width: 576px) {
- .modal-dialog {
- max-width: 720px;
- margin: 1.75rem auto;
- }
-}
diff --git a/packages/portail-usagers/src/assets/css/forms.css b/packages/portail-usagers/src/assets/css/forms.css
index 5bf13e08bd..c9105b67f7 100644
--- a/packages/portail-usagers/src/assets/css/forms.css
+++ b/packages/portail-usagers/src/assets/css/forms.css
@@ -33,19 +33,6 @@ form label {
font-size: 0.95rem;
color: var(--bs-danger);
}
-
-.indications div {
- padding-top: 5px;
-}
-
-.indications {
- padding: 5px;
-}
-
-.indications .ng-fa-icon {
- margin-right: 5px;
-}
-
.modal-body .form-check {
padding: 0 0 0 1.75rem;
cursor: pointer;
@@ -67,19 +54,13 @@ form label {
margin: 0 !important;
}
-.btn-light-primary {
- background-color: #ffffff;
- color: #4164f5;
- border-radius: 3px;
-}
-
.btn-white-primary {
background-color: #ffffff;
color: #4164f5;
box-shadow: 0 2px 2px #2f4ece;
border-radius: 3px;
}
-.btn-light-primary:hover,
+
.btn-white-primary:hover {
background-color: #e7e7e7;
color: #2444c5;
diff --git a/packages/portail-usagers/src/assets/css/main.scss b/packages/portail-usagers/src/assets/css/main.scss
index 267fd83bf0..8b360ece76 100644
--- a/packages/portail-usagers/src/assets/css/main.scss
+++ b/packages/portail-usagers/src/assets/css/main.scss
@@ -21,10 +21,6 @@ html {
padding-left: 1rem !important;
}
-.container {
- max-width: 1350px;
-}
-
.modal-backdrop.show {
opacity: 0.75;
}
@@ -74,7 +70,6 @@ html {
font-style: normal;
font-weight: bold;
font-size: 1.35rem;
- padding: 0 0.8rem;
color: var(--bs-primary);
}
@@ -110,3 +105,127 @@ html {
background-color: white;
border-radius: 3px;
}
+
+.alert {
+ position: relative;
+ display: flex;
+ align-items: left;
+ justify-content: left;
+ word-break: break-word;
+ padding: 0.75rem;
+
+ div,
+ span {
+ padding-left: 5px;
+ flex-shrink: 1;
+ align-self: center;
+ }
+ p {
+ margin: auto 0 !important;
+ }
+
+ .svg-icon {
+ display: table-cell;
+ margin-right: 10px;
+ width: 35px;
+ height: 35px;
+ padding: 6px;
+ box-sizing: border-box;
+ -webkit-mask-size: 98%;
+ mask-size: 98%;
+ }
+}
+
+.close {
+ opacity: 1 !important;
+}
+
+.modal-title {
+ font-style: normal;
+ font-weight: bold;
+ font-size: 1.4rem;
+ margin-bottom: 0.2rem;
+ margin-top: 0.2rem;
+}
+
+.alert-warning .svg-icon {
+ background-color: #f0870c;
+}
+
+.alert-danger .svg-icon {
+ background-color: #f00c0c;
+}
+
+.alert-success {
+ color: #155724;
+ background-color: #d4edda;
+ border-color: #c3e6cb;
+}
+
+.alert-success hr {
+ border-top-color: #b1dfbb;
+}
+
+.alert-success .alert-link {
+ color: #0b2e13;
+}
+
+.alert-info {
+ color: #000000;
+ background-color: #e1ecff;
+ border-color: #a4c7ff;
+}
+
+.alert-info hr {
+ border-color: #a4c7ff;
+}
+.alert-info .svg-icon {
+ background-color: var(--bs-primary);
+}
+
+.alert-info .alert-link {
+ color: #062c33;
+}
+
+.alert-warning {
+ color: black;
+ background-color: #fff9f4;
+ border-color: #ffe1c6;
+}
+
+.alert-warning hr {
+ border-top-color: #ffe1c6;
+}
+
+.alert-warning .alert-link {
+ color: #533f03;
+}
+
+.alert-danger {
+ color: black;
+ background-color: #fff4f5;
+ border-color: #ffcccf;
+}
+
+.alert-danger hr {
+ border-top-color: #f1b0b7;
+}
+
+.alert-danger .alert-link {
+ color: #491217;
+}
+
+#modal-title {
+ font-style: normal;
+ font-weight: bold;
+ font-size: 1.4rem;
+ margin-bottom: 0.2rem;
+ margin-top: 0.2rem;
+}
+
+@media (min-width: 576px) {
+ .modal-dialog {
+ max-width: 720px;
+ margin: 1.75rem auto;
+ }
+}
diff --git a/packages/portail-usagers/src/assets/images/partenaires/mes-droits-sociaux.png b/packages/portail-usagers/src/assets/images/partenaires/mes-droits-sociaux.png
new file mode 100644
index 0000000000..0935d3894c
Binary files /dev/null and b/packages/portail-usagers/src/assets/images/partenaires/mes-droits-sociaux.png differ
diff --git a/packages/portail-usagers/src/assets/images/partenaires/soliguide.png b/packages/portail-usagers/src/assets/images/partenaires/soliguide.png
new file mode 100644
index 0000000000..b887ea0ab1
Binary files /dev/null and b/packages/portail-usagers/src/assets/images/partenaires/soliguide.png differ
diff --git a/packages/portail-usagers/src/index.html b/packages/portail-usagers/src/index.html
index fd64e6fe57..1585a594ca 100644
--- a/packages/portail-usagers/src/index.html
+++ b/packages/portail-usagers/src/index.html
@@ -56,8 +56,8 @@
-
+
-
+
{{ structureInformation.length > 1 ? "Messages" : "Message" }} de votre structure 📩
diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.spec.ts b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.spec.ts similarity index 100% rename from packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.spec.ts rename to packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.spec.ts diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.ts b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.ts new file mode 100644 index 0000000000..32ddf25c9d --- /dev/null +++ b/packages/portail-usagers/src/app/modules/usager-account/components/home-usager/sections/structure-information/structure-information.component.ts @@ -0,0 +1,16 @@ +import { Component, Input } from "@angular/core"; +import { + STRUCTURE_INFORMATION_TYPES, + StructureInformation, +} from "@domifa/common"; + +@Component({ + selector: "app-structure-information", + templateUrl: "./structure-information.component.html", + styleUrls: ["./structure-information.component.css"], +}) +export class StructureInformationComponent { + public readonly STRUCTURE_INFORMATION_TYPES = STRUCTURE_INFORMATION_TYPES; + + @Input() structureInformation: StructureInformation[] = []; +} diff --git a/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.ts b/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.ts deleted file mode 100644 index 1eec8ab1d9..0000000000 --- a/packages/portail-usagers/src/app/modules/usager-account/components/structure-information/structure-information.component.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Component, OnInit } from "@angular/core"; -import { - STRUCTURE_INFORMATION_TYPES, - StructureInformation, -} from "@domifa/common"; -import { Subscription } from "rxjs"; -import { StructureInformationService } from "../../services/structure-information.service"; -import { addDays, isAfter } from "date-fns"; - -@Component({ - selector: "app-structure-information", - templateUrl: "./structure-information.component.html", - styleUrls: ["./structure-information.component.css"], -}) -export class StructureInformationComponent implements OnInit { - public readonly STRUCTURE_INFORMATION_TYPES = STRUCTURE_INFORMATION_TYPES; - private subscription = new Subscription(); - public structureInformation: StructureInformation[] = []; - - constructor( - private readonly structureInformationService: StructureInformationService, - ) {} - - ngOnInit(): void { - this.getStructureInformation(); - } - - public getStructureInformation() { - this.subscription.add( - this.structureInformationService.getAllStructureInformation().subscribe({ - next: (structureInformation: StructureInformation[]) => { - const today = new Date(); - const futureDate = addDays(today, 15); - - this.structureInformation = structureInformation.filter((info) => { - if (!info.isTemporary) { - return true; - } - if (info.endDate) { - return isAfter(new Date(info.endDate), futureDate); - } - return false; - }); - }, - }), - ); - } -} diff --git a/packages/portail-usagers/src/app/modules/usager-account/pipes/formatInternationalPhoneNumber.pipe.ts b/packages/portail-usagers/src/app/modules/usager-account/pipes/formatInternationalPhoneNumber.pipe.ts new file mode 100644 index 0000000000..83e3005b1a --- /dev/null +++ b/packages/portail-usagers/src/app/modules/usager-account/pipes/formatInternationalPhoneNumber.pipe.ts @@ -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"; + } + } +} diff --git a/packages/portail-usagers/src/app/modules/shared/pipes/index.ts b/packages/portail-usagers/src/app/modules/usager-account/pipes/index.ts similarity index 59% rename from packages/portail-usagers/src/app/modules/shared/pipes/index.ts rename to packages/portail-usagers/src/app/modules/usager-account/pipes/index.ts index 9ceb66dafb..e35c1637a1 100644 --- a/packages/portail-usagers/src/app/modules/shared/pipes/index.ts +++ b/packages/portail-usagers/src/app/modules/usager-account/pipes/index.ts @@ -1,4 +1,2 @@ // @index('./*', f => `export * from '${f.path}'`) export * from "./formatInternationalPhoneNumber.pipe"; -export * from "./nl2br.pipe"; -export * from "./usager-nom-complet.pipe"; diff --git a/packages/portail-usagers/src/app/modules/usager-account/pipes/nl2br.pipe.ts b/packages/portail-usagers/src/app/modules/usager-account/pipes/nl2br.pipe.ts deleted file mode 100644 index 6f1053bc0b..0000000000 --- a/packages/portail-usagers/src/app/modules/usager-account/pipes/nl2br.pipe.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Pipe, PipeTransform } from "@angular/core"; -@Pipe({ name: "nl2br", standalone: true }) -export class ReplaceLineBreaks implements PipeTransform { - public transform(value: string): string { - return value.replace(/\n/g, ""); - } -} diff --git a/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts b/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts index e0de73c33f..b7ff032c68 100644 --- a/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts +++ b/packages/portail-usagers/src/app/modules/usager-account/usager-account.module.ts @@ -5,26 +5,27 @@ import { CommonModule } from "@angular/common"; import { UsagerAccountRoutingModule } from "./usager-account-routing.module"; import { HomeUsagerComponent } from "./components/home-usager/home-usager.component"; import { SectionCourriersComponent } from "./components/home-usager/sections/section-courriers/section-courriers.component"; -import { SectionInfosComponent } from "./components/home-usager/sections/section-infos/section-infos.component"; import { SectionOptionsComponent } from "./components/home-usager/sections/section-options/section-options.component"; import { SharedModule } from "../shared/shared.module"; import { UsagerAcceptCguComponent } from "./components/usager-accept-cgu/usager-accept-cgu.component"; import { GeneralModule } from "../general/general.module"; import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { HistoriqueCourriersComponent } from "./components/historique-courriers/historique-courriers.component"; -import { ReplaceLineBreaks } from "./pipes/nl2br.pipe"; import { NgbPagination } from "@ng-bootstrap/ng-bootstrap"; -import { StructureInformationComponent } from "./components/structure-information/structure-information.component"; +import { StructureInformationComponent } from "./components/home-usager/sections/structure-information/structure-information.component"; +import { SectionLinksComponent } from "./components/home-usager/sections/section-links/section-links.component"; +import { SectionInfosComponent } from "./components/home-usager/sections/section-infos/section-infos.component"; +import { FormatInternationalPhoneNumberPipe } from "./pipes"; @NgModule({ declarations: [ HomeUsagerComponent, - SectionInfosComponent, SectionCourriersComponent, SectionOptionsComponent, UsagerAcceptCguComponent, HistoriqueCourriersComponent, StructureInformationComponent, + SectionInfosComponent, ], imports: [ CommonModule, @@ -34,8 +35,9 @@ import { StructureInformationComponent } from "./components/structure-informatio FormsModule, ReactiveFormsModule, FontAwesomeModule, - ReplaceLineBreaks, NgbPagination, + SectionLinksComponent, + FormatInternationalPhoneNumberPipe, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }) diff --git a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.css b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.css deleted file mode 100644 index a318c17625..0000000000 --- a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.css +++ /dev/null @@ -1,3 +0,0 @@ -.form-check-label { - width: 90%; -} diff --git a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.scss b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.scss new file mode 100644 index 0000000000..6242e643cd --- /dev/null +++ b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.scss @@ -0,0 +1,15 @@ +.form-check-label { + width: 90%; +} + +.indications div { + padding-top: 5px; +} + +.indications { + padding: 5px; +} + +.indications .ng-fa-icon { + margin-right: 5px; +} diff --git a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts index be83a04dba..9f9415a0b5 100644 --- a/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts +++ b/packages/portail-usagers/src/app/modules/usager-auth/usager-login/usager-login.component.ts @@ -21,7 +21,7 @@ import { @Component({ selector: "app-usager-login", - styleUrls: ["./usager-login.component.css"], + styleUrls: ["./usager-login.component.scss"], templateUrl: "./usager-login.component.html", }) export class UsagerLoginComponent implements OnInit, OnDestroy { diff --git a/packages/portail-usagers/src/assets/css/bootstrap-custom.css b/packages/portail-usagers/src/assets/css/bootstrap-custom.css deleted file mode 100644 index bad0a56d7c..0000000000 --- a/packages/portail-usagers/src/assets/css/bootstrap-custom.css +++ /dev/null @@ -1,123 +0,0 @@ -.alert { - position: relative; - display: flex; - align-items: left; - justify-content: left; - word-break: break-all; -} - -.alert p { - margin: 0 0; -} - -.alert .svg-icon { - display: table-cell; - margin-right: 10px; - width: 35px; - height: 35px; - padding: 6px; - box-sizing: border-box; - -webkit-mask-size: 98%; - mask-size: 98%; -} - -.alert div, -.alert span { - padding-left: 5px; - flex-shrink: 1; - align-self: center; -} - -.close { - opacity: 1 !important; -} - -.modal-title { - font-style: normal; - font-weight: bold; - font-size: 1.4rem; - margin-bottom: 0.2rem; - margin-top: 0.2rem; -} - -.alert-warning .svg-icon { - background-color: #f0870c; -} - -.alert-danger .svg-icon { - background-color: #f00c0c; -} - -.alert-success { - color: #155724; - background-color: #d4edda; - border-color: #c3e6cb; -} - -.alert-success hr { - border-top-color: #b1dfbb; -} - -.alert-success .alert-link { - color: #0b2e13; -} - -.alert-info { - color: #000000; - background-color: #e1ecff; - border-color: #a4c7ff; -} - -.alert-info hr { - border-color: #a4c7ff; -} -.alert-info .svg-icon { - background-color: var(--bs-primary); -} - -.alert-info .alert-link { - color: #062c33; -} - -.alert-warning { - color: black; - background-color: #fff9f4; - border-color: #ffe1c6; -} - -.alert-warning hr { - border-top-color: #ffe1c6; -} - -.alert-warning .alert-link { - color: #533f03; -} - -.alert-danger { - color: black; - background-color: #fff4f5; - border-color: #ffcccf; -} - -.alert-danger hr { - border-top-color: #f1b0b7; -} - -.alert-danger .alert-link { - color: #491217; -} - -#modal-title { - font-style: normal; - font-weight: bold; - font-size: 1.4rem; - margin-bottom: 0.2rem; - margin-top: 0.2rem; -} - -@media (min-width: 576px) { - .modal-dialog { - max-width: 720px; - margin: 1.75rem auto; - } -} diff --git a/packages/portail-usagers/src/assets/css/forms.css b/packages/portail-usagers/src/assets/css/forms.css index 5bf13e08bd..c9105b67f7 100644 --- a/packages/portail-usagers/src/assets/css/forms.css +++ b/packages/portail-usagers/src/assets/css/forms.css @@ -33,19 +33,6 @@ form label { font-size: 0.95rem; color: var(--bs-danger); } - -.indications div { - padding-top: 5px; -} - -.indications { - padding: 5px; -} - -.indications .ng-fa-icon { - margin-right: 5px; -} - .modal-body .form-check { padding: 0 0 0 1.75rem; cursor: pointer; @@ -67,19 +54,13 @@ form label { margin: 0 !important; } -.btn-light-primary { - background-color: #ffffff; - color: #4164f5; - border-radius: 3px; -} - .btn-white-primary { background-color: #ffffff; color: #4164f5; box-shadow: 0 2px 2px #2f4ece; border-radius: 3px; } -.btn-light-primary:hover, + .btn-white-primary:hover { background-color: #e7e7e7; color: #2444c5; diff --git a/packages/portail-usagers/src/assets/css/main.scss b/packages/portail-usagers/src/assets/css/main.scss index 267fd83bf0..8b360ece76 100644 --- a/packages/portail-usagers/src/assets/css/main.scss +++ b/packages/portail-usagers/src/assets/css/main.scss @@ -21,10 +21,6 @@ html { padding-left: 1rem !important; } -.container { - max-width: 1350px; -} - .modal-backdrop.show { opacity: 0.75; } @@ -74,7 +70,6 @@ html { font-style: normal; font-weight: bold; font-size: 1.35rem; - padding: 0 0.8rem; color: var(--bs-primary); } @@ -110,3 +105,127 @@ html { background-color: white; border-radius: 3px; } + +.alert { + position: relative; + display: flex; + align-items: left; + justify-content: left; + word-break: break-word; + padding: 0.75rem; + + div, + span { + padding-left: 5px; + flex-shrink: 1; + align-self: center; + } + p { + margin: auto 0 !important; + } + + .svg-icon { + display: table-cell; + margin-right: 10px; + width: 35px; + height: 35px; + padding: 6px; + box-sizing: border-box; + -webkit-mask-size: 98%; + mask-size: 98%; + } +} + +.close { + opacity: 1 !important; +} + +.modal-title { + font-style: normal; + font-weight: bold; + font-size: 1.4rem; + margin-bottom: 0.2rem; + margin-top: 0.2rem; +} + +.alert-warning .svg-icon { + background-color: #f0870c; +} + +.alert-danger .svg-icon { + background-color: #f00c0c; +} + +.alert-success { + color: #155724; + background-color: #d4edda; + border-color: #c3e6cb; +} + +.alert-success hr { + border-top-color: #b1dfbb; +} + +.alert-success .alert-link { + color: #0b2e13; +} + +.alert-info { + color: #000000; + background-color: #e1ecff; + border-color: #a4c7ff; +} + +.alert-info hr { + border-color: #a4c7ff; +} +.alert-info .svg-icon { + background-color: var(--bs-primary); +} + +.alert-info .alert-link { + color: #062c33; +} + +.alert-warning { + color: black; + background-color: #fff9f4; + border-color: #ffe1c6; +} + +.alert-warning hr { + border-top-color: #ffe1c6; +} + +.alert-warning .alert-link { + color: #533f03; +} + +.alert-danger { + color: black; + background-color: #fff4f5; + border-color: #ffcccf; +} + +.alert-danger hr { + border-top-color: #f1b0b7; +} + +.alert-danger .alert-link { + color: #491217; +} + +#modal-title { + font-style: normal; + font-weight: bold; + font-size: 1.4rem; + margin-bottom: 0.2rem; + margin-top: 0.2rem; +} + +@media (min-width: 576px) { + .modal-dialog { + max-width: 720px; + margin: 1.75rem auto; + } +} diff --git a/packages/portail-usagers/src/assets/images/partenaires/mes-droits-sociaux.png b/packages/portail-usagers/src/assets/images/partenaires/mes-droits-sociaux.png new file mode 100644 index 0000000000..0935d3894c Binary files /dev/null and b/packages/portail-usagers/src/assets/images/partenaires/mes-droits-sociaux.png differ diff --git a/packages/portail-usagers/src/assets/images/partenaires/soliguide.png b/packages/portail-usagers/src/assets/images/partenaires/soliguide.png new file mode 100644 index 0000000000..b887ea0ab1 Binary files /dev/null and b/packages/portail-usagers/src/assets/images/partenaires/soliguide.png differ diff --git a/packages/portail-usagers/src/index.html b/packages/portail-usagers/src/index.html index fd64e6fe57..1585a594ca 100644 --- a/packages/portail-usagers/src/index.html +++ b/packages/portail-usagers/src/index.html @@ -56,8 +56,8 @@ - +