Skip to content
Snippets Groups Projects
Commit aae2d550 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix: retours review

parent b73ba205
No related branches found
No related tags found
4 merge requests!418V2.1.0,!400V2.0,!357Resolve "Retours sprint",!230V2.0
Showing
with 85 additions and 74 deletions
......@@ -2,12 +2,7 @@
<div class="userNumber">
{{ userList.length }} utilisateur(s)<span *ngIf="showPagination"> sur {{ totalUserResult }} </span>
</div>
<div
class="singleUser"
[ngClass]="{ singleResult: userList.length == 1 }"
*ngFor="let user of userList; let index = index"
(click)="goToUser(user._id)"
>
<div class="singleUser" *ngFor="let user of userList; let index = index" (click)="goToUser(user._id)">
<div class="avatar-container">
<app-svg-icon class="avatar" [type]="'avatar'" [icon]="'defaultAvatar'" [iconClass]="'icon-40'"></app-svg-icon>
</div>
......
......@@ -19,7 +19,7 @@
.userNumber {
font-size: 0.875rem;
color: $grey-3;
margin: 1rem 0.75rem;
padding: 1rem 0.75rem;
}
&.empty {
padding-bottom: 2rem;
......@@ -91,9 +91,9 @@
.singleUser {
display: flex;
align-items: center;
gap: 0.5rem;
height: 65px;
padding: 0.75rem;
border-bottom: solid 1px $grey-8;
box-sizing: border-box;
cursor: pointer;
transition: all 300ms ease;
......@@ -104,6 +104,9 @@
&:hover {
background: $grey-8;
}
&:not(:last-child) {
border-bottom: solid 1px $grey-8;
}
.avatar-container {
width: 40px;
height: 44px;
......@@ -111,7 +114,6 @@
background: $grey-8;
}
.identity {
margin: 0 0.5rem;
max-width: 330px;
p {
margin: 0;
......@@ -128,7 +130,4 @@
color: $grey-3;
}
}
.singleResult {
border-bottom: none;
}
}
......@@ -46,7 +46,6 @@ export class FooterFormComponent implements OnChanges {
private authService: AuthService,
public utils: Utils,
private router: Router,
private profileService: ProfileService,
private newsletterService: NewsletterService
) {}
public goToNextPage(): void {
......@@ -96,13 +95,6 @@ export class FooterFormComponent implements OnChanges {
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 {
if (!this.isEditMode && this.currentForm === formType.structure) {
if (this.currentStep === structureFormStep.structureType) {
......@@ -118,7 +110,7 @@ export class FooterFormComponent implements OnChanges {
return;
}
if (this.currentStep === structureFormStep.structureTrainingType) {
if (this.isOtherAccompanimentSelected()) {
if (this.utils.isOtherAccompanimentSelected(this.form)) {
this.changeCurrentStep.emit(structureFormStep.structureDigitalHelpingAccompanimentOther);
} else {
this.changeCurrentStep.emit(structureFormStep.structureDigitalHelpingAccompaniment);
......@@ -177,7 +169,7 @@ export class FooterFormComponent implements OnChanges {
}
// Check if trainings are selected in order to ask for pricing
if (this.currentStep === structureFormStep.structureDigitalHelpingAccompaniment) {
if (this.isOtherAccompanimentSelected()) {
if (this.utils.isOtherAccompanimentSelected(this.form)) {
this.changeCurrentStep.emit(structureFormStep.structureDigitalHelpingAccompanimentOther);
} else {
this.changeCurrentStep.emit(structureFormStep.structureTrainingType);
......
......@@ -14,7 +14,7 @@
max-width: 980px;
width: 100%;
height: 100%;
margin: 1rem auto;
margin: 0 auto;
overflow-y: auto;
color: $grey-1;
background: $white;
......
......@@ -14,6 +14,7 @@ import { StructureService } from '../../services/structure.service';
import { MustMatch } from '../../shared/validator/form';
import { CustomRegExp } from '../../utils/CustomRegExp';
import { formUtils } from '../../utils/formUtils';
import { Utils } from '../../utils/utils';
import { stepType } from '../step.type';
import { accountFormStep } from './account-form/accountFormStep.enum';
import { formType } from './formType.enum';
......@@ -78,13 +79,14 @@ export class FormViewComponent implements OnInit, AfterViewInit {
public isRegisterNewMember: boolean = false;
constructor(
private router: Router,
private route: ActivatedRoute,
private cdRef: ChangeDetectorRef,
private notificationService: NotificationService,
private personalOfferService: PersonalOfferService,
private profileService: ProfileService,
private route: ActivatedRoute,
private router: Router,
private structureService: StructureService,
private personalOfferService: PersonalOfferService,
private notificationService: NotificationService,
private cdRef: ChangeDetectorRef
private utils: Utils
) {}
ngAfterViewInit(): void {
......@@ -363,6 +365,9 @@ export class FormViewComponent implements OnInit, AfterViewInit {
});
}
public async saveStructureForm(): Promise<void> {
if (!this.utils.isOtherAccompanimentSelected(this.structureForm)) {
this.structureForm.get('otherDescription').setValue(null);
}
const user = await this.profileService.getProfile();
const newStructure = new Structure(this.structureForm.value);
newStructure.hours = this.hoursForm.value;
......@@ -383,6 +388,7 @@ export class FormViewComponent implements OnInit, AfterViewInit {
this.isPageValid = false;
this.currentPage = step;
}
public async saveEditedStructure() {
this.structureService.editStructure(this.getCurrentChanges(this.currentPage), this.structure._id).subscribe(() => {
this.notificationService.showSuccess('Vos modifications ont bien été prises en compte.', '');
......@@ -442,16 +448,16 @@ export class FormViewComponent implements OnInit, AfterViewInit {
publicOthers: this.structureForm.get('categories').get('publicOthers').value,
},
};
case structureFormStep.structureDigitalHelpingAccompanimentOther:
return {
otherDescription: this.structureForm.get('otherDescription').value,
};
case structureFormStep.structureDigitalHelpingAccompaniment:
return {
categories: {
onlineProcedures: this.structureForm.get('categories').get('onlineProcedures').value,
},
};
case structureFormStep.structureDigitalHelpingAccompanimentOther:
return {
otherDescription: this.structureForm.get('otherDescription').value,
};
case structureFormStep.structureTrainingType:
return {
categories: {
......
......@@ -6,7 +6,7 @@
.progressBar {
height: #{$progressBar-height};
max-width: 980px;
margin: 16px auto 8px auto;
margin: 16px auto;
@media #{$tablet} {
margin: 0px 4px;
......
......@@ -7,6 +7,10 @@
width: 380px;
}
h2 {
margin-top: 0;
}
.search {
width: 380px;
border-radius: 20px;
......
......@@ -14,7 +14,7 @@
</div>
<div class="labelsQualifications" *ngIf="labelsQualifications" fxLayout="row wrap" fxLayoutAlign="flex-start">
<app-checkbox-form
*ngFor="let module of labelsQualifications.modules"
*ngFor="let module of labelsQualifications.modules.sort()"
[isChecked]="isInArray(module.id, 'labelsQualifications')"
[text]="module.name"
[iconSvg]="module.id"
......
......@@ -8,7 +8,7 @@
[icon]="'arrowBack'"
></app-svg-icon>
<div class="titleContent">
<h3>Ces formations sont-elles gratuites&nbsp;?</h3>
<h3>Ces accompagnements sont-ils gratuits&nbsp;?</h3>
</div>
</div>
<app-radio-form
......
......@@ -8,7 +8,7 @@
[icon]="'arrowBack'"
></app-svg-icon>
<div class="titleContent">
<h3>Quelles formations au numérique proposez-vous&nbsp;?</h3>
<h3>Quels accompagnements au numérique proposez-vous&nbsp;?</h3>
<p>Facultatif</p>
</div>
</div>
......
......@@ -8,7 +8,7 @@
[icon]="'arrowBack'"
></app-svg-icon>
<div class="titleContent">
<h3>Le wifi est-il proposé en accès libre&nbsp;?</h3>
<h3>Proposez-vous du wifi en accès libre&nbsp;?</h3>
</div>
</div>
<app-radio-form
......
<h2>Quelle démarche en ligne le bénéficiaire a-t-il besoin de réaliser ?</h2>
<div fxLayout="column" fxLayoutGap="32px">
<div class="btn-grid">
<span *ngFor="let module of accompanimentType">
<app-button
[ngClass]="{ selectedChoice: true }"
[extraClass]="isSelectedModule(module.id) ? 'selected' : ''"
[style]="buttonTypeEnum.CheckButton"
[text]="module.name"
(action)="handleClick(module)"
></app-button>
</span>
</div>
<div class="btn-grid btnContainer">
<span *ngFor="let module of accompanimentType">
<app-button
[ngClass]="{ selectedChoice: true }"
[extraClass]="isSelectedModule(module.id) ? 'selected' : ''"
[style]="buttonTypeEnum.CheckButton"
[text]="module.name"
(action)="handleClick(module)"
></app-button>
</span>
</div>
<app-modal-confirmation
[openned]="showStrangersModal"
......
@import '../../../../../assets/scss/buttons';
.btnContainer {
max-width: 600px;
}
......@@ -9,6 +9,7 @@ import { SearchService } from '../../../../structure-list/services/search.servic
@Component({
selector: 'app-online-demarch',
templateUrl: './online-demarch.component.html',
styleUrls: ['./online-demarch.component.scss'],
})
export class OnlineDemarchComponent implements OnInit {
@Input() form: UntypedFormGroup;
......
<div class="orientation">
<app-progress-bar [currentPage]="currentStep"></app-progress-bar>
<div class="content">
<div class="container">
<app-needs-selection
*ngIf="currentStep === null"
[form]="orientationForm"
......
......@@ -3,11 +3,15 @@
@import '../../../assets/scss/layout';
@import '../../../assets//scss/typography';
::ng-deep h2 {
margin-top: 0;
}
.orientation {
height: 100%;
display: flex;
flex-direction: column;
.content {
.container {
box-sizing: border-box;
max-width: 980px;
width: 100%;
......
......@@ -61,7 +61,9 @@ export class OrientationFormViewComponent implements OnInit, AfterContentChecked
this.validatePage(true);
switch (needType) {
case needsType.onlineDemarch:
if (!this.onlineDemarchForm) this.onlineDemarchForm = this.orientationUtils.createOnlineDemarchForm();
if (!this.onlineDemarchForm) {
this.onlineDemarchForm = this.orientationUtils.createOnlineDemarchForm();
}
break;
// case needsType.equipmentBuy:
// this.equipmentBuyForm = this.orientationUtils.createOnlineDemarchForm();
......@@ -91,7 +93,8 @@ export class OrientationFormViewComponent implements OnInit, AfterContentChecked
}
window.print();
setTimeout(() => {
this.router.navigateByUrl('/acteurs');
this.onlineDemarchForm = this.orientationUtils.createOnlineDemarchForm();
this.currentStep = 0;
}, 100);
});
}
......
......@@ -15,7 +15,7 @@ export class Structure {
public numero: string = null;
public createdAt: string = null;
public updatedAt: string = null;
public toBeDeletedAt: string = null;
public toBeDeletedAt?: string = null;
public structureName: string = null;
public structureType: StructureType = null;
public description: string = null;
......
<div class="structureMember">
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px" fxFill>
<app-svg-icon
class="avatar hide-on-mobile"
[type]="'avatar'"
[icon]="'defaultAvatar'"
[iconClass]="'icon-40'"
></app-svg-icon>
<div class="nameJobSection" fxLayout="column" fxLayoutAlign="start start">
<a routerLink="/profile/{{ member._id }}" class="name">{{ member.name }} {{ member.surname }}</a>
<p class="jobEmployer">{{ getJobEmployer() }}</p>
</div>
<div fxLayout="column" fxLayoutAlign="space-between start" fxLayoutGap="4px">
<p>{{ member.phone }}</p>
<a class="email" href="mailto:{{ member.email }}">{{ member.email }}</a>
</div>
<app-svg-icon
class="avatar hide-on-mobile"
[type]="'avatar'"
[icon]="'defaultAvatar'"
[iconClass]="'icon-40'"
></app-svg-icon>
<div class="nameJobSection">
<a routerLink="/profile/{{ member._id }}" class="name">{{ member.name }} {{ member.surname }}</a>
<p class="jobEmployer">{{ getJobEmployer() }}</p>
</div>
<div class="contact">
<p>{{ member.phone }}</p>
<a class="email" href="mailto:{{ member.email }}">{{ member.email }}</a>
</div>
</div>
......@@ -5,6 +5,9 @@
.structureMember {
@include lato-regular-14;
display: flex;
align-items: center;
gap: 8px;
.avatar {
display: flex;
......@@ -15,11 +18,6 @@
p {
margin: 0;
&.jobEmployer {
display: flex;
height: 34px;
align-items: center;
}
}
a {
&.name {
......@@ -32,6 +30,14 @@
}
}
.contanct,
.nameJobSection {
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 4px;
}
.nameJobSection {
width: 50%;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment