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
Select Git revision
  • 354-actualites-partage-article-via-rs-image-d-illus-a-la-place-du-logo-res-in
  • 582-modification-fiche-structure-offre-structure-vs-offre-accompagnant-numerique-ordre-des-blocs
  • 630-bo-admin-fonction-2
  • 673-fiche-structure-mise-en-forme-des-rs
  • 722-envsubst-client-side-conf
  • 723-structures-l-api-ne-prend-pas-en-compte-l-offre-des-mediateurs
  • 728-cartographie-ordre-d-affichage-de-la-liste
  • 734-actualites-menu-en-mobile
  • dev
  • feat/nginx-security
  • master
  • renovate/bluehalo-ngx-leaflet-20.x
  • renovate/chokidar-4.x
  • renovate/chromatic-com-storybook-4.x
  • renovate/devdependencies-(non-major)
  • renovate/leaflet.locatecontrol-0.x
  • renovate/major-ag-grid-monorepo
  • renovate/major-angular-cli-monorepo
  • renovate/major-angular-eslint-monorepo
  • renovate/major-angular-monorepo
  • renovate/major-angularmaterial-monorepo
  • renovate/major-storybook-monorepo
  • renovate/major-typescript-eslint-monorepo
  • renovate/ng-packagr-20.x
  • renovate/ngx-matomo-client-8.x
  • renovate/ngx-toastr-19.x
  • renovate/npm-11.x
  • wip_3.4
  • 1.1.0
  • v0.0.1
  • v0.0.2
  • v0.0.3
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.16.1
  • v1.16.2
  • v1.16.3
  • v1.17.0
  • v1.17.1
  • v1.17.2
  • v1.17.3
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v1.9.1
  • v2.0.0
  • v2.0.0-beta1
  • v2.0.0-beta1.1
  • v2.0.0-beta2
  • v2.0.0-beta2.1
  • v2.0.0-beta2.2
  • v2.0.0-beta4
  • v2.0.0-beta5
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.2.0
  • v2.3.0
  • v2.3.1
  • v2.3.2
  • v2.3.3
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.5.0
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.1.0
  • v3.1.0-openshift
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.3.0
  • v3.3.1
  • v3.4.0
  • v3.4.1
  • v3.4.2
  • v3.4.3
  • v4.0.0
  • v4.0.1
  • v4.0.2
  • v4.1.0
  • v4.1.1
100 results

Target

Select target project
  • web-et-numerique / Factory / Resin / Client
1 result
Select Git revision
  • 354-actualites-partage-article-via-rs-image-d-illus-a-la-place-du-logo-res-in
  • 582-modification-fiche-structure-offre-structure-vs-offre-accompagnant-numerique-ordre-des-blocs
  • 630-bo-admin-fonction-2
  • 673-fiche-structure-mise-en-forme-des-rs
  • 722-envsubst-client-side-conf
  • 723-structures-l-api-ne-prend-pas-en-compte-l-offre-des-mediateurs
  • 728-cartographie-ordre-d-affichage-de-la-liste
  • 734-actualites-menu-en-mobile
  • dev
  • feat/nginx-security
  • master
  • renovate/bluehalo-ngx-leaflet-20.x
  • renovate/chokidar-4.x
  • renovate/chromatic-com-storybook-4.x
  • renovate/devdependencies-(non-major)
  • renovate/leaflet.locatecontrol-0.x
  • renovate/major-ag-grid-monorepo
  • renovate/major-angular-cli-monorepo
  • renovate/major-angular-eslint-monorepo
  • renovate/major-angular-monorepo
  • renovate/major-angularmaterial-monorepo
  • renovate/major-storybook-monorepo
  • renovate/major-typescript-eslint-monorepo
  • renovate/ng-packagr-20.x
  • renovate/ngx-matomo-client-8.x
  • renovate/ngx-toastr-19.x
  • renovate/npm-11.x
  • wip_3.4
  • 1.1.0
  • v0.0.1
  • v0.0.2
  • v0.0.3
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.16.1
  • v1.16.2
  • v1.16.3
  • v1.17.0
  • v1.17.1
  • v1.17.2
  • v1.17.3
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v1.9.1
  • v2.0.0
  • v2.0.0-beta1
  • v2.0.0-beta1.1
  • v2.0.0-beta2
  • v2.0.0-beta2.1
  • v2.0.0-beta2.2
  • v2.0.0-beta4
  • v2.0.0-beta5
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.2.0
  • v2.3.0
  • v2.3.1
  • v2.3.2
  • v2.3.3
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.5.0
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.1.0
  • v3.1.0-openshift
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.3.0
  • v3.3.1
  • v3.4.0
  • v3.4.1
  • v3.4.2
  • v3.4.3
  • v4.0.0
  • v4.0.1
  • v4.0.2
  • v4.1.0
  • v4.1.1
