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 180 additions and 17 deletions
import { NgModule } from '@angular/core';
import { Route, RouterModule, Routes } from '@angular/router';
import { AnnuaireComponent } from './annuaire/annuaire.component';
import { CartoComponent } from './carto/carto.component';
import { ContactComponent } from './contact/contact.component';
import { FooterComponent } from './footer/footer.component';
......@@ -215,7 +216,16 @@ const routes: Routes = [
footerOutletRoute,
],
},
{
path: 'annuaire',
children: [
{
path: '',
component: AnnuaireComponent,
},
footerOutletRoute,
],
},
{
path: 'news',
children: [
......
......@@ -46,6 +46,10 @@ import { DataShareConsentComponent } from './shared/components/data-share-consen
import { FormViewModule } from './form/form-view/form-view.module';
import { LoginComponent } from './login/login.component';
import { StructureExcludeComponent } from './structure/structure-exclude/structure-exclude.component';
import { AnnuaireComponent } from './annuaire/annuaire.component';
import { SearchBarComponent } from './annuaire/search-bar/search-bar.component';
import { ResultListComponent } from './annuaire/result-list/result-list.component';
import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component';
@NgModule({
declarations: [
......@@ -73,6 +77,10 @@ import { StructureExcludeComponent } from './structure/structure-exclude/structu
OrientationComponent,
LoginComponent,
StructureExcludeComponent,
AnnuaireComponent,
SearchBarComponent,
ResultListComponent,
FilterModalComponent,
],
imports: [
BrowserModule,
......
......@@ -12,6 +12,7 @@ import { formType } from '../form-view/formType.enum';
import { personalOfferFormStep } from '../form-view/personal-offer-form/personalOfferFormStep.enum';
import { profileFormStep } from '../form-view/profile-form/profileFormStep.enum';
import { structureFormStep } from '../form-view/structure-form/structureFormStep.enum';
import { stepType } from '../step.type';
@Component({
selector: 'app-footer-form',
......@@ -28,7 +29,7 @@ export class FooterFormComponent implements OnChanges {
@Input() form: UntypedFormGroup;
@Input() linkedStructureId: Array<string> = null;
@Input() acceptNewsletter: boolean;
@Input() currentStep: accountFormStep | profileFormStep | structureFormStep | personalOfferFormStep;
@Input() currentStep: stepType;
@Input() hasOtherPersonalOffer: boolean;
@Input() isEditMode: boolean;
@Output() goNext = new EventEmitter<any>();
......
......@@ -14,14 +14,13 @@ import { StructureService } from '../../services/structure.service';
import { MustMatch } from '../../shared/validator/form';
import { CustomRegExp } from '../../utils/CustomRegExp';
import { formUtils } from '../../utils/formUtils';
import { stepType } from '../step.type';
import { accountFormStep } from './account-form/accountFormStep.enum';
import { formType } from './formType.enum';
import { personalOfferFormStep } from './personal-offer-form/personalOfferFormStep.enum';
import { profileFormStep } from './profile-form/profileFormStep.enum';
import { structureFormStep } from './structure-form/structureFormStep.enum';
type stepType = accountFormStep | profileFormStep | structureFormStep | personalOfferFormStep;
@Component({
selector: 'app-form-view',
templateUrl: './form-view.component.html',
......@@ -352,11 +351,103 @@ export class FormViewComponent implements OnInit {
this.currentPage = step;
}
public async saveEditedStructure() {
let editStructure = this.editForm.value;
editStructure.hours = this.hoursForm.value;
this.structureService.editStructure(editStructure).subscribe(() => {
this.structureService.editStructure(this.getCurrentChanges(this.currentPage), this.structure._id).subscribe(() => {
this.notificationService.showSuccess('Vos modifications ont bien été prises en compte.', '');
history.back();
});
}
/**
* Returns only fields on the current step for edition.
* We have to do this because some fields might not be completed and we cannot send the full object because of BO validation
*/
public getCurrentChanges(currentPage: stepType): Partial<Structure> {
switch (currentPage) {
case structureFormStep.structureChoice:
return {
_id: this.structureForm.get('_id').value
};
case structureFormStep.structureNameAndAddress:
return {
structureName: this.structureForm.get('structureName').value,
address: this.structureForm.get('address').value
};
case structureFormStep.structureContact:
return {
contactPhone: this.structureForm.get('contactPhone').value,
contactMail: this.structureForm.get('contactMail').value
};
case structureFormStep.structureAccessModality:
return {
accessModality: this.structureForm.get('accessModality').value
};
case structureFormStep.structureHours:
return {
hours: this.hoursForm.value,
exceptionalClosures: this.structureForm.get('exceptionalClosures').value
};
case structureFormStep.structurePmr:
return {
pmrAccess: this.structureForm.get('pmrAccess').value
};
case structureFormStep.structureWebAndSocialNetwork:
return {
facebook: this.structureForm.get('facebook').value,
instagram: this.structureForm.get('instagram').value,
linkedin: this.structureForm.get('linkedin').value,
twitter: this.structureForm.get('twitter').value,
website: this.structureForm.get('website').value
};
case structureFormStep.structurePublicTarget:
return { publics: this.structureForm.get('publics').value };
case structureFormStep.structureDigitalHelpingAccompaniment:
return {
proceduresAccompaniment: this.structureForm.get('proceduresAccompaniment').value
};
case structureFormStep.structureTrainingType:
return {
accessRight: this.structureForm.get('accessRight').value,
baseSkills: this.structureForm.get('baseSkills').value,
digitalCultureSecurity: this.structureForm.get('digitalCultureSecurity').value,
parentingHelp: this.structureForm.get('parentingHelp').value,
socialAndProfessional: this.structureForm.get('socialAndProfessional').value
};
case structureFormStep.structureTrainingPrice:
return {
freeWorkShop: this.structureForm.get('freeWorkShop').value
};
case structureFormStep.structureWifi:
return {
equipmentsAndServices: this.structureForm.get('equipmentsAndServices').value
};
case structureFormStep.structureEquipments:
return {
nbComputers: this.structureForm.get('nbComputers').value,
nbNumericTerminal: this.structureForm.get('nbNumericTerminal').value,
nbPrinters: this.structureForm.get('nbPrinters').value,
nbScanners: this.structureForm.get('nbScanners').value,
nbTablets: this.structureForm.get('nbTablets').value
};
case structureFormStep.structureLabels:
return {
labelsQualifications: this.structureForm.get('labelsQualifications').value
};
case structureFormStep.structureOtherServices:
return {
equipmentsAndServices: this.structureForm.get('equipmentsAndServices').value
};
case structureFormStep.structureDescription:
return {
description: this.structureForm.get('description').value
};
case structureFormStep.structureCovidInfo:
return {
lockdownActivity: this.structureForm.get('lockdownActivity').value
};
case structureFormStep.structureConsent:
return {
dataShareConsentDate: this.structureForm.get('dataShareConsentDate').value ? new Date().toString() : null
};
}
}
}
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Structure } from '../../../../models/structure.model';
import * as _ from 'lodash';
import { TclService } from '../../../../services/tcl.service';
import { TclStopPoint } from '../../../../models/tclStopPoint.model';
import { AuthService } from '../../../../services/auth.service';
......@@ -8,7 +7,7 @@ import { AccessModality } from '../../../../structure-list/enum/access-modality.
@Component({
selector: 'app-structure-detail-print',
templateUrl: './structure-detail-print.component.html',
styleUrls: ['./structure-detail-print.component.scss']
styleUrls: ['./structure-detail-print.component.scss'],
})
export class StructureDetailPrintComponent implements OnInit {
@Input() public structure: Structure;
......
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input } from '@angular/core';
import { Structure } from '../../../../models/structure.model';
import * as _ from 'lodash';
import { Filter } from '../../../../structure-list/models/filter.model';
@Component({
selector: 'app-structure-list-print',
templateUrl: './structure-list-print.component.html',
......
import { Component, Input, OnInit } from '@angular/core';
import * as _ from 'lodash';
import { ActivatedRoute } from '@angular/router';
import { PrintService } from '../../../../shared/service/print.service';
import { Filter } from '../../../../structure-list/models/filter.model';
......
import { accountFormStep } from './form-view/account-form/accountFormStep.enum';
import { personalOfferFormStep } from './form-view/personal-offer-form/personalOfferFormStep.enum';
import { profileFormStep } from './form-view/profile-form/profileFormStep.enum';
import { structureFormStep } from './form-view/structure-form/structureFormStep.enum';
export type stepType = accountFormStep | profileFormStep | structureFormStep | personalOfferFormStep;
......@@ -24,6 +24,7 @@
<a routerLink="/news" [routerLinkActive]="'active'" i18n>Actualités</a>
<a routerLink="/acteurs" [routerLinkActive]="'active'" i18n>Cartographie</a>
<a routerLink="/orientation" [routerLinkActive]="'active'" i18n>Orienter un bénéficiaire</a>
<a routerLink="/annuaire" [routerLinkActive]="'active'" i18n>Annuaire</a>
<a routerLink="/page/qui-sommes-nous" [routerLinkActive]="'active'" i18n>Qui sommes-nous ?</a>
<a *ngIf="isAdmin" routerLink="/admin" [routerLinkActive]="'active'">Administration</a>
<button *ngIf="isLoggedIn" class="red" (click)="openProfileMenu()">
......@@ -51,6 +52,7 @@
<a routerLink="/orientation" [routerLinkActive]="'active'" (click)="closeMenu()" i18n
>Orienter un bénéficiaire</a
>
<a routerLink="/annuaire" [routerLinkActive]="'active'" i18n>Annuaire</a>
<a routerLink="/page/qui-sommes-nous" [routerLinkActive]="'active'" (click)="closeMenu()" i18n
>Qui sommes-nous ?</a
>
......
......@@ -16,13 +16,16 @@
box-sizing: border-box;
margin: auto;
min-height: 450px;
max-height: 75vh;
max-height: 80vh;
overflow-y: auto;
color: $grey-1;
background: $white;
border-radius: 8px;
border: 1px solid $grey-6;
padding: 32px 24px 32px 48px;
padding: 70px 40px;
@media #{$desktop} {
padding: 30px;
}
.title {
text-align: center;
......
import { Category } from '../structure-list/models/category.model';
import { Module } from '../structure-list/models/module.model';
import { Address } from './address.model';
export class OrientationFormFilters {
......
......@@ -23,3 +23,10 @@ export class User {
Object.assign(this, obj);
}
}
export class UserAnnuary {
_id: string;
name: string;
surname: string;
job: string;
employer: string;
}
import { Injectable } from '@angular/core';
import { Resolve, Router } from '@angular/router';
import { Resolve } from '@angular/router';
import { Observable } from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import { TagWithMeta } from '../models/tagWithMeta.model';
......
......@@ -5,9 +5,11 @@ import { CommonModule } from '@angular/common';
import { ProfileRoutingModule } from './profile-routing.module';
import { StructureEditionSummaryComponent } from './structure-edition-summary/structure-edition-summary.component';
import { EditComponent } from './edit/edit.component';
import { MissingInformationComponent } from './structure-edition-summary/missing-information/missing-information.component';
import { NoInformationComponent } from './structure-edition-summary/no-information/no-information.component';
@NgModule({
declarations: [ProfileComponent, StructureEditionSummaryComponent, EditComponent],
declarations: [ProfileComponent, StructureEditionSummaryComponent, EditComponent, MissingInformationComponent, NoInformationComponent],
imports: [CommonModule, ProfileRoutingModule, SharedModule],
})
export class ProfileModule {}
<p class="warning" fxLayout="row">
<app-svg-icon [type]="'ico'" [icon]="'warningMini'"></app-svg-icon>
<span>Information manquante</span>
</p>
@import '../../../../assets/scss/color';
p.warning {
font-style: italic;
color: $orange-warning;
margin: 0;
}
import { Component } from '@angular/core';
@Component({
selector: 'app-missing-information',
templateUrl: './missing-information.component.html',
styleUrls: ['./missing-information.component.scss'],
})
export class MissingInformationComponent {}
<p class="noInformation">Aucun renseignement</p>
@import '../../../../assets/scss/color';
.noInformation {
color: $grey-3;
font-weight: 400;
font-style: italic;
margin: 0;
}
import { Component } from '@angular/core';
@Component({
selector: 'app-no-information',
templateUrl: './no-information.component.html',
styleUrls: ['./no-information.component.scss']
})
export class NoInformationComponent {}