Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client
1 result
Show changes
Commits on Source (65)
Showing
with 260 additions and 641 deletions
......@@ -30,37 +30,29 @@ More reading on checklists can be found in the "Checklist Manifesto": http://atu
### Quality [![Bugs](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=bugs&token=36de9e39a5b4d878b9682146cdd3da5bf3777810)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) - [![Code Smells](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=code_smells&token=36de9e39a5b4d878b9682146cdd3da5bf3777810)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
* [ ] Confirmed
- For the code that this change impacts, I believe that the **automated tests validate functionality** that is **highly important to users**. If the existing automated tests do not cover this functionality, I have **added the necessary additional tests** or I have added an issue to describe the automation testing gap and linked it to this MR.
- I have made sure that the **sonar quality coverage is up to standards**.
- I have **considered the impact** of this change on the **front-end**, **back-end**, and **database** portions of the system where appropriate and applied.
- I have tested this MR in **all supported browsers** or determined that this testing is not needed.
- I have confirmed that this change is **backwards compatible** across updates (migrate up needs a migrate down), or I have decided that this does not apply.
1. For the code that this change impacts, I believe that the automated tests validate functionality that is highly important to users. If the existing automated tests do not cover this functionality, I have added the necessary additional tests or I have added an issue to describe the automation testing gap and linked it to this MR.
1. I have made sure that the sonar quality coverage is up to standards.
1. I have considered the impact of this change on the front-end, back-end, and database portions of the system where appropriate and applied.
1. I have tested this MR in all supported browsers or determined that this testing is not needed.
1. I have confirmed that this change is backwards compatible across updates (migrate up needs a migrate down), or I have decided that this does not apply.
### Performance, reliability and availability
* [ ] Confirmed
- I am confident that this MR **does not harm performance**, or I have asked a reviewer to help assess the performance impact.
- I have considered the **scalability risk** based on future predicted growth.
1. I am confident that this MR does not harm performance, or I have asked a reviewer to help assess the performance impact.
1. I have considered the scalability risk based on future predicted growth.
### Documentation
* [ ] Confirmed
1. The MR is named after the desired squash commit to feed the changelog linked to the current milestone.
1. I have added/updated documentation (also updated if the changes feature a deprecation) or I have decided that documentation changes are not needed for this MR.
- The MR is named after the **desired squash commit** to feed the changelog linked to the current milestone.
- I have **added/updated documentation** (also updated if the changes feature a deprecation) or I have decided that documentation changes are not needed for this MR.
### Security [![Security Rating](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=security_rating&token=36de9e39a5b4d878b9682146cdd3da5bf3777810)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
* [ ] Confirmed
1. I have confirmed that if this MR does not contains any sensitive informations hidden in the changes.
- I have confirmed that if this MR **does not contains any sensitive informations** hidden in the changes.
### Deployment
* [ ] Confirmed
1. When featured on a self-data project release, i have made sure my app version in the manifest and package.json is incremented and any relative changes to the permissions are clearly written and transmitted to Cozy.
- When featured on a self-data project release, I have made sure my **app version** in the manifest and package.json is **incremented** and any relative **changes to the permissions are clearly written and transmitted to Cozy**.
......@@ -2,6 +2,34 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.0.0-beta4](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/compare/v2.0.0-beta2.2...v2.0.0-beta4) (2022-10-31)
### Features
* about us link in footer ([c82d95c](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/c82d95ccba5036d6d14b26896858d221bb9df60f))
* **carto:** add structure type icon to search result ([78593d3](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/78593d300375fe71af475e001efcbf9e6fb2b864))
* **carto:** print carto results ([d607f22](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/d607f22da337f7bce7288b33ceaa7c2ac40c950b))
* **orientation:** Add online mediation + base tunnel ([cfcbb0c](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/cfcbb0c18345e4d5416f60a582076b2ed389f957))
* **orientation:** Ask for connexion if unlogged ([9552a29](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/9552a29d90e272e0f740e4ab6f574efd842203cf))
* **referential:** new referential, structure format and filters ([f477e0a](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/f477e0af8d7d86e3bc3c2b8dd76450299fe1bad1))
* removed footer on orientation and admin pages ([2343c6a](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/2343c6aa00810875e9f99607ff506f0738693378))
* structure icon depends on structure category (public, private, ...) ([2d961e6](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/2d961e646f97855e70c88a53dc104d8eaf26a9ec))
* updated Metropole logo ([b865045](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/b8650455bfb20d2c0931641bfcb3c01d09649969))
### Bug Fixes
* Add no member placeholder in edition ([fd72db0](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/fd72db027c3ebbc73127256bf9bdf8af3c8795c9))
* alphabetical sort ([1179f55](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/1179f55ea1c42059203a152c8c0c0c661ff912e4))
* **carto:** redirect to carto after structure close ([bcb1fe6](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/bcb1fe61e06f8f0742772c2983011233a5ddc933))
* create structure dto ([e014868](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/e0148681372d46b30a08a63795b54b91baaaf4a6))
* **deps:** update dependency @ngx-translate/core to v14 ([fe3a137](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/fe3a13719cc55a43d43da7ab08c0f59ce3d24798))
* **deps:** update dependency ngx-toastr to v15 ([c1a774a](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/c1a774a0b537ea774cadb5ddd3080030bf75bef6))
* design review ([a776a42](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/a776a42fb3463f9c5493a691a115a2c15366ecc3))
* update protection on display and fix data share consent edit ([6cbd03f](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/6cbd03fa745707eacc7847a60fb6386e811a2d99))
* wording and loader ([0ef697e](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/0ef697ef98e5e3867637f4e3208ecd5ccf28e7e9))
## [2.0.0-beta2.2](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/compare/v2.0.0-beta2.1...v2.0.0-beta2.2) (2022-10-03)
......
[![Quality Gate Status](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=alert_status)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
[![Bugs](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=bugs)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
[![Lines of Code](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=ncloc)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
[![Maintainability Rating](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=sqale_rating)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
[![Security Rating](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=security_rating)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
[![Vulnerabilities](https://sonarqube.forge.grandlyon.com/api/project_badges/measure?project=pamn_client&metric=vulnerabilities)](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client)
# Res'In Client
# Pamn
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.3.
## Wikis
## [Wikis](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/-/wikis/home)
Find [here](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/-/wikis/home) wikis about useful informations like installation and gitflow.
......@@ -29,10 +20,6 @@ Run `npm run build:dev` to build the project. The build artifacts will be stored
Run `npm run test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `npm run e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Contributing
Use conventional commit format. For more info please read this article on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
......
......@@ -193,5 +193,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}
This diff is collapsed.
{
"name": "pamn",
"version": "2.0.0-beta2.1",
"version": "2.0.0-beta2.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -9667,11 +9667,11 @@
"dev": true
},
"@ngx-translate/core": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-13.0.0.tgz",
"integrity": "sha512-+tzEp8wlqEnw0Gc7jtVRAJ6RteUjXw6JJR4O65KlnxOmJrCGPI0xjV/lKRnQeU0w4i96PQs/jtpL921Wrb7PWg==",
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-14.0.0.tgz",
"integrity": "sha512-UevdwNCXMRCdJv//0kC8h2eSfmi02r29xeE8E9gJ1Al4D4jEJ7eiLPdjslTMc21oJNGguqqWeEVjf64SFtvw2w==",
"requires": {
"tslib": "^2.0.0"
"tslib": "^2.3.0"
}
},
"@nodelib/fs.scandir": {
......@@ -17146,9 +17146,9 @@
"dev": true
},
"jasmine-spec-reporter": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-5.0.2.tgz",
"integrity": "sha512-6gP1LbVgJ+d7PKksQBc2H0oDGNRQI3gKUsWlswKaQ2fif9X5gzhQcgM5+kiJGCQVurOG09jqNhk7payggyp5+g==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-7.0.0.tgz",
"integrity": "sha512-OtC7JRasiTcjsaCBPtMO0Tl8glCejM4J4/dNuOJdA8lBjz4PmWjYQ6pzb0uzpBNAWJMDudYuj9OdXJWqM2QTJg==",
"dev": true,
"requires": {
"colors": "1.4.0"
......@@ -19197,17 +19197,25 @@
}
},
"karma-browserify": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/karma-browserify/-/karma-browserify-7.0.0.tgz",
"integrity": "sha512-SLgh1dmF2eZEj3glrmTD2CMJRGZwEiKA6k2hBr2+2JDC4JMU1dlsvBKpV66Lvi/tbj3H9qA+Vl/FdIcfPRrJpA==",
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/karma-browserify/-/karma-browserify-8.1.0.tgz",
"integrity": "sha512-q5OWuCfdXMfyhkRrH8XP5LiixD4lx0uCmlf6yQmGeQNHLH4Hoofur3tBJtSEhOXmY0mOdBe8ek2UUxicjmGqFQ==",
"dev": true,
"requires": {
"convert-source-map": "^1.1.3",
"convert-source-map": "^1.8.0",
"hat": "^0.0.3",
"js-string-escape": "^1.0.0",
"lodash": "^4.17.14",
"lodash": "^4.17.21",
"minimatch": "^3.0.0",
"os-shim": "^0.1.3"
},
"dependencies": {
"convert-source-map": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
"dev": true
}
}
},
"karma-chrome-launcher": {
......@@ -19233,26 +19241,18 @@
}
},
"karma-jasmine": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-4.0.1.tgz",
"integrity": "sha512-h8XDAhTiZjJKzfkoO1laMH+zfNlra+dEQHUAjpn5JV1zCPtOIVWGQjLBrqhnzQa/hrU2XrZwSyBa6XjEBzfXzw==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz",
"integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==",
"dev": true,
"requires": {
"jasmine-core": "^3.6.0"
},
"dependencies": {
"jasmine-core": {
"version": "3.99.1",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.99.1.tgz",
"integrity": "sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==",
"dev": true
}
"jasmine-core": "^4.1.0"
}
},
"karma-jasmine-html-reporter": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.5.4.tgz",
"integrity": "sha512-PtilRLno5O6wH3lDihRnz0Ba8oSn0YUJqKjjux1peoYGwo0AQqrWRbdWk/RLzcGlb+onTyXAnHl6M+Hu3UxG/Q==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.0.0.tgz",
"integrity": "sha512-SB8HNNiazAHXM1vGEzf8/tSyEhkfxuDdhYdPBX2Mwgzt0OuF2gicApQ+uvXLID/gXyJQgvrM9+1/2SxZFUUDIA==",
"dev": true
},
"karma-source-map-support": {
......@@ -20360,11 +20360,11 @@
}
},
"ngx-toastr": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-13.2.1.tgz",
"integrity": "sha512-UAzp7/xWK9IXA2LsOmhpaaIGCqscvJokoQpBNpAMrjEkDeSlFf8PWQAuQY795KW0mJb3qF9UG/s23nsXfMYKmg==",
"version": "15.2.1",
"resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-15.2.1.tgz",
"integrity": "sha512-Fyik8+sTbmX4NftVWWd3SIaeH8qlRU0emAfpey/AXsXuUEXgOOXKKnVPLmMAK7XL7xLy0c/+UsYBwlPK4TJcmA==",
"requires": {
"tslib": "^2.0.0"
"tslib": "^2.3.0"
}
},
"nice-napi": {
{
"name": "pamn",
"version": "2.0.0-beta2.2",
"version": "2.0.0-beta4",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=fr --proxy-config proxy.conf.json",
......@@ -29,7 +29,7 @@
"@angular/router": "^14.2.1",
"@angular/service-worker": "^14.2.1",
"@asymmetrik/ngx-leaflet": "^8.1.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/core": "^14.0.0",
"ag-grid-angular": "^26.2.0",
"ag-grid-community": "^26.2.1",
"jwt-decode": "^3.1.2",
......@@ -37,7 +37,7 @@
"leaflet.locatecontrol": "^0.76.0",
"lodash": "^4.17.21",
"luxon": "^1.25.0",
"ngx-toastr": "^13.2.1",
"ngx-toastr": "^15.0.0",
"rxjs": "~6.6.0",
"tslib": "^2.4.0",
"zone.js": "~0.11.4"
......@@ -67,15 +67,15 @@
"eslint-plugin-jest": "^26.2.2",
"http-server": "^14.1.0",
"jasmine-core": "~4.1.0",
"jasmine-spec-reporter": "~5.0.0",
"jasmine-spec-reporter": "~7.0.0",
"jest": "^27.5.1",
"jest-preset-angular": "^11.1.2",
"karma": "^6.4.0",
"karma-browserify": "^7.0.0",
"karma-browserify": "^8.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-jasmine-html-reporter": "^2.0.0",
"karma-jasmine": "~5.1.0",
"ng-packagr": "^14.2.1",
"prettier": "^2.1.2",
"protractor": "~7.0.0",
......
......@@ -29,7 +29,7 @@
*ngIf="validatedJobs && validatedEmployers"
class="ag-theme-alpine user-table"
[rowData]="unAttachedUsers"
[columnDefs]="columnDefs"
[columnDefs]="columnDefsUnattached"
rowSelection="multiple"
domLayout="autoHeight"
[getRowHeight]="getRowHeight"
......
......@@ -37,6 +37,7 @@ export class ManageUsersComponent {
public contextRow: any;
public columnDefs;
public columnDefsUnattached;
public frameworkComponents;
public defaultColDef = {
editable: true,
......@@ -122,6 +123,15 @@ export class ManageUsersComponent {
cellStyle: { 'text-align': 'center' },
},
];
this.columnDefsUnattached = [...this.columnDefs];
this.columnDefsUnattached = this.columnDefsUnattached.filter((item) =>
String(item.headerName).toLowerCase().indexOf('structure')
);
this.columnDefsUnattached.splice(this.columnDefsUnattached.length - 1, 0, {
headerName: 'Non rattaché depuis',
field: 'unattachedSince',
minWidth: 180,
});
this.frameworkComponents = {
deleteUserComponent: DeleteUserComponent,
jobRenderer: JobRenderer,
......
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { UserAnnuary } from '../models/user.model';
import { AuthService } from '../services/auth.service';
import { SearchService } from '../structure-list/services/search.service';
......@@ -18,6 +18,10 @@ export class AnnuaireComponent {
public nextPage: number = 1;
public filterActive: boolean = false;
ngOnInit(): void {
this.getUsers({ queryParam: '', page: 1, jobFilters: [], employerFilters: [] });
}
public getUsers(params: SearchQuery): void {
if (this.userIsLoggedIn()) {
this.searchService.annuaireSearchQuery = params;
......
......@@ -47,7 +47,13 @@
<div class="results unlogged" *ngIf="!isLogged">
<img src="../../assets/ico/annuaire-unlogged.svg" alt="Illustration annuaire" />
<div class="users">{{ totalUserResult }} utilisateurs sont présents dans l'annuaire Rés'in</div>
<div class="users" [ngPlural]="totalUserResult">
<ng-template ngPluralCase="0">Aucun utilisateur n'est présent dans l'annuaire Rés'in</ng-template>
<ng-template ngPluralCase="1">1 utilisateur est présent dans l'annuaire Rés'in</ng-template>
<ng-template ngPluralCase="other"
>{{ totalUserResult }} utilisateurs sont présents dans l'annuaire Rés'in</ng-template
>
</div>
<div class="access">
Pour accéder à l’annuaire de Rés’in et contacter les utilisateurs,<br />
veuillez vous connecter ou vous créer un compte.
......
......@@ -5,10 +5,8 @@ import { CartoComponent } from './carto/carto.component';
import { ContactComponent } from './contact/contact.component';
import { FooterComponent } from './footer/footer.component';
import { StructureListPrintComponent } from './form/orientation-form/component/structure-list-print/structure-list-print.component';
import { OrientationFormComponent } from './form/orientation-form/orientation-form.component';
import { AdminGuard } from './guards/admin.guard';
import { AuthGuard } from './guards/auth.guard';
import { LoginGuard } from './guards/login.guard';
import { LegalNoticeComponent } from './legal-notice/legal-notice.component';
import { LoginComponent } from './login/login.component';
import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsletter-subscription.component';
......@@ -21,6 +19,7 @@ import { StructureDetailsComponent } from './structure-list/components/structure
import { StructureListComponent } from './structure-list/structure-list.component';
import { StructureExcludeComponent } from './structure/structure-exclude/structure-exclude.component';
import { StructureJoinComponent } from './structure/structure-join/structure-join.component';
import { StructureListSearchPrintComponent } from './structure-list/components/structure-list-search-print/structure-list-search-print.component';
const footerOutletRoute: Route = {
path: '',
......@@ -40,14 +39,9 @@ const routes: Routes = [
children: [{ path: 'structures', component: StructureListPrintComponent }, footerOutletRoute],
},
{
path: 'orientation',
children: [
{
path: '',
component: OrientationFormComponent,
},
footerOutletRoute,
],
path: 'print',
outlet: 'print',
children: [{ path: 'structures-search', component: StructureListSearchPrintComponent }, footerOutletRoute],
},
{
path: 'acteurs',
......@@ -60,6 +54,9 @@ const routes: Routes = [
path: '',
outlet: 'left-pane',
component: StructureDetailsComponent,
resolve: {
structure: StructureResolver,
},
},
],
},
......@@ -146,6 +143,9 @@ const routes: Routes = [
outlet: 'left-pane',
data: { fullScreen: true },
component: StructureDetailsComponent,
resolve: {
structure: StructureResolver,
},
},
],
},
......@@ -168,7 +168,7 @@ const routes: Routes = [
children: [
{
path: '',
canActivate: [LoginGuard],
canActivate: [AuthGuard],
component: StructureExcludeComponent,
},
footerOutletRoute,
......@@ -236,13 +236,16 @@ const routes: Routes = [
canActivate: [AdminGuard],
loadChildren: () => import('./admin/admin.module').then((m) => m.AdminModule),
},
footerOutletRoute,
],
},
{
path: 'form',
loadChildren: () => import('./form/form-view/form-view.module').then((m) => m.FormViewModule),
},
{
path: 'orientation',
loadChildren: () => import('./form/orientation-form-view/orientation.module').then((m) => m.OrientationModule),
},
{
path: 'home',
redirectTo: 'news',
......
import { LOCALE_ID, NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr';
import { AppRoutingModule } from './app-routing.module';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import { AnnuaireComponent } from './annuaire/annuaire.component';
import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component';
import { ResultListComponent } from './annuaire/result-list/result-list.component';
import { SearchBarComponent } from './annuaire/search-bar/search-bar.component';
import { AppComponent } from './app.component';
import { CartoComponent } from './carto/carto.component';
import { CustomBreakPointsProvider } from './config/custom-breakpoint';
import { CustomHttpInterceptor } from './config/http-interceptor';
import { ContactComponent } from './contact/contact.component';
import { FooterComponent } from './footer/footer.component';
import { FormViewModule } from './form/form-view/form-view.module';
import { OrientationModule } from './form/orientation-form-view/orientation.module';
import { OrientationComponent } from './form/orientation-form/component/orientation-modal/orientation-modal.component';
import { StructureDetailPrintComponent } from './form/orientation-form/component/structure-detail-print/structure-detail-print.component';
import { StructureListPrintComponent } from './form/orientation-form/component/structure-list-print/structure-list-print.component';
import { StructurePrintHeaderComponent } from './form/orientation-form/component/structure-print-header/structure-print-header.component';
import { OrientationFormComponent } from './form/orientation-form/orientation-form.component';
import { AdminGuard } from './guards/admin.guard';
import { AuthGuard } from './guards/auth.guard';
import { DeactivateGuard } from './guards/deactivate.guard';
import { RoleGuard } from './guards/role.guard';
import { HeaderComponent } from './header/header.component';
import { SharedModule } from './shared/shared.module';
import { MapModule } from './map/map.module';
import { StructureListComponent } from './structure-list/structure-list.component';
import { CardComponent } from './structure-list/components/card/card.component';
import { StructureListSearchComponent } from './structure-list/components/structure-list-search/structure-list-search.component';
import { StructureDetailsComponent } from './structure-list/components/structure-details/structure-details.component';
import { ModalFilterComponent } from './structure-list/components/modal-filter/modal-filter.component';
import { LegalNoticeComponent } from './legal-notice/legal-notice.component';
import { LoginComponent } from './login/login.component';
import { MapModule } from './map/map.module';
import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsletter-subscription.component';
import { PageComponent } from './page/page.component';
import { ContactComponent } from './contact/contact.component';
import { AuthGuard } from './guards/auth.guard';
import { LoginGuard } from './guards/login.guard';
import { CustomHttpInterceptor } from './config/http-interceptor';
import { ResetEmailComponent } from './reset-email/reset-email.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
import { AdminGuard } from './guards/admin.guard';
import { DeactivateGuard } from './guards/deactivate.guard';
import { StructureResolver } from './resolvers/structure.resolver';
import { TempUserResolver } from './resolvers/temp-user.resolver';
import { StructureJoinComponent } from './structure/structure-join/structure-join.component';
import { RouterListenerService } from './services/routerListener.service';
import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsletter-subscription.component';
import { OrientationFormComponent } from './form/orientation-form/orientation-form.component';
import { StructureDetailPrintComponent } from './form/orientation-form/component/structure-detail-print/structure-detail-print.component';
import { StructureListPrintComponent } from './form/orientation-form/component/structure-list-print/structure-list-print.component';
import { StructurePrintHeaderComponent } from './form/orientation-form/component/structure-print-header/structure-print-header.component';
import { OrientationComponent } from './form/orientation-form/component/orientation-modal/orientation-modal.component';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import { StructureResolver } from './resolvers/structure.resolver';
import { RoleGuard } from './guards/role.guard';
import { UpdateService } from './services/update.service';
import { DataShareConsentComponent } from './shared/components/data-share-consent/data-share-consent.component';
import { FormViewModule } from './form/form-view/form-view.module';
import { LoginComponent } from './login/login.component';
import { SharedModule } from './shared/shared.module';
import { CardComponent } from './structure-list/components/card/card.component';
import { ModalFilterComponent } from './structure-list/components/modal-filter/modal-filter.component';
import { StructureDetailsComponent } from './structure-list/components/structure-details/structure-details.component';
import { StructureListSearchPrintComponent } from './structure-list/components/structure-list-search-print/structure-list-search-print.component';
import { StructureListSearchComponent } from './structure-list/components/structure-list-search/structure-list-search.component';
import { StructureListComponent } from './structure-list/structure-list.component';
import { StructureExcludeComponent } from './structure/structure-exclude/structure-exclude.component';
import { AnnuaireComponent } from './annuaire/annuaire.component';
import { SearchBarComponent } from './annuaire/search-bar/search-bar.component';
import { ResultListComponent } from './annuaire/result-list/result-list.component';
import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component';
import { StructureJoinComponent } from './structure/structure-join/structure-join.component';
@NgModule({
declarations: [
......@@ -81,6 +82,7 @@ import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.compo
SearchBarComponent,
ResultListComponent,
FilterModalComponent,
StructureListSearchPrintComponent,
],
imports: [
BrowserModule,
......@@ -91,6 +93,7 @@ import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.compo
BrowserAnimationsModule,
ToastrModule.forRoot(),
FormViewModule,
OrientationModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: environment.production,
}),
......@@ -102,7 +105,6 @@ import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.compo
AuthGuard,
AdminGuard,
RoleGuard,
LoginGuard,
DeactivateGuard,
TempUserResolver,
StructureResolver,
......
......@@ -15,7 +15,7 @@ import { Observable } from 'rxjs';
@Component({
selector: 'app-carto',
templateUrl: './carto.component.html',
styleUrls: ['./carto.component.scss']
styleUrls: ['./carto.component.scss'],
})
export class CartoComponent implements OnInit {
public filters: Filter[] = [];
......@@ -54,7 +54,7 @@ export class CartoComponent implements OnInit {
this.meta.updateTag({
name: 'description',
content: 'Recense tous les lieux, accompagnements et ateliers de médiation numérique de la Métropole de Lyon.'
content: 'Recense tous les lieux, accompagnements et ateliers de médiation numérique de la Métropole de Lyon.',
});
}
......@@ -105,7 +105,12 @@ export class CartoComponent implements OnInit {
* @param lat user latitde
* @param sortByDistance if set to `true`, structures data is sort by distance. Default value is `true`
*/
private updateStructuresdistance(structures: Structure[], lon: number, lat: number, sortByDistance: boolean = true): void {
private updateStructuresdistance(
structures: Structure[],
lon: number,
lat: number,
sortByDistance: boolean = true
): void {
Promise.all(
structures.map(async (structure) => {
if (this.geolocation) {
......@@ -125,7 +130,7 @@ export class CartoComponent implements OnInit {
}
/**
* Retrive GeoJson for a given address
* Retrieve GeoJson for a given address
* @param address string
*/
private getCoordByAddress(address: string): Promise<GeoJson> {
......@@ -154,7 +159,10 @@ export class CartoComponent implements OnInit {
* @param lat number
*/
private getStructurePosition(structure: Structure, lon: number, lat: number): Structure {
structure.distance = parseInt(this.geoJsonService.getDistance(structure.getLat(), structure.getLon(), lat, lon, 'M'), 10);
structure.distance = parseInt(
this.geoJsonService.getDistance(structure.getLat(), structure.getLon(), lat, lon, 'M'),
10
);
return structure;
}
......
......@@ -5,6 +5,7 @@
<a class="clickable text-align-center" routerLink="/newsletter" i18n>Newsletter</a>
<!-- <a class="clickable text-align-center" routerLink="/sitemap" i18n>Plan du site</a> -->
<a class="clickable text-align-center" routerLink="/contact" i18n>Contact</a>
<a class="clickable text-align-center" routerLink="/page/qui-sommes-nous" i18n>Qui sommes-nous ?</a>
</div>
<a
class="metro-link"
......
......@@ -100,13 +100,14 @@ export class FooterFormComponent implements OnChanges {
* Check if trainings are selected in order to ask for pricing
*/
public isTrainingsSelected(): boolean {
return (
this.form.value.accessRight.length > 0 ||
this.form.value.baseSkills.length > 0 ||
this.form.value.digitalCultureSecurity.length > 0 ||
this.form.value.parentingHelp.length > 0 ||
this.form.value.socialAndProfessional.length > 0
);
return this.form.value.categories.baseSkills.length > 0 || this.form.value.categories.advancedSkills.length > 0;
}
/**
* Check if trainings are selected in order to ask for pricing
*/
public isOtherAccompanimentSelected(): boolean {
return this.form.value.categories?.onlineProcedures.find((el) => el === 'autres') ? true : false;
}
public prevPage(): void {
......@@ -123,6 +124,14 @@ export class FooterFormComponent implements OnChanges {
}
return;
}
if (this.currentStep === structureFormStep.structureTrainingType) {
if (this.isOtherAccompanimentSelected()) {
this.changeCurrentStep.emit(structureFormStep.structureDigitalHelpingAccompanimentOther);
} else {
this.changeCurrentStep.emit(structureFormStep.structureDigitalHelpingAccompaniment);
}
return;
}
this.goToPreviousPage();
} else {
history.back();
......@@ -173,6 +182,15 @@ export class FooterFormComponent implements OnChanges {
}
return;
}
// Check if trainings are selected in order to ask for pricing
if (this.currentStep === structureFormStep.structureDigitalHelpingAccompaniment) {
if (this.isOtherAccompanimentSelected()) {
this.changeCurrentStep.emit(structureFormStep.structureDigitalHelpingAccompanimentOther);
} else {
this.changeCurrentStep.emit(structureFormStep.structureTrainingType);
}
return;
}
if (this.currentStep === structureFormStep.structureContactCompletion) {
//TODO Go to send mail page and send the mail
return;
......
......@@ -5,8 +5,8 @@
(closed)="hasRedirectionAccepted($event)"
></app-modal-confirmation>
<app-progress-bar
*ngIf="!isEditMode"
[formType]="formType[routeParam]"
[isEditMode]="isEditMode"
[currentPage]="currentPage - 1"
[nbSteps]="nbSteps"
></app-progress-bar>
......
......@@ -14,14 +14,13 @@
max-width: 980px;
width: 100%;
height: 100%;
margin: auto;
margin: 1rem auto;
overflow-y: auto;
color: $grey-1;
background: $white;
border-radius: 8px;
border: 1px solid $grey-6;
padding: 32px 48px;
@media #{$tablet} {
margin: 0px 4px;
width: auto;
......@@ -31,6 +30,7 @@
}
.no-max-width {
max-width: none;
height: 100%;
}
.missing-information {
display: flex;
......@@ -57,6 +57,11 @@
@include lato-bold-22;
}
}
h4 {
@include lato-bold-18;
margin-bottom: 0;
}
p {
@include lato-regular-18;
color: $grey-3;
......
import { Component, OnInit } from '@angular/core';
import { AfterViewInit, ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { forkJoin, of } from 'rxjs';
......@@ -26,7 +26,7 @@ import { structureFormStep } from './structure-form/structureFormStep.enum';
templateUrl: './form-view.component.html',
styleUrls: ['./form-view.component.scss'],
})
export class FormViewComponent implements OnInit {
export class FormViewComponent implements OnInit, AfterViewInit {
public routeParam: string;
public formType = formType;
public currentPage: stepType;
......@@ -83,9 +83,14 @@ export class FormViewComponent implements OnInit {
private profileService: ProfileService,
private structureService: StructureService,
private personalOfferService: PersonalOfferService,
private notificationService: NotificationService
private notificationService: NotificationService,
private cdRef: ChangeDetectorRef
) {}
ngAfterViewInit(): void {
this.cdRef.detectChanges();
}
async ngOnInit(): Promise<void> {
this.routeParam = this.router.routerState.snapshot.url.split('/')[2];
......@@ -97,9 +102,6 @@ export class FormViewComponent implements OnInit {
if (this.profile.structuresLink.length) {
// if register a new user as a new member structure, no structure to choose
this.isRegisterNewMember = true;
this.structureService.getStructure(this.profile.structuresLink[0]).subscribe((structure) => {
this.structure = new Structure(structure);
});
}
}
});
......@@ -165,9 +167,9 @@ export class FormViewComponent implements OnInit {
this.structure = new Structure();
this.structureForm = this.formUtils.createStructureForm(this.structure);
this.currentForm = this.structureForm;
// Init hours form
this.hoursForm = this.formUtils.createHoursForm(this.structure);
}
// Init hours form
this.hoursForm = this.formUtils.createHoursForm(this.structure);
}
if (formType[this.routeParam] === formType.personaloffer) {
this.nbSteps = totalFormSteps;
......@@ -227,13 +229,11 @@ export class FormViewComponent implements OnInit {
private createPersonalOfferForm(personalOffer: PersonalOffer): void {
this.personalOfferForm = new UntypedFormGroup({
publicsAccompaniment: new UntypedFormControl(personalOffer.publicsAccompaniment),
proceduresAccompaniment: new UntypedFormControl(personalOffer.proceduresAccompaniment),
baseSkills: new UntypedFormControl(personalOffer.baseSkills),
accessRight: new UntypedFormControl(personalOffer.accessRight),
digitalCultureSecurity: new UntypedFormControl(personalOffer.digitalCultureSecurity),
socialAndProfessional: new UntypedFormControl(personalOffer.socialAndProfessional),
parentingHelp: new UntypedFormControl(personalOffer.parentingHelp),
categories: new UntypedFormGroup({
onlineProcedures: new UntypedFormControl(personalOffer.categories.onlineProcedures),
baseSkills: new UntypedFormControl(personalOffer.categories.baseSkills),
advancedSkills: new UntypedFormControl(personalOffer.categories.advancedSkills),
}),
});
}
......@@ -340,7 +340,10 @@ export class FormViewComponent implements OnInit {
// if register a new user as a new member structure, no structure to choose
if (this.isRegisterNewMember) {
if (this.profile.job && this.profile.job.hasPersonalOffer) {
this.router.navigateByUrl('form/personaloffer');
this.structureService.getStructure(this.profile.structuresLink[0]).subscribe((structure) => {
this.structure = new Structure(structure);
this.router.navigateByUrl('form/personaloffer');
});
} else {
this.router.navigateByUrl('/profile');
}
......@@ -376,7 +379,7 @@ export class FormViewComponent implements OnInit {
});
}
public setCurrentStep(step: stepType): void {
//THIS PROBABLY CREATES CONSOLE ERRORS NG100 only in dev mode, please refer to https://angular.io/errors/NG0100 for more info
// THIS PROBABLY CREATES CONSOLE ERRORS NG100 only in dev mode, please refer to https://angular.io/errors/NG0100 for more info
this.isPageValid = false;
this.currentPage = step;
}
......@@ -409,7 +412,9 @@ export class FormViewComponent implements OnInit {
};
case structureFormStep.structureAccessModality:
return {
accessModality: this.structureForm.get('accessModality').value,
categories: {
accessModality: this.structureForm.get('categories').get('accessModality').value,
},
};
case structureFormStep.structureHours:
return {
......@@ -429,42 +434,58 @@ export class FormViewComponent implements OnInit {
website: this.structureForm.get('website').value,
};
case structureFormStep.structurePublicTarget:
return { publics: this.structureForm.get('publics').value };
return {
categories: {
age: this.structureForm.get('categories').get('age').value,
languageAndIlliteracy: this.structureForm.get('categories').get('languageAndIlliteracy').value,
handicaps: this.structureForm.get('categories').get('handicaps').value,
publicOthers: this.structureForm.get('categories').get('publicOthers').value,
},
};
case structureFormStep.structureDigitalHelpingAccompanimentOther:
return {
otherDescription: this.structureForm.get('otherDescription').value,
};
case structureFormStep.structureDigitalHelpingAccompaniment:
return {
proceduresAccompaniment: this.structureForm.get('proceduresAccompaniment').value,
categories: {
onlineProcedures: this.structureForm.get('categories').get('onlineProcedures').value,
},
};
case structureFormStep.structureTrainingType:
return {
accessRight: this.structureForm.get('accessRight').value,
baseSkills: this.structureForm.get('baseSkills').value,
digitalCultureSecurity: this.structureForm.get('digitalCultureSecurity').value,
parentingHelp: this.structureForm.get('parentingHelp').value,
socialAndProfessional: this.structureForm.get('socialAndProfessional').value,
categories: {
baseSkills: this.structureForm.get('categories').get('baseSkills').value,
advancedSkills: this.structureForm.get('categories').get('advancedSkills').value,
},
};
case structureFormStep.structureTrainingPrice:
return {
freeWorkShop: this.structureForm.get('freeWorkShop').value,
};
case structureFormStep.structureOtherServices:
return {
categories: {
equipmentsServices: this.structureForm.get('categories').get('equipmentsAndServices').value,
},
};
case structureFormStep.structureWifi:
return {
equipmentsAndServices: this.structureForm.get('equipmentsAndServices').value,
categories: {
selfServiceMaterial: this.structureForm.get('categories').get('selfServiceMaterial').value,
},
};
case structureFormStep.structureEquipments:
return {
nbComputers: this.structureForm.get('nbComputers').value,
nbNumericTerminal: this.structureForm.get('nbNumericTerminal').value,
nbPrinters: this.structureForm.get('nbPrinters').value,
nbScanners: this.structureForm.get('nbScanners').value,
nbTablets: this.structureForm.get('nbTablets').value,
};
case structureFormStep.structureLabels:
return {
labelsQualifications: this.structureForm.get('labelsQualifications').value,
};
case structureFormStep.structureOtherServices:
return {
equipmentsAndServices: this.structureForm.get('equipmentsAndServices').value,
categories: {
labelsQualifications: this.structureForm.get('categories').get('labelsQualifications').value,
},
};
case structureFormStep.structureDescription:
return {
......@@ -486,6 +507,7 @@ export class FormViewComponent implements OnInit {
const exitPages: stepType[] = [
structureFormStep.noStructure,
structureFormStep.structureCreationFinishedInfo,
structureFormStep.mailSentInfo,
profileFormStep.profileJobSelection,
personalOfferFormStep.personalOfferFinishedInfo,
];
......@@ -496,7 +518,7 @@ export class FormViewComponent implements OnInit {
this.isEditMode ||
exitPages.includes(this.currentPage)
) {
return new Promise((resolve) => resolve(true));
return Promise.resolve(true);
} else {
return new Promise((resolve) => this.showModal(resolve));
}
......
......@@ -34,6 +34,7 @@ import { StructureLabelsComponent } from './structure-form/structure-labels/stru
import { StructureNameAndAddressComponent } from './structure-form/structure-name-and-address/structure-name-and-address.component';
import { StructureOtherServicesComponent } from './structure-form/structure-other-services/structure-other-services.component';
import { StructurePmrComponent } from './structure-form/structure-pmr/structure-pmr.component';
import { structureDigitalHelpingAccompanimentOtherComponent } from './structure-form/structure-public-target-other/structure-public-target-other.component';
import { StructurePublicTargetComponent } from './structure-form/structure-public-target/structure-public-target.component';
import { StructureTrainingPriceComponent } from './structure-form/structure-training-price/structure-training-price.component';
import { StructureTrainingTypeComponent } from './structure-form/structure-training-type/structure-training-type.component';
......@@ -66,6 +67,7 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
StructurePmrComponent,
StructureWebAndSocialNetworkComponent,
StructurePublicTargetComponent,
structureDigitalHelpingAccompanimentOtherComponent,
StructureDigitalHelpingAccompanimentComponent,
StructureTrainingPriceComponent,
StructureWifiComponent,
......