100 results
Show changes

Commits on Source 2

16 files
+ 107
83
Compare changes
  • Side-by-side
  • Inline

Files

Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@ import { SearchQuery, SearchResults } from './models/searchQuery.model';
  templateUrl: './annuaire.component.html',
  templateUrl: './annuaire.component.html',
  styleUrls: ['./annuaire.component.scss'],
  styleUrls: ['./annuaire.component.scss'],
})
})
export class AnnuaireComponent implements OnInit {
export class AnnuaireComponent {
  constructor(private searchService: SearchService, private authService: AuthService) {}
  constructor(private searchService: SearchService, private authService: AuthService) {}
  public userList: UserAnnuary[] = [];
  public userList: UserAnnuary[] = [];
  public searchedValue: string;
  public searchedValue: string;
@@ -18,18 +18,16 @@ export class AnnuaireComponent implements OnInit {
  public nextPage: number = 1;
  public nextPage: number = 1;
  public filterActive: boolean = false;
  public filterActive: boolean = false;


  ngOnInit(): void {
    this.getUsers({ queryParam: '', page: 1, jobFilters: [], employerFilter: [] });
  }
  public getUsers(params: SearchQuery): void {
  public getUsers(params: SearchQuery): void {
    if (this.userIsLoggedIn()) {
    if (this.userIsLoggedIn()) {
      if (params.employerFilter?.length || params.jobFilters.length) {
      this.searchService.annuaireSearchQuery = params;
      if (params.employerFilters?.length || params.jobFilters?.length) {
        this.filterActive = true;
        this.filterActive = true;
      } else {
      } else {
        this.filterActive = false;
        this.filterActive = false;
      }
      }
      this.searchService
      this.searchService
        .searchUserRegistry(params.queryParam, params.page, params.jobFilters, params.employerFilter)
        .searchUserRegistry(params.queryParam, params.page, params.jobFilters, params.employerFilters)
        .subscribe((res: SearchResults) => {
        .subscribe((res: SearchResults) => {
          this.userList = res.docs;
          this.userList = res.docs;
          this.totalUserResult = res.count;
          this.totalUserResult = res.count;
Original line number Original line Diff line number Diff line
@@ -7,17 +7,10 @@
@import '../../../assets/scss/z-index';
@import '../../../assets/scss/z-index';


.modalemployers {
.modalemployers {
  left: 212px;
  left: 515px;

  @media #{$large-desktop} {
    left: 273px;
  }
}
}
.modaljobs {
.modaljobs {
  left: 331px;
  left: 412px;
  @media #{$large-desktop} {
    left: 417px;
  }
}
}


.maxModal .blockLigne {
.maxModal .blockLigne {
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@ export interface SearchQuery {
  queryParam: string;
  queryParam: string;
  page: number;
  page: number;
  jobFilters?: string[];
  jobFilters?: string[];
  employerFilter?: string[];
  employerFilters?: string[];
}
}
export interface SearchResults {
export interface SearchResults {
  count: number;
  count: number;
Original line number Original line Diff line number Diff line
<div class="results notEmpty" *ngIf="isLogged && userList.length" [ngClass]="{ filterActive: filterActive }">
<div class="results notEmpty" *ngIf="isLogged && userList.length" [ngClass]="{ filterActive: filterActive }">
  <div class="userNumber">
  <div class="userNumber">
    {{ userList.length }} <span *ngIf="showPagination"> sur {{ totalUserResult }} </span> utilisateurs trouvés
    {{ userList.length }} utilisateur(s)<span *ngIf="showPagination"> sur {{ totalUserResult }} </span>
  </div>
  </div>
  <div class="singleUser" *ngFor="let user of userList; let index = index" (click)="goToUser(user._id)">
  <div
    class="singleUser"
    [ngClass]="{ singleResult: userList.length == 1 }"
    *ngFor="let user of userList; let index = index"
    (click)="goToUser(user._id)"
  >
    <div class="avatar-container">
    <div class="avatar-container">
      <app-svg-icon class="avatar" [type]="'avatar'" [icon]="'defaultAvatar'" [iconClass]="'icon-40'"></app-svg-icon>
      <app-svg-icon class="avatar" [type]="'avatar'" [icon]="'defaultAvatar'" [iconClass]="'icon-40'"></app-svg-icon>
    </div>
    </div>
@@ -13,7 +18,9 @@
    <div class="employer" *ngIf="user.employer">{{ user.employer.name }}</div>
    <div class="employer" *ngIf="user.employer">{{ user.employer.name }}</div>
  </div>
  </div>
  <div class="pagination" *ngIf="showPagination">
  <div class="pagination" *ngIf="showPagination">
    <div class="text">{{ userList.length }} utilisateurs affichés sur {{ totalUserResult }} utilisateurs trouvés.</div>
    <div class="text">
      {{ userList.length }} utilisateur(s) affiché(s) sur {{ totalUserResult }} utilisateur(s) trouvé(s).
    </div>
    <app-button
    <app-button
      [style]="buttonTypeEnum.modalSecondary"
      [style]="buttonTypeEnum.modalSecondary"
      [type]="'form'"
      [type]="'form'"
Original line number Original line Diff line number Diff line
@@ -29,13 +29,13 @@
          type="button"
          type="button"
          fxLayout="row"
          fxLayout="row"
          [ngClass]="{
          [ngClass]="{
            selected: modalTypeOpened === TypeModal.employers,
            selected: modalTypeOpened === TypeModal.jobs,
            containCheckedFilters: numberEmployersChecked
            containCheckedFilters: numberJobChecked
          }"
          }"
          fxLayoutAlign="space-between center"
          fxLayoutAlign="space-between center"
          (click)="openModal(TypeModal.employers)"
          (click)="openModal(TypeModal.jobs)"
        >
        >
          <span>Employeur</span>
          <span>Fonction</span>
          <div class="arrow"></div>
          <div class="arrow"></div>
        </button>
        </button>
        <button
        <button
@@ -43,20 +43,20 @@
          type="button"
          type="button"
          fxLayout="row"
          fxLayout="row"
          [ngClass]="{
          [ngClass]="{
            selected: modalTypeOpened === TypeModal.jobs,
            selected: modalTypeOpened === TypeModal.employers,
            containCheckedFilters: numberJobChecked
            containCheckedFilters: numberEmployersChecked
          }"
          }"
          fxLayoutAlign="space-between center"
          fxLayoutAlign="space-between center"
          (click)="openModal(TypeModal.jobs)"
          (click)="openModal(TypeModal.employers)"
        >
        >
          <span>Fonction</span>
          <span>Employeur</span>
          <div class="arrow"></div>
          <div class="arrow"></div>
        </button>
        </button>


        <div *ngIf="modalTypeOpened">
        <div *ngIf="modalTypeOpened">
          <app-filter-modal
          <app-filter-modal
            [modalType]="modalTypeOpened"
            [modalType]="modalTypeOpened"
            [checkedFilters]="checkedFilterList"
            [checkedFilters]="searchService.checkedFilterList"
            [filtersTypes]="getModalCategory()"
            [filtersTypes]="getModalCategory()"
            (searchEvent)="fetchResults($event)"
            (searchEvent)="fetchResults($event)"
            (closeEvent)="closeModal()"
            (closeEvent)="closeModal()"
@@ -66,10 +66,15 @@
    </div>
    </div>
  </div>
  </div>


  <div *ngIf="checkedFilterList.length" fxLayout="row wrap" fxLayoutGap="4px" class="filterTags isntPhoneContent">
  <div
    *ngIf="searchService.checkedFilterList.length"
    fxLayout="row wrap"
    fxLayoutGap="4px"
    class="filterTags isntPhoneContent"
  >
    <div class="title">Filtres :</div>
    <div class="title">Filtres :</div>
    <app-button
    <app-button
      *ngFor="let filter of checkedFilterList"
      *ngFor="let filter of searchService.checkedFilterList"
      [style]="buttonTypeEnum.TagCloudButton"
      [style]="buttonTypeEnum.TagCloudButton"
      [text]="filter"
      [text]="filter"
      (action)="removeFilter(filter)"
      (action)="removeFilter(filter)"
Original line number Original line Diff line number Diff line
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { FormBuilder, FormGroup } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';
import { forkJoin } from 'rxjs';
import { ButtonType } from '../../shared/components/button/buttonType.enum';
import { ButtonType } from '../../shared/components/button/buttonType.enum';
import { Filter } from '../../structure-list/models/filter.model';
import { SearchService } from '../../structure-list/services/search.service';
import { SearchService } from '../../structure-list/services/search.service';
import { TypeModal } from '../enums/TypeModal.enum';
import { TypeModal } from '../enums/TypeModal.enum';


@@ -21,12 +21,10 @@ export class SearchBarComponent implements OnInit, OnChanges {
  public buttonTypeEnum = ButtonType;
  public buttonTypeEnum = ButtonType;
  public searchForm: FormGroup;
  public searchForm: FormGroup;
  public modalTypeOpened: TypeModal;
  public modalTypeOpened: TypeModal;
  public checkedFilterList: string[] = [];
  public numberEmployersChecked = 0;
  public numberEmployersChecked = 0;
  public numberJobChecked = 0;
  public numberJobChecked = 0;
  public jobTypes: string[] = [];
  public jobTypes: string[] = [];
  public employerTypes: string[] = [];
  public employerTypes: string[] = [];
  public queryString: string;


  public jobFilterChecked: string[] = [];
  public jobFilterChecked: string[] = [];
  public employerFilterChecked: string[] = [];
  public employerFilterChecked: string[] = [];
@@ -36,42 +34,45 @@ export class SearchBarComponent implements OnInit, OnChanges {
    private activatedRoute: ActivatedRoute,
    private activatedRoute: ActivatedRoute,
    private route: ActivatedRoute,
    private route: ActivatedRoute,
    private router: Router,
    private router: Router,
    private searchService: SearchService
    public searchService: SearchService
  ) {
  ) {}
    this.searchForm = this.fb.group({
      searchTerm: this.activatedRoute.snapshot.queryParamMap.get('search')
        ? this.activatedRoute.snapshot.queryParamMap.get('search')
        : '',
    });
  }
  ngOnInit(): void {
  ngOnInit(): void {
    // Will store the different categories
    // Will store the different categories
    this.getData();
    this.getData();
    this.queryString = this.activatedRoute.snapshot.queryParamMap.get('search');
    let queryString = this.activatedRoute.snapshot.queryParamMap.get('search');
    if (this.queryString) {
    // Use existing query if back to the page or init the query
      const filters: Filter[] = [];
    if (!this.searchService.annuaireSearchQuery) {
      filters.push(new Filter('query', this.queryString));
      this.searchService.annuaireSearchQuery = { queryParam: '', page: 1, jobFilters: [], employerFilters: [] };
      this.searchEvent.emit(filters);
    }
    }
    if (queryString) {
      this.searchService.annuaireSearchQuery.queryParam = queryString;
    }
    this.searchForm = this.fb.group({
      searchTerm: this.searchService.annuaireSearchQuery.queryParam,
    });
    this.searchEvent.emit(this.searchService.annuaireSearchQuery);
  }
  }
  ngOnChanges(changes: SimpleChanges): void {
  ngOnChanges(changes: SimpleChanges): void {
    if (changes.shouldResetFilters && changes.shouldResetFilters.currentValue !== 0) this.resetFilters();
    if (changes.shouldResetFilters && changes.shouldResetFilters.currentValue !== 0) this.resetFilters();
    if (changes.shouldShowMore && !changes.shouldShowMore.firstChange) {
    if (changes.shouldShowMore && !changes.shouldShowMore.firstChange) {
      const term = this.searchForm.get('searchTerm').value || '';
      this.searchEvent.emit({
      this.searchEvent.emit({
        queryParam: this.searchForm.get('searchTerm').value,
        queryParam: term,
        page: changes.shouldShowMore.currentValue,
        page: changes.shouldShowMore.currentValue,
        jobFilters: this.jobFilterChecked,
        jobFilters: this.jobFilterChecked,
        employerFilter: this.employerFilterChecked,
        employerFilters: this.employerFilterChecked,
      });
      });
    }
    }
  }
  }
  // Get the categories for each modal type
  // Get the categories for each modal type
  private getData(): void {
  private getData(): void {
    this.searchService.getJobs().subscribe((res) => {
    forkJoin({
      this.jobTypes = res;
      job: this.searchService.getJobs(),
    });
      employer: this.searchService.getEmployers(),
    this.searchService.getEmployers().subscribe((res) => {
    }).subscribe((data) => {
      this.employerTypes = res;
      this.jobTypes = data.job;
      this.employerTypes = data.employer;
      this.countCheckedFilters();
    });
    });
  }
  }


@@ -107,16 +108,16 @@ export class SearchBarComponent implements OnInit, OnChanges {
        relativeTo: this.route,
        relativeTo: this.route,
      });
      });
    }
    }
    this.splitFilters(this.checkedFilterList);
    this.splitFilters(this.searchService.checkedFilterList);
    this.searchEvent.emit({
    this.searchEvent.emit({
      queryParam: term || '',
      queryParam: term || '',
      jobFilters: this.jobFilterChecked,
      jobFilters: this.jobFilterChecked,
      employerFilter: this.employerFilterChecked,
      employerFilters: this.employerFilterChecked,
    });
    });
  }
  }


