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

Merge branch '48-retours-sprint' into 'V2.0'

Resolve "Retours sprint"

Closes #48

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