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 (64)
Showing
with 17451 additions and 10823 deletions
......@@ -57,3 +57,6 @@ documentation
CHANGELOG.md
package-lock.json
# External libs
/projects
......@@ -18,6 +18,7 @@ build_branch:
DOCKER_DRIVER: overlay2
only:
- merge_requests
- V2.0
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/docker:18.09
stage: build
except:
......
| :triangular_flag_on_post: Give your MR the same name that the desired squash commit. In doubt, check the conventional commit [doc](https://www.conventionalcommits.org/en/v1.0.0/).|
| --- |
## What does this MR do and why?
_Describe in detail what your merge request does and why._
| :warning: Keep an up to date checklist based on your icescrum tasks during all the draft phase to help any other developer who would take the job after you to finish it. |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :warning: Keep an up to date checklist based on your icescrum tasks during all the draft phase of the MR to help any other developer who would take the job after you to finish it.|
| --- |
## Screenshots or screen recordings
_These are strongly recommended to assist reviewers and reduce the time to merge your change._
## How to set up and validate locally (or on alpha)
_List all steps to set up and validate the changes on local environment._
## MR acceptance checklist
_To be completed by the chosen reviewer._
<!---
......@@ -25,11 +27,12 @@ More reading on checklists can be found in the "Checklist Manifesto": http://atu
"It is common to misconceive how checklists function in complex lines of work. They are not comprehensive how-to guides, whether for building a skyscraper or getting a plane out of trouble. They are quick and simple tools aimed to buttress the skills of expert professionals." - Gawande, Atul. The Checklist Manifesto
--->
### Quality
- [ ] Confirmed
### 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
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. 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.
......@@ -37,26 +40,27 @@ More reading on checklists can be found in the "Checklist Manifesto": http://atu
### Performance, reliability and availability
- [ ] Confirmed
* [ ] Confirmed
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
* [ ] Confirmed
1. I have prepared a squash commit to feed the changelog linked to the current milestone.
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.
### Security
### 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
* [ ] Confirmed
1. I have confirmed that if this MR does not contains any sensitive informations hidden in the changes.
### Deployment
- [ ] Confirmed
* [ ] 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.
# Disable exclusion of files from .gitignore for vscode search (cf. https://stackoverflow.com/a/72059075 )
# External libs
!/projects
......@@ -2,6 +2,50 @@
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-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)
### ⚠ BREAKING CHANGES
* **carto:** use of external lib for carto module. We are not using our own components.
### Features
* add loader for app in order to prevent render issue ([9cbb1b1](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/9cbb1b1066b2d205c3ef20385e639ba6aed2f6e9))
* **annuaire:** Add user registry page and search feature ([09399c3](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/09399c304d6fd155d75822d4f579f9aaa0eaf47a))
* **assets:** update app loader ([1553957](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/1553957a2e170d1673ce244aabae623fead8f383))
* **carto:** revert carto lib components ([8be6a6d](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/8be6a6df5fe404a095bc245d55ed10799a7b8f96))
* **carto:** switch to ANCT carto module. ([a6b8c2e](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/a6b8c2ea13b7df2084b50485c5795a344ac207c3))
* **core:** update to angular 14 ([85ea0a7](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/85ea0a75c444e25dad0d7c89fe050c8287fc3c1d))
* **hoursForm:** can now remove the second hours input ([38c9cf3](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/38c9cf3590bee378db94b5e85dcdce851382cc6f))
* **profile:** add structure owners screen ([ece56f5](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/ece56f5aedaea25d353e931bacf4559d40c13c28))
* **profile:** logged in users can access the profile of other users ([289302f](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/289302f1691230d9a9583280a139d82c34fde9fc))
* **profile:** redesigned structures ([88d8106](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/88d81069f1483ab12cc7728bd45ba659a8f22e7b))
* update numeric pass assets ([ea33e24](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/ea33e246881c4632455bd3da571aace8f03ee93b))
### Bug Fixes
* **annuaire:** Remove filter to empty request ([0eadaa9](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/0eadaa924d26c7cd097716d907b01171fec187e9))
* **annuaire:** research fix with empty filter ([a3647cd](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/a3647cd0ee98714e765be1ec1c53c53e88f8f1bb))
* **annuaire:** results height and uncenter filters ([b5ecd47](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/b5ecd47fd67a1e70c3f66558894b3a8704ed444e))
* **assets:** update app logo ([d246472](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/d246472539b30da941c8b267597baf036e14539a))
* **carto:** display of claimed structures ([7243ed2](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/7243ed282a632e323fd0cd8678773f6986ce0b34))
* **carto:** improve perf for isClaim request, only requesting if user is an admin ([8d736ae](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/8d736ae159ca8d5040e48bde8793ffe84fa59660))
* **cicd:** update V2.0 job ([345819e](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/345819e8838d22edb6b1929a36d0aee0e0a89c0c))
* **deps:** update dependency @angular/cdk to v14 ([2bf6b4c](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/2bf6b4c1914f332cf1136ce086cf774468497d2d))
* **deps:** update karma and @angular-builders/jest ([b0a4338](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/b0a4338560b29f5b7d1206ae34d54117860b7f92))
* force freeWorkshop value because it's now optional ([178033b](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/178033b70854a96014a536c96859bfc2956db9a8))
* **form:** protection against no formation selection for pricing ([da0b938](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/da0b93869f117e7f458a654c51eca1b2d784a1d7))
* **news:** tag resolver redirect making infinite loop on news page ([13f0ef3](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/13f0ef3a83741bfc938cff8a502f27af99fb53a4))
* phone number is now optional and can be 4-digits long ([a7fe556](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/a7fe5565e35e3278e00644c064462cdde1cd7190))
* **profil:** structure adresse with no number ([01f021f](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/01f021f862805c8e5859ddd188ac4e544a7a450b))
* removed elements from a subtitle ([575765d](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/575765df1a4e93f29252e1ec9b9244a192291252))
* reset page validity ([d5ad250](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/d5ad2506590db9048fe1aa4f982676cbc3aa7ac0))
* **structure-edition:** fix design ([9e75d22](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/9e75d226ea93c66534fb237c6a5a052bd4a8b5ee))
* **structure:** wording issue27 ([c037399](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/c037399893ca37fdf2d4565e21d3a743eb4734f6))
* wording and typos ([6ccd6e2](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/commit/6ccd6e2d37283e4086c931f638751ca148bf9dad))
## [2.0.0-beta2.1](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/compare/v1.17.2...v2.0.0-beta2.1) (2022-05-31)
......
......@@ -152,7 +152,46 @@
}
}
}
},
"@gouvfr-anct/mediation-numerique": {
"projectType": "library",
"root": "projects/gouvfr-anct/mediation-numerique",
"sourceRoot": "projects/gouvfr-anct/mediation-numerique/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/gouvfr-anct/mediation-numerique/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/gouvfr-anct/mediation-numerique/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/gouvfr-anct/mediation-numerique/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"configPath": "jest.config.js",
"tsConfig": "tsconfig.spec.json",
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/gouvfr-anct/mediation-numerique/src/**/*.ts",
"projects/gouvfr-anct/mediation-numerique/src/**/*.html"
]
}
}
}
}
},
"defaultProject": "pamn"
}
}
This diff is collapsed.
{
"name": "pamn",
"version": "2.0.0-beta2.1",
"version": "2.0.0-beta2.2",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=fr --proxy-config proxy.conf.json",
......@@ -17,17 +17,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~13.1.1",
"@angular/cdk": "^13.1.1",
"@angular/common": "~13.1.1",
"@angular/compiler": "~13.1.1",
"@angular/core": "~13.1.1",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "~13.1.1",
"@angular/platform-browser": "~13.1.1",
"@angular/platform-browser-dynamic": "~13.1.1",
"@angular/router": "~13.1.1",
"@angular/service-worker": "~13.1.1",
"@angular/animations": "^14.2.1",
"@angular/cdk": "^14.0.0",
"@angular/common": "^14.2.1",
"@angular/compiler": "^14.2.1",
"@angular/core": "^14.2.1",
"@angular/flex-layout": "^13.0.0-beta.38",
"@angular/forms": "^14.2.1",
"@angular/platform-browser": "^14.2.1",
"@angular/platform-browser-dynamic": "^14.2.1",
"@angular/router": "^14.2.1",
"@angular/service-worker": "^14.2.1",
"@asymmetrik/ngx-leaflet": "^8.1.0",
"@ngx-translate/core": "^13.0.0",
"ag-grid-angular": "^26.2.0",
......@@ -39,35 +39,49 @@
"luxon": "^1.25.0",
"ngx-toastr": "^13.2.1",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"tslib": "^2.4.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.2.1",
"@angular/cli": "^13.1.2",
"@angular/compiler-cli": "~13.1.1",
"@angular/localize": "^13.1.1",
"@angular-builders/jest": "^14.0.0",
"@angular-devkit/build-angular": "^14.2.2",
"@angular-eslint/builder": "^14.0.0-alpha.4",
"@angular-eslint/eslint-plugin": "^14.0.0-alpha.4",
"@angular-eslint/eslint-plugin-template": "^14.0.0-alpha.4",
"@angular-eslint/schematics": "^14.0.0-alpha.4",
"@angular-eslint/template-parser": "^14.0.0-alpha.4",
"@angular/cli": "^14.2.2",
"@angular/compiler-cli": "^14.2.1",
"@angular/localize": "^14.2.1",
"@compodoc/compodoc": "^1.1.16",
"@types/jasmine": "~4.0.0",
"@types/jasminewd2": "~2.0.3",
"@types/leaflet": "^1.5.17",
"@types/leaflet.locatecontrol": "^0.60.7",
"@types/luxon": "^1.25.0",
"@types/node": "^16.0.0",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"codelyzer": "^6.0.0",
"eslint": "^8.23.0",
"eslint-plugin-jest": "^26.2.2",
"http-server": "^14.1.0",
"jasmine-core": "~4.1.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.9",
"jest": "^27.5.1",
"jest-preset-angular": "^11.1.2",
"karma": "^6.4.0",
"karma-browserify": "^7.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",
"ng-packagr": "^14.2.1",
"prettier": "^2.1.2",
"protractor": "~7.0.0",
"standard-version": "^9.3.2",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.5.4"
"typescript": "~4.8.3"
}
}
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>systemes-dinformation/renovate/renovate-config"
"extends": ["local>systemes-dinformation/renovate/renovate-config"],
"labels": ["dependencies"],
"packageRules": [
{
"matchPackagePatterns": ["eslint"],
"labels": ["linting"]
},
{
"matchDepTypes": ["optionalDependencies"],
"addLabels": ["optional"]
}
]
}
......@@ -4,7 +4,6 @@ import { PanelComponent } from './components/panel/panel.component';
import { ClaimStructureComponent } from './components/claim-structure/claim-structure.component';
import { ManageUsersComponent } from './components/manage-users/manage-users.component';
import { SharedModule } from '../shared/shared.module';
import { NewsletterUsersComponent } from './components/newsletter-users/newsletter-users.component';
import { AdminStructuresListComponent } from './components/structures-list/admin-structures-list.component';
import { ManageLockdownInfoComponent } from './components/lockdown-info/manage-lockdown-info.component';
import { AdminRoutingModule } from './admin-routing.module';
......@@ -26,7 +25,6 @@ import { JobPersonalOffer } from './components/manage-jobs/jobPersonalOffer/job-
declarations: [
PanelComponent,
ClaimStructureComponent,
NewsletterUsersComponent,
AdminStructuresListComponent,
ManageLockdownInfoComponent,
ManageUsersComponent,
......@@ -41,13 +39,13 @@ import { JobPersonalOffer } from './components/manage-jobs/jobPersonalOffer/job-
AdministredStructuresComponent,
AttachedUsersComponent,
ManageJobsComponent,
ManageEmployersComponent,
ManageEmployersComponent
],
imports: [
CommonModule,
AdminRoutingModule,
SharedModule,
AgGridModule.withComponents([DeleteUserComponent, AdministredStructuresComponent]),
],
AgGridModule.withComponents([DeleteUserComponent, AdministredStructuresComponent])
]
})
export class AdminModule {}
......@@ -36,7 +36,7 @@ export class ClaimStructureComponent implements OnInit {
});
}
public claimedStructure(event: boolean): void {
public claimedStructure(_event: boolean): void {
this.isClaimedStructure = !this.isClaimedStructure;
}
}
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { Employer } from '../../../models/employer.model';
import { NotificationService } from '../../../services/notification.service';
import { AdminService } from '../../services/admin.service';
......@@ -14,11 +14,11 @@ import { ValidateEmployerComponent } from './validate-employer/validate-employer
styleUrls: ['./manage-employers.component.scss'],
})
export class ManageEmployersComponent implements OnInit {
public newEmployerForm: FormGroup;
public newEmployerForm: UntypedFormGroup;
public validatedEmployers: Employer[] = [];
public unvalidatedEmployers: Employer[] = [];
public deleteModalOpenned = false;
public validatedEmployersName: String[] = [];
public validatedEmployersName: string[] = [];
public mergeEmployerModalOpenned = false;
public employerToDelete: Employer = null;
public mergeOpe: any = {
......@@ -51,7 +51,7 @@ export class ManageEmployersComponent implements OnInit {
constructor(
private adminService: AdminService,
private notificationService: NotificationService,
private formBuilder: FormBuilder
private formBuilder: UntypedFormBuilder
) {
this.findValidatedEmployers();
this.findUnvalidatedEmployers();
......@@ -209,8 +209,8 @@ export class ManageEmployersComponent implements OnInit {
}
}
public validateEmployer(employerId: string, context?): void {
this.adminService.validateEmployer(employerId).subscribe((data) => {
public validateEmployer(employerId: string, _context?): void {
this.adminService.validateEmployer(employerId).subscribe((_data) => {
this.findValidatedEmployers();
this.findUnvalidatedEmployers();
});
......
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { ValueGetterParams } from 'ag-grid-community';
import { Job } from '../../../models/job.model';
import { NotificationService } from '../../../services/notification.service';
......@@ -16,11 +16,11 @@ import { ValidateJobComponent } from './validate-job/validate-job.component';
styleUrls: ['./manage-jobs.component.scss'],
})
export class ManageJobsComponent implements OnInit {
public newJobForm: FormGroup;
public newJobForm: UntypedFormGroup;
public validatedJobs: Job[] = [];
public unvalidatedJobs: Job[] = [];
public deleteModalOpenned = false;
public validatedJobsName: String[] = [];
public validatedJobsName: string[] = [];
public mergeJobModalOpenned = false;
public jobToDelete: Job = null;
public mergeOpe: any = {
......@@ -54,7 +54,7 @@ export class ManageJobsComponent implements OnInit {
constructor(
private adminService: AdminService,
private notificationService: NotificationService,
private formBuilder: FormBuilder
private formBuilder: UntypedFormBuilder
) {
this.findValidatedJobs();
this.findUnvalidatedJobs();
......@@ -246,8 +246,8 @@ export class ManageJobsComponent implements OnInit {
}
}
public validateJob(jobId: string, context?): void {
this.adminService.validateJob(jobId).subscribe((data) => {
public validateJob(jobId: string, _context?): void {
this.adminService.validateJob(jobId).subscribe((_data) => {
this.findValidatedJobs();
this.findUnvalidatedJobs();
});
......
......@@ -18,9 +18,9 @@ export class ManageUsersComponent {
public attachedUsers: User[] = [];
public unAttachedUsers: User[] = [];
public unVerifiedUsers: User[] = [];
public validatedJobsName: String[] = [];
public validatedJobsName: string[] = [];
public validatedJobs: Job[] = [];
public validatedEmployersName: String[] = [];
public validatedEmployersName: string[] = [];
public validatedEmployers: Employer[] = [];
public deleteModalOpenned = false;
public editJobModalOpenned = false;
......@@ -105,6 +105,11 @@ export class ManageUsersComponent {
},
onCellValueChanged: this.onEmployerChange.bind(this),
},
{
headerName: 'Date de création',
field: 'createdAt',
minWidth: 150,
},
{
headerName: 'Actions',
editable: false,
......
<div fxLayout="column" fxLayoutGap="5px" fxLayoutAlign="center center" class="userBlock">
<h2>Gestion abonnement newsletter</h2>
<div fxLayout="row" fxLayoutGap="20px" fxLayoutAlign="center center">
<button (click)="copySubscription()">Copier les adresses dans le presse papier</button>
<button (click)="searchSubscribedEmail('')">Afficher tous les inscrits</button>
</div>
<div fxLayout="row">Il y a actuellement {{ subscriptionsCount }} abonnés à la newsletter.</div>
<div fxLayout="row">
<input #searchstring (keyup)="(0)" />
<button (click)="searchSubscribedEmail(searchstring.value)">Rechercher</button>
</div>
<div class="userList">
<tr *ngFor="let subscription of subscriptions">
<td>{{ subscription.email }}</td>
<td>
<button (click)="toggleUnsubscribeModal(subscription.email)">Désabonner</button>
</td>
</tr>
<app-modal-confirmation
*ngIf="emailToUnsubscribe"
[openned]="deleteModalOpenned"
[content]="'Voulez-vous vraiment supprimer ' + emailToUnsubscribe + ' de la newsletter &nbsp;?'"
(closed)="unsubscribeEmail(emailToUnsubscribe, $event)"
></app-modal-confirmation>
<div *ngIf="subscriptions && subscriptions.length == 0">Aucun résultat</div>
</div>
</div>
import { Component } from '@angular/core';
import { NewsletterSubscription } from '../../../models/subscription-model';
import { AdminService } from '../../services/admin.service';
@Component({
selector: 'app-admin-newsletter-users',
templateUrl: './newsletter-users.component.html',
})
export class NewsletterUsersComponent {
public subscriptions: NewsletterSubscription[];
public deleteModalOpenned = false;
public emailToUnsubscribe: string = null;
public subscriptionsCount: number = 0;
constructor(private adminService: AdminService) {}
ngOnInit(): void {
this.adminService.countNewsletterSubscriptions().subscribe((count) => {
this.subscriptionsCount = count;
});
}
public toggleUnsubscribeModal(emailToUnsubscribe: string): void {
this.emailToUnsubscribe = emailToUnsubscribe;
this.deleteModalOpenned = !this.deleteModalOpenned;
}
public searchSubscribedEmail(searchString: string): void {
this.adminService.searchNewsletterSubscriptions(searchString).subscribe((emails) => {
this.subscriptions = emails;
});
}
public unsubscribeEmail(email: string, shouldUnsubscribe: boolean): void {
this.toggleUnsubscribeModal(email);
if (shouldUnsubscribe) {
this.adminService.unsubscribeEmail(email).subscribe((data) => {
this.subscriptions = this.subscriptions.filter((obj) => obj.email !== email);
this.subscriptionsCount = this.subscriptions.length;
});
}
}
public copySubscription(): void {
this.adminService.searchNewsletterSubscriptions('').subscribe((emails) => {
let emailsToBeCopied = emails.map((e) => e.email).join(';');
let copyElement = document.createElement('textarea');
copyElement.textContent = decodeURI(emailsToBeCopied);
let body = document.getElementsByTagName('body')[0];
body.appendChild(copyElement);
copyElement.select();
document.execCommand('copy');
body.removeChild(copyElement);
});
}
}
......@@ -5,7 +5,6 @@
<button (click)="changeActiveFeature(features.structuresList)">Liste structures</button>
<button (click)="changeActiveFeature(features.manageUsers)">Gestion des utilisateurs</button>
<button (click)="changeActiveFeature(features.lockdownInfo)">Gestion des infos covid</button>
<button (click)="changeActiveFeature(features.newsletterUsers)">Newsletter</button>
<button (click)="changeActiveFeature(features.jobsList)">Fonctions</button>
<button (click)="changeActiveFeature(features.employersList)">Employeurs</button>
<a target="_blank" class="custom-link" rel="noopener noreferrer" [href]="ghostLink">Ghost</a>
......@@ -22,9 +21,6 @@
<div *ngIf="selectedFeature === features.lockdownInfo">
<app-admin-manage-lockdown-info></app-admin-manage-lockdown-info>
</div>
<div *ngIf="selectedFeature === features.newsletterUsers">
<app-admin-newsletter-users></app-admin-newsletter-users>
</div>
<div *ngIf="selectedFeature === features.jobsList">
<app-admin-manage-jobs></app-admin-manage-jobs>
</div>
......
......@@ -6,7 +6,7 @@ import { PanelRouteService } from '../../services/panel-route.service';
@Component({
selector: 'app-admin-panel',
templateUrl: './panel.component.html',
providers: [PanelRouteService],
providers: [PanelRouteService]
})
export class PanelComponent implements OnInit {
public features = AdminPannelEnum;
......
<div *ngIf="isLoading" class="loader">
<img class="loader-gif" src="/assets/gif/loader_circle.gif" alt />
<img class="loader-gif" src="/assets/gif/loader_circle_grey.gif" alt />
</div>
<div *ngIf="!isLoading" fxLayout="column" fxLayoutAlign="center center">
<table aria-describedby="demands attachment results" class="results-tab results-column">
......@@ -12,8 +12,8 @@
<tr *ngFor="let structure of structuresIncomplete">
<td>
<a class="incomplete" href="/acteurs?id={{ structure.structureId }}" target="_blank">
{{ structure.structureName }}</a
>
{{ structure.structureName }}
</a>
</td>
<td class="structure-updated-at">
<span [ngClass]="{ isOutdated: structure.isOutdated }">{{ structure.updatedAt | date: 'mediumDate' }}</span>
......@@ -31,7 +31,7 @@
<tbody>
<tr *ngFor="let structure of structuresInClaim">
<td>
<a href="/acteurs?id={{ structure.structureId }}" target="_blank"> {{ structure.structureName }}</a>
<a href="/acteurs?id={{ structure.structureId }}" target="_blank">{{ structure.structureName }}</a>
</td>
<td class="structure-updated-at">
<span [ngClass]="{ isOutdated: structure.isOutdated }">{{ structure.updatedAt | date: 'mediumDate' }}</span>
......@@ -49,7 +49,7 @@
<tbody>
<tr *ngFor="let structure of structuresToClaim">
<td>
<a href="/acteurs?id={{ structure.structureId }}" target="_blank"> {{ structure.structureName }}</a>
<a href="/acteurs?id={{ structure.structureId }}" target="_blank">{{ structure.structureName }}</a>
</td>
<td class="structure-updated-at">
<span [ngClass]="{ isOutdated: structure.isOutdated }">{{ structure.updatedAt | date: 'mediumDate' }}</span>
......@@ -67,7 +67,7 @@
<tbody>
<tr *ngFor="let structure of structuresClaimed">
<td>
<a href="/acteurs?id={{ structure.structureId }}" target="_blank"> {{ structure.structureName }}</a>
<a href="/acteurs?id={{ structure.structureId }}" target="_blank">{{ structure.structureName }}</a>
</td>
<td class="structure-updated-at">
<span [ngClass]="{ isOutdated: structure.isOutdated }">{{ structure.updatedAt | date: 'mediumDate' }}</span>
......
<div class="content-container" [ngClass]="{ logged: userIsLoggedIn() }">
<div *ngIf="userIsLoggedIn()">
<app-search-bar
class="hide-on-print"
(searchEvent)="getUsers($event)"
[shouldResetFilters]="resetFilters"
[shouldShowMore]="nextPage"
></app-search-bar>
<app-result-list
[userList]="userList"
[totalUserResult]="totalUserResult"
[isLogged]="true"
[filterActive]="filterActive"
(resetEvent)="shouldResetFilters()"
(showMoreEvent)="showMore($event)"
></app-result-list>
</div>
<app-result-list
*ngIf="!userIsLoggedIn()"
[userList]="[]"
[isLogged]="false"
[totalUserResult]="totalUserResult"
></app-result-list>
</div>