  public fetchResults(checkedFilters: string[]): void {
  public fetchResults(checkedFilters: string[]): void {
    this.checkedFilterList = checkedFilters;
    this.searchService.checkedFilterList = checkedFilters;
    const inputTerm = this.searchForm.get('searchTerm').value;
    const inputTerm = this.searchForm.get('searchTerm').value;
    this.closeModal();
    this.closeModal();
    this.applyFilter(inputTerm);
    this.applyFilter(inputTerm);
@@ -124,8 +125,12 @@ export class SearchBarComponent implements OnInit, OnChanges {


  // Check if some modules is checked on filter and store number of modules checked
  // Check if some modules is checked on filter and store number of modules checked
  public countCheckedFilters(): void {
  public countCheckedFilters(): void {
    this.numberJobChecked = this.checkedFilterList.filter((filter) => this.jobTypes.includes(filter)).length;
    this.numberJobChecked = this.searchService.checkedFilterList.filter((filter) =>
    this.numberEmployersChecked = this.checkedFilterList.filter((filter) => this.employerTypes.includes(filter)).length;
      this.jobTypes.includes(filter)
    ).length;
    this.numberEmployersChecked = this.searchService.checkedFilterList.filter((filter) =>
      this.employerTypes.includes(filter)
    ).length;
  }
  }


  public getModalCategory(): string[] | Error {
  public getModalCategory(): string[] | Error {
@@ -155,25 +160,25 @@ export class SearchBarComponent implements OnInit, OnChanges {
  }
  }


  public resetFilters(): void {
  public resetFilters(): void {
    this.checkedFilterList = [];
    this.searchService.checkedFilterList = [];
    this.numberEmployersChecked = 0;
    this.numberEmployersChecked = 0;
    this.numberJobChecked = 0;
    this.numberJobChecked = 0;
    this.employerFilterChecked = [];
    this.employerFilterChecked = [];
    this.jobFilterChecked = [];
    this.jobFilterChecked = [];
    this.searchEvent.emit({ queryParam: '', jobFilters: [], employerFilter: [] });
    this.searchEvent.emit({ queryParam: '', jobFilters: [], employerFilters: [] });
    this.router.navigate(['/annuaire']);
    this.router.navigate(['/annuaire']);
    this.searchForm.reset();
    this.searchForm.reset();
  }
  }
  public removeFilter(filter: string): void {
  public removeFilter(filter: string): void {
    const index = this.checkedFilterList.findIndex((checkedFilter: string) => checkedFilter === filter);
    const index = this.searchService.checkedFilterList.findIndex((checkedFilter: string) => checkedFilter === filter);
    this.checkedFilterList.splice(index, 1);
    this.searchService.checkedFilterList.splice(index, 1);
    const inputTerm = this.searchForm.get('searchTerm').value;
    const inputTerm = this.searchForm.get('searchTerm').value;
    this.splitFilters(this.checkedFilterList);
    this.splitFilters(this.searchService.checkedFilterList);
    this.countCheckedFilters();
    this.countCheckedFilters();
    this.searchEvent.emit({
    this.searchEvent.emit({
      queryParam: inputTerm || '',
      queryParam: inputTerm || '',
      jobFilters: this.checkedFilterList.length ? this.jobFilterChecked : [],
      jobFilters: this.jobFilterChecked,
      employerFilter: this.checkedFilterList.length ? this.employerFilterChecked : [],
      employerFilters: this.employerFilterChecked,
    });
    });
  }
  }
}
}
Original line number Original line Diff line number Diff line
@@ -193,7 +193,7 @@
            maxlength="500"
            maxlength="500"
            [(ngModel)]="userProfile.description"
            [(ngModel)]="userProfile.description"
          ></textarea>
          ></textarea>
          <p class="descriptionLength">{{ userProfile.description?.length }}&nbsp;/&nbsp;500</p>
          <p class="descriptionLength">{{ userProfile.description?.length || 0 }}&nbsp;/&nbsp;500</p>
        </div>
        </div>
      </div>
      </div>


Original line number Original line Diff line number Diff line
import { ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { HttpErrorResponse } from '@angular/common/http';
import { HttpErrorResponse } from '@angular/common/http';
import { forkJoin, of } from 'rxjs';
import { forkJoin, of } from 'rxjs';
import { catchError, first, map } from 'rxjs/operators';
import { catchError, first, map } from 'rxjs/operators';
@@ -62,7 +63,8 @@ export class EditComponent implements OnInit {
    private profileService: ProfileService,
    private profileService: ProfileService,
    private notificationService: NotificationService,
    private notificationService: NotificationService,
    private cdr: ChangeDetectorRef,
    private cdr: ChangeDetectorRef,
    private authService: AuthService
    private authService: AuthService,
    private router: Router
  ) {}
  ) {}


  ngOnInit(): void {
  ngOnInit(): void {
@@ -100,7 +102,7 @@ export class EditComponent implements OnInit {
    return this.userProfile.surname !== '';
    return this.userProfile.surname !== '';
  }
  }
  public descriptionValid(): boolean {
  public descriptionValid(): boolean {
    return this.userProfile.description.length <= 500;
    return this.userProfile.description?.length <= 500;
  }
  }
  public emailValid(email: string): boolean {
  public emailValid(email: string): boolean {
    return !!email.match(CustomRegExp.EMAIL);
    return !!email.match(CustomRegExp.EMAIL);
@@ -196,7 +198,7 @@ export class EditComponent implements OnInit {
        phone: this.userProfile.phone,
        phone: this.userProfile.phone,
      })
      })
      .subscribe((user: User) => {
      .subscribe((user: User) => {
        this.notificationService.showSuccess('Vos coordonnées ont bien été mises à jour');
        this.notificationService.showSuccess('Vos informations ont bien été enregistrées');
        //Update localstorage
        //Update localstorage
        const updatedUser = {
        const updatedUser = {
          ...this.authService.userSubject.value,
          ...this.authService.userSubject.value,
@@ -207,6 +209,7 @@ export class EditComponent implements OnInit {
        localStorage.setItem('user', JSON.stringify(updatedUser));
        localStorage.setItem('user', JSON.stringify(updatedUser));
        this.authService.userSubject.next(updatedUser);
        this.authService.userSubject.next(updatedUser);
        this.updateInitialProfile();
        this.updateInitialProfile();
        this.router.navigate(['/profile']);
      });
      });
  }
  }


@@ -221,19 +224,24 @@ export class EditComponent implements OnInit {
        map((res) => res),
        map((res) => res),
        catchError(() => of(this.selectJob))
        catchError(() => of(this.selectJob))
      ),
      ),
      profile: this.profileService.updateProfile(this.selectedEmployer.name, this.selectedJob.name).pipe(
        map((res) => res),
        catchError(() => of())
      ),
    }).subscribe(() => {
    }).subscribe(() => {
      this.profileService.updateProfile(this.selectedEmployer.name, this.selectedJob.name).subscribe(
        () => {
          this.router.navigate(['/profile']);
          this.notificationService.showSuccess('Vos informations ont bien été enregistrées');
          this.notificationService.showSuccess('Vos informations ont bien été enregistrées');
        },
        () => {
          this.notificationService.showError("Vos informations n'ont pas été enregistrées", 'Une erreur est survenue');
        }
      );
    });
    });
  }
  }


  public confirmDescription(): void {
  public confirmDescription(): void {
    this.profileService.updateDescription(this.userProfile.description).subscribe(() => {
    this.profileService.updateDescription(this.userProfile.description).subscribe(() => {
      this.notificationService.showSuccess('Vos description a bien été enregistrée');
      this.notificationService.showSuccess('Vos informations ont bien été enregistrées');
      this.updateInitialProfile();
      this.updateInitialProfile();
      this.router.navigate(['/profile']);
    });
    });
  }
  }


