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
Showing
with 66 additions and 133 deletions
......@@ -16,7 +16,7 @@
<img src="../../assets/form/profileSkip.svg" alt="Image profil" />
<div class="footerForm" fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="center center">
<app-button (action)="goToHome()" [text]="'Plus tard'"></app-button>
<app-button (action)="goToNextPage()" [text]="'C`est parti !'" [style]="buttonTypeEnum.Primary"></app-button>
<app-button (action)="goToNextPage()" [text]="'C\'est parti !'" [style]="buttonTypeEnum.Primary"></app-button>
</div>
</div>
</ng-container>
......@@ -25,7 +25,7 @@
<img src="../../assets/form/emailVerification.svg" alt="Image message envoyé" />
<p *ngIf="isClaimed">Un message a été envoyé aux membres de la structure :</p>
<p *ngIf="!isClaimed">
Un message a été envoyé aux administrateurs Rés'IN pour valider l'affectation de votre compte à la structure :
Un message a été envoyé aux administrateurs Rés'in pour valider l'affectation de votre compte à la structure :
</p>
<span>{{ structureName }}</span>
</div>
......@@ -34,7 +34,7 @@
<div class="information-step-container structure-time no-max-width">
<h3>
Nous vous proposons de prendre 10 minutes afin de renseigner les informations de la structure et la créer sur
Résin.
Rés'in.
</h3>
<img src="../../assets/form/formTime.svg" alt="image renseignement des informations" />
<p>Informations dont il faut vous munir :</p>
......@@ -51,7 +51,7 @@
*ngIf="formType === formTypeEnum.structure && step === structureFormStepEnum.structureCreationFinishedInfo"
>
<div class="structureCreated no-max-width">
<h3>La structure est désormais référencée sur Résin.</h3>
<h3>La structure est désormais référencée sur Rés'in.</h3>
<img src="../../assets/form/structureCreated.svg" alt="image structure référencée" />
<p *ngIf="hasPersonalOffer">
Les prochaines questions concernent les services que vous dispensez en tant qu’intervenant dans cette structure.
......@@ -60,8 +60,12 @@
</ng-container>
<ng-container *ngIf="formType === formTypeEnum.structure && step === structureFormStepEnum.noStructure">
<div class="information-step-container profile-updated no-max-width">
<img src="../../assets/form/profileUpdated.svg" alt="image profil" />
<p class="no-margin-top">Votre profil a bien été mis à jour.</p>
<img src="../../assets/form/profileSkip.svg" alt="image profil" />
<h3 class="no-margin-top">La structure n'a pas vocation à être créée dans Rés'in.</h3>
<p class="no-margin-top">
Rés'in ne référence que les structures qui disposent d'un lieu d'accueil pour faire de l'accompagnement ou de la
formation.
</p>
<div class="btn">
<app-button
[style]="buttonTypeEnum.Primary"
......@@ -74,10 +78,7 @@
</div>
</ng-container>
<ng-container
*ngIf="
(formType === formTypeEnum.personaloffer && step === personalOfferFormStep.personalOfferFinishedInfo) ||
(formType === formTypeEnum.structure && step === structureFormStepEnum.StructureInfoUnknown)
"
*ngIf="formType === formTypeEnum.personaloffer && step === personalOfferFormStep.personalOfferFinishedInfo"
>
<div class="information-step-container profile-updated no-max-width">
<img src="../../assets/form/profileUpdated.svg" alt="image profil" />
......
......@@ -84,6 +84,14 @@
}
}
&.profile-updated {
h3 {
@include lato-bold-24;
text-align: center;
}
p {
@include lato-regular-18;
text-align: center;
}
.centered {
text-align: center;
font-weight: normal;
......
......@@ -5,7 +5,7 @@
.progressBar {
max-width: 980px;
margin: 1rem auto;
margin: 1rem auto 0;
@media #{$tablet} {
margin: 0.625rem;
......
<form [formGroup]="structureForm" *ngIf="structureForm" (keyup.enter)="isPageValid && !isEditMode ? nextPage() : null">
<div class="title">
<h3>Souhaitez-vous renseigner les informations de la structure&nbsp;?</h3>
<p>Exemple : type d'établissement, accessibilité PMR, type de public&nbsp;?</p>
</div>
<app-radio-form
[selectedOption]="structureForm.get('choiceCompletion').value"
(selectedEvent)="onRadioChange('choiceCompletion', $event)"
>
</app-radio-form>
</form>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { StructureChoiceCompletionComponent } from './structure-choice-completion.component';
describe('StructureChoiceCompletionComponent', () => {
let component: StructureChoiceCompletionComponent;
let fixture: ComponentFixture<StructureChoiceCompletionComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ StructureChoiceCompletionComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(StructureChoiceCompletionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-choice-completion',
templateUrl: './structure-choice-completion.component.html',
})
export class StructureChoiceCompletionComponent {
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() radioChange = new EventEmitter<any>();
@Output() validateForm = new EventEmitter<any>();
ngOnInit(): void {
this.validateForm.emit();
}
public onRadioChange(name: string, value: boolean): void {
this.radioChange.emit({ name, value });
}
public goBack(): void {
history.back();
}
}
......@@ -9,15 +9,9 @@
></app-svg-icon>
<div class="titleContent">
<h3>Comment joindre votre structure&nbsp;?</h3>
<label class="label-optional">Veuillez renseigner au moins un des 2 champs</label>
</div>
</div>
<p
class="missing-information"
*ngIf="isEditMode && (!structureForm.get('contactPhone').valid || !structureForm.get('contactMail').valid)"
>
<app-svg-icon [iconClass]="'icon-26'" [type]="'form'" [icon]="'notValidate'" class="validationIcon"></app-svg-icon>
<span>Il faut renseigner tous les champs</span>
</p>
<div class="form-group" fxLayout="column">
<label for="structureName">Email de la structure</label>
<div fxLayout="row" fxLayoutGap="13px">
......@@ -39,7 +33,6 @@
<div class="form-group" fxLayout="column">
<div fxLayout="row" fxLayoutGap="8px">
<label for="contactPhone">Téléphone de la structure</label>
<label class="label-optional">(Facultatif)</label>
</div>
<div fxLayout="row" fxLayoutGap="13px">
<input
......
......@@ -42,11 +42,14 @@ export class StructureEquipmentsComponent implements OnInit {
/**
* Check if first letter is a vowel and returns text with correct preposition
* @param equipment Equipment
* @returns "de tablalettres" | "d'imprimantes"
* @returns "de tablette(s)" | "d'imprimante(s)"
*/
public formatEquipment(equipment: string): string {
if (this.vowels.includes(equipment.toLocaleLowerCase()[0])) return `d'${equipment.toLocaleLowerCase()}`;
return `de ${equipment.toLocaleLowerCase()}(s)`;
if (this.vowels.includes(equipment.toLocaleLowerCase()[0])) {
return `d'${equipment.toLocaleLowerCase()}(s)`;
} else {
return `de ${equipment.toLocaleLowerCase()}(s)`;
}
}
public goBack(): void {
history.back();
......
......@@ -11,8 +11,7 @@
*ngIf="
currentStep === structureFormStep.structureFormTime ||
currentStep === structureFormStep.mailSentInfo ||
currentStep === structureFormStep.noStructure ||
currentStep === structureFormStep.StructureInfoUnknown
currentStep === structureFormStep.noStructure
"
class="no-max-width"
>
......@@ -47,14 +46,6 @@
(radioChange)="onRadioChange($event)"
></app-structure-accompaniment-choice>
</div>
<div *ngIf="currentStep == structureFormStep.structureChoiceCompletion">
<app-structure-choice-completion
[isEditMode]="isEditMode"
[structureForm]="structureForm"
(validateForm)="setValidationsForm()"
(radioChange)="onRadioChange($event)"
></app-structure-choice-completion>
</div>
<div *ngIf="currentStep == structureFormStep.structureContactCompletion">
<app-structure-contact-completion
[isEditMode]="isEditMode"
......
......@@ -157,14 +157,11 @@ export class StructureFormComponent implements OnChanges, OnInit {
valid: this.structureForm.get('structureName').valid && this.structureForm.get('address').valid,
};
this.pagesValidation[structureFormStep.structureContact] = {
valid: this.structureForm.get('contactMail').valid && this.structureForm.get('contactPhone').valid,
valid: this.structureForm.get('contactMail').valid || this.structureForm.get('contactPhone').valid,
};
this.pagesValidation[structureFormStep.structureAccompanimentChoice] = {
valid: this.structureForm.get('placeOfReception').valid,
};
this.pagesValidation[structureFormStep.structureChoiceCompletion] = {
valid: this.isEditMode ? true : this.structureForm.get('choiceCompletion').valid,
};
this.pagesValidation[structureFormStep.structureContactCompletion] = {
valid: this.isEditMode
? true
......
import { ThisReceiver } from '@angular/compiler';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms';
import { Address } from '../../../../models/address.model';
......
......@@ -3,7 +3,6 @@ export enum structureFormStep {
structureAccompanimentChoice,
structureNameAndAddress,
structureContact,
structureChoiceCompletion,
structureFormTime,
structureContactCompletion,
structureType,
......@@ -27,5 +26,4 @@ export enum structureFormStep {
structureCreationFinishedInfo,
mailSentInfo,
noStructure,
StructureInfoUnknown,
}
......@@ -5,7 +5,6 @@ import { PreferredLanguages } from '../../enums/preferredLanguages.enum';
@Component({
selector: 'app-mediation-language-selection',
templateUrl: './mediation-language-selection.component.html',
styleUrls: ['./mediation-language-selection.component.scss'],
})
export class MediationLanguageSelectionComponent implements OnInit {
@Input() form: UntypedFormGroup;
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms';
import { Structure } from '../../../../../models/structure.model';
import { GeojsonService } from '../../../../../services/geojson.service';
import { NotificationService } from '../../../../../services/notification.service';
import { RdvsService } from '../../../../../services/rdvs.service';
import { StructureService } from '../../../../../services/structure.service';
import { Filter } from '../../../../../structure-list/models/filter.model';
import * as _ from 'lodash';
import { GeojsonService } from '../../../../../services/geojson.service';
@Component({
selector: 'app-meeting-rdvs-doing',
......
import { CanDeactivate } from '@angular/router';
import { Injectable } from '@angular/core';
import { CanDeactivate } from '@angular/router';
import { Observable } from 'rxjs';
export interface IDeactivateComponent {
......
......@@ -12,7 +12,7 @@ export class LegalNoticeComponent implements OnInit {
ngOnInit(): void {
this.meta.updateTag({
name: 'description',
content: "Mentions légales de Rés'IN, le Réseau des acteurs de l'inclusion numérique de la métropole de Lyon",
content: "Mentions légales de Rés'in, le Réseau des acteurs de l'inclusion numérique de la métropole de Lyon",
});
}
}
......@@ -2,8 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import { ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import * as _ from 'lodash';
import { forkJoin, of } from 'rxjs';
import { catchError, first, map } from 'rxjs/operators';
import { catchError, first } from 'rxjs/operators';
import { Employer } from '../../models/employer.model';
import { Job } from '../../models/job.model';
import { User } from '../../models/user.model';
......@@ -58,6 +57,7 @@ export class EditComponent implements OnInit {
private selectedEmployer: Employer;
private isAlreadySearching = false;
public isNewUser = false;
public isNewEmployer: boolean;
@ViewChild('searchEmployer') searchEmployer: ElementRef;
@ViewChild('newJobInput') newJobInput: ElementRef;
......@@ -207,7 +207,7 @@ export class EditComponent implements OnInit {
})
.subscribe((user: User) => {
this.notificationService.showSuccess('Vos informations ont bien été enregistrées');
//Update localstorage
// Update localStorage
const updatedUser = {
...this.authService.userSubject.value,
name: user.name,
......@@ -222,26 +222,26 @@ export class EditComponent implements OnInit {
}
public confirmEmployer(): void {
if (this.newJob) this.selectedJob = this.newJob;
forkJoin({
employer: this.profileService.createEmployer(this.selectedEmployer).pipe(
map((res) => res),
catchError(() => of(this.selectedEmployer))
),
job: this.profileService.createJob(this.selectedJob).pipe(
map((res) => res),
catchError(() => of(this.selectJob))
),
}).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.showError("Vos informations n'ont pas été enregistrées", 'Une erreur est survenue');
}
);
if (this.newJob) {
this.selectedJob = this.newJob;
this.profileService.createJob(this.selectedJob).subscribe((res) => {
console.log(res);
});
}
if (this.isNewEmployer) {
this.profileService.createEmployer(this.selectedEmployer).subscribe((res) => {
console.log(res);
});
}
this.profileService.updateProfile(this.selectedEmployer.name, this.selectedJob.name).subscribe({
next: () => {
this.router.navigate(['/profile']);
this.notificationService.showSuccess('Vos informations ont bien été enregistrées');
},
error: () => {
this.notificationService.showError("Vos informations n'ont pas été enregistrées", 'Une erreur est survenue');
},
});
}
......@@ -306,9 +306,10 @@ export class EditComponent implements OnInit {
);
}
//Jobs
// Jobs
public selectJob(job: Job): void {
this.selectedJob = job;
this.newJob = null;
}
public isSelectedJob(job: Job): boolean {
return this.selectedJob && this.selectedJob.name === job.name;
......@@ -320,17 +321,23 @@ export class EditComponent implements OnInit {
this.newJob = new Job({ name: value, validated: false, hasPersonalOffer: true });
}
//Structures
// Structures
public onSearchChange(searchString: string): void {
if (searchString.length <= 2) this.getEmployers();
this.getEmployers(searchString);
this.selectedEmployer = new Employer({ name: searchString, validated: false });
if (!this.employers.map((employer) => employer.name).includes(this.selectedEmployer?.name)) {
this.isNewEmployer = true;
} else {
this.isNewEmployer = false;
}
}
public selectEmployer(employer: Employer): void {
if (employer) this.searchEmployer.nativeElement.value = employer.name;
this.selectedEmployer = employer;
this.employers = [];
this.isNewEmployer = false;
}
private getEmployers(searchString: string = '') {
......
import { animate, AUTO_STYLE, state, style, transition, trigger } from '@angular/animations';
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input } from '@angular/core';
import { ButtonType } from '../../../shared/components/button/buttonType.enum';
import { PersonalOffer } from './../../../models/personalOffer.model';
......
......@@ -4,13 +4,11 @@ import { User } from '../../../models/user.model';
@Component({
selector: 'app-profile-structure-member',
templateUrl: './profile-structure-member.component.html',
styleUrls: ['./profile-structure-member.component.scss']
styleUrls: ['./profile-structure-member.component.scss'],
})
export class ProfileStructureMemberComponent {
@Input() public member: User;
constructor() {}
getJobEmployer(): string {
if (this.member.job?.name && this.member.employer?.name) {
return this.member.job.name + ', ' + this.member.employer.name;
......