Original line number Original line Diff line number Diff line
@@ -33,7 +33,6 @@
          <p class="section-title">informations</p>
          <p class="section-title">informations</p>
          <div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="12px">
          <div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="12px">
            <app-button
            <app-button
              *ngIf="!isPublic"
              class="hide-on-mobile"
              class="hide-on-mobile"
              [type]="'button'"
              [type]="'button'"
              [iconBtn]="'eyePassword'"
              [iconBtn]="'eyePassword'"
@@ -45,7 +44,6 @@
              [routerLinkActive]="'active'"
              [routerLinkActive]="'active'"
            ></app-button>
            ></app-button>
            <app-button
            <app-button
              *ngIf="!isPublic"
              class="hide-on-desktop"
              class="hide-on-desktop"
              [type]="'button'"
              [type]="'button'"
              [iconBtn]="'eyePassword'"
              [iconBtn]="'eyePassword'"
Original line number Original line Diff line number Diff line
@@ -163,7 +163,7 @@
        <app-no-information *ngIf="!hasWebsite() && !hasSocialNetworks()"></app-no-information>
        <app-no-information *ngIf="!hasWebsite() && !hasSocialNetworks()"></app-no-information>
        <ng-container *ngIf="hasWebsite() || hasSocialNetworks()">
        <ng-container *ngIf="hasWebsite() || hasSocialNetworks()">
          <div *ngIf="structure.website">
          <div *ngIf="structure.website">
            <a href="structure.website">{{ structure.website }}</a>
            <a href="{{ structure.website }}">{{ structure.website }}</a>
          </div>
          </div>


          <!-- Social networks-->
          <!-- Social networks-->
Original line number Original line Diff line number Diff line
@@ -4,7 +4,9 @@
      <div fxLayout="row" fxLayoutAlign="space-between center" fxFill>
      <div fxLayout="row" fxLayoutAlign="space-between center" fxFill>
        <div fxLayout="row" fxLayoutAlign="start center" class="headerBack">
        <div fxLayout="row" fxLayoutAlign="start center" class="headerBack">
          <app-svg-icon [iconClass]="'backArrow'" [type]="'ico'" [icon]="'arrowBack'" (click)="goBack()"></app-svg-icon>
          <app-svg-icon [iconClass]="'backArrow'" [type]="'ico'" [icon]="'arrowBack'" (click)="goBack()"></app-svg-icon>
          <h1>Gérer les membres<br />de {{ structure.structureName }}</h1>
          <h1>
            Gérer les membres de <span>{{ structure.structureName }}</span>
          </h1>
        </div>
        </div>
        <app-button
        <app-button
          [style]="buttonTypeEnum.Secondary"
          [style]="buttonTypeEnum.Secondary"