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
Commits on Source (15)
Showing
with 97 additions and 96 deletions
...@@ -4,7 +4,7 @@ services: ...@@ -4,7 +4,7 @@ services:
web-app: web-app:
restart: unless-stopped restart: unless-stopped
build: . build: .
image: registry.forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client:${TAG} image: registry.forge.grandlyon.com/web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client:${TAG}
volumes: volumes:
- ./dev.conf:/etc/nginx/conf.d/default.conf - ./dev.conf:/etc/nginx/conf.d/default.conf
ports: ports:
......
...@@ -29,10 +29,10 @@ server { ...@@ -29,10 +29,10 @@ server {
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function() {
var u='<URL_GDLYON>'; var u='<URL_GDLYON>';
_paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '<SITE_ID>']); _paq.push(['setSiteId', '<SITE_ID>']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})(); })();
</script>"; </script>";
......
...@@ -2,16 +2,14 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; ...@@ -2,16 +2,14 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { LOCALE_ID, NgModule } from '@angular/core'; import { LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr';
import { AppRoutingModule } from './app-routing.module';
import { ServiceWorkerModule } from '@angular/service-worker'; import { ServiceWorkerModule } from '@angular/service-worker';
import { ToastrModule } from 'ngx-toastr';
import { environment } from '../environments/environment'; import { environment } from '../environments/environment';
import { AnnuaireComponent } from './annuaire/annuaire.component'; import { AnnuaireComponent } from './annuaire/annuaire.component';
import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component'; import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component';
import { ResultListComponent } from './annuaire/result-list/result-list.component'; import { ResultListComponent } from './annuaire/result-list/result-list.component';
import { SearchBarComponent } from './annuaire/search-bar/search-bar.component'; import { SearchBarComponent } from './annuaire/search-bar/search-bar.component';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { CartoModule } from './carto/carto.module'; import { CartoModule } from './carto/carto.module';
import { CustomBreakPointsProvider } from './config/custom-breakpoint'; import { CustomBreakPointsProvider } from './config/custom-breakpoint';
...@@ -32,6 +30,7 @@ import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsl ...@@ -32,6 +30,7 @@ import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsl
import { PageComponent } from './page/page.component'; import { PageComponent } from './page/page.component';
import { ResetEmailComponent } from './reset-email/reset-email.component'; import { ResetEmailComponent } from './reset-email/reset-email.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component'; import { ResetPasswordComponent } from './reset-password/reset-password.component';
import { PersonalOfferResolver } from './resolvers/personal-offer.resolver';
import { StructureResolver } from './resolvers/structure.resolver'; import { StructureResolver } from './resolvers/structure.resolver';
import { TempUserResolver } from './resolvers/temp-user.resolver'; import { TempUserResolver } from './resolvers/temp-user.resolver';
import { RouterListenerService } from './services/routerListener.service'; import { RouterListenerService } from './services/routerListener.service';
...@@ -90,6 +89,7 @@ import { StructureJoinComponent } from './structure/structure-join/structure-joi ...@@ -90,6 +89,7 @@ import { StructureJoinComponent } from './structure/structure-join/structure-joi
DeactivateGuard, DeactivateGuard,
TempUserResolver, TempUserResolver,
StructureResolver, StructureResolver,
PersonalOfferResolver,
RouterListenerService, RouterListenerService,
UpdateService, UpdateService,
], ],
......
<div class="footer" fxLayout="row" fxLayoutAlign="center"> <div class="footer">
<div fxLayout="row"> <div class="links">
<!--a class="clickable text-align-center" routerLink="/page/accessibilite" i18n>Accessibilité</a--> <!--a class="clickable text-align-center" routerLink="/page/accessibilite" i18n>Accessibilité</a-->
<a class="clickable text-align-center" routerLink="/legal-notice" i18n>Mentions légales</a> <a class="clickable text-align-center" routerLink="/legal-notice" i18n>Mentions légales</a>
<a class="clickable text-align-center" routerLink="/newsletter" i18n>Newsletter</a> <a class="clickable text-align-center" routerLink="/newsletter" i18n>Newsletter</a>
...@@ -7,14 +7,21 @@ ...@@ -7,14 +7,21 @@
<a class="clickable text-align-center" routerLink="/contact" i18n>Contact</a> <a class="clickable text-align-center" routerLink="/contact" i18n>Contact</a>
<a class="clickable text-align-center" routerLink="/page/qui-sommes-nous" i18n>Qui sommes-nous ?</a> <a class="clickable text-align-center" routerLink="/page/qui-sommes-nous" i18n>Qui sommes-nous ?</a>
</div> </div>
<a
class="metro-link" <div class="right">
href="https://www.grandlyon.com" <button class="mediationButton" (click)="goToMediation()">
title="Accéder au site de la Métropole de Lyon (nouvelle fenêtre)" <img src="/assets/ico/telephone.svg" alt="telephone" />
target="_blank" Mediation numérique
rel="noopener noreferrer" </button>
> <a
<img class="logo-grand-lyon" src="/assets/logos/ic_metro.svg" alt /> class="metro-link"
<p class="metro-title" i18n>Un site de la Métropole de Lyon</p> href="https://www.grandlyon.com"
</a> title="Accéder au site de la Métropole de Lyon (nouvelle fenêtre)"
target="_blank"
rel="noopener noreferrer"
>
<img class="logo-grand-lyon" src="/assets/logos/ic_metro.svg" alt />
<p class="metro-title" i18n>Un site de la Métropole de Lyon</p>
</a>
</div>
</div> </div>
...@@ -7,12 +7,16 @@ ...@@ -7,12 +7,16 @@
height: $footer-height; height: $footer-height;
background-color: black; background-color: black;
display: flex; display: flex;
align-items: center !important; align-items: center;
justify-content: space-between !important; justify-content: space-between;
padding: 0px 22px; padding: 0 1.5rem;
.links {
display: flex;
gap: 10px;
}
a { a {
color: $white; color: $white;
margin: 0px 0px 0px 10px;
text-decoration: none; text-decoration: none;
@include lato-regular-12; @include lato-regular-12;
&:hover { &:hover {
...@@ -20,7 +24,7 @@ ...@@ -20,7 +24,7 @@
} }
&:not(:last-child)::after { &:not(:last-child)::after {
content: '•'; content: '•';
margin: 0px 0px 0px 10px; margin-left: 10px;
display: inline-block; display: inline-block;
} }
} }
...@@ -29,6 +33,25 @@ ...@@ -29,6 +33,25 @@
width: 22px; width: 22px;
} }
.right {
display: flex;
gap: 1rem;
.mediationButton {
@include lato-regular-12;
padding: 0 16px 0 8px;
display: flex;
align-items: center;
gap: 0.5rem;
background-color: $grey-5;
border-radius: 8px;
border: 1px solid #000;
cursor: pointer;
&:hover {
transform: scale(1.01);
}
}
}
@media #{$large-phone} { @media #{$large-phone} {
display: none !important; display: none !important;
font-size: 0.75em; font-size: 0.75em;
......
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({ @Component({
selector: 'app-footer', selector: 'app-footer',
...@@ -6,5 +7,9 @@ import { Component } from '@angular/core'; ...@@ -6,5 +7,9 @@ import { Component } from '@angular/core';
styleUrls: ['./footer.component.scss'], styleUrls: ['./footer.component.scss'],
}) })
export class FooterComponent { export class FooterComponent {
constructor() {} constructor(private router: Router) {}
public goToMediation(): void {
this.router.navigate(['/orientation'], { state: { mediationNumerique: true } });
}
} }
...@@ -2,7 +2,6 @@ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from ...@@ -2,7 +2,6 @@ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from
import { UntypedFormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { User } from '../../models/user.model'; import { User } from '../../models/user.model';
import { ProfileService } from '../../profile/services/profile.service';
import { AuthService } from '../../services/auth.service'; import { AuthService } from '../../services/auth.service';
import { NewsletterService } from '../../services/newsletter.service'; import { NewsletterService } from '../../services/newsletter.service';
import { ButtonType } from '../../shared/components/button/buttonType.enum'; import { ButtonType } from '../../shared/components/button/buttonType.enum';
......
...@@ -94,6 +94,10 @@ export class FormViewComponent implements OnInit, AfterViewInit { ...@@ -94,6 +94,10 @@ export class FormViewComponent implements OnInit, AfterViewInit {
} }
async ngOnInit(): Promise<void> { async ngOnInit(): Promise<void> {
// Get structure from history (this is used to create personal offer from profile)
if (history.state.structure) {
this.structure = history.state.structure;
}
this.routeParam = this.router.routerState.snapshot.url.split('/')[2]; this.routeParam = this.router.routerState.snapshot.url.split('/')[2];
this.initPage(); this.initPage();
...@@ -130,9 +134,9 @@ export class FormViewComponent implements OnInit, AfterViewInit { ...@@ -130,9 +134,9 @@ export class FormViewComponent implements OnInit, AfterViewInit {
private initPage(): void { private initPage(): void {
const profileFormSteps: number = Object.keys(profileFormStep).length / 2; const profileFormSteps: number = Object.keys(profileFormStep).length / 2;
const personnalOfferFormSteps: number = Object.keys(personalOfferFormStep).length / 2 - 1; const personalOfferFormSteps: number = Object.keys(personalOfferFormStep).length / 2 - 1;
const structureFormSteps: number = Object.keys(structureFormStep).length / 2; const structureFormSteps: number = Object.keys(structureFormStep).length / 2;
const totalFormSteps: number = profileFormSteps + personnalOfferFormSteps + structureFormSteps; const totalFormSteps: number = profileFormSteps + personalOfferFormSteps + structureFormSteps;
if (formType[this.routeParam] === formType.account) { if (formType[this.routeParam] === formType.account) {
this.nbSteps = 3; this.nbSteps = 3;
this.currentPage = accountFormStep.accountInfo; this.currentPage = accountFormStep.accountInfo;
...@@ -469,12 +473,6 @@ export class FormViewComponent implements OnInit, AfterViewInit { ...@@ -469,12 +473,6 @@ export class FormViewComponent implements OnInit, AfterViewInit {
return { return {
freeWorkShop: this.structureForm.get('freeWorkShop').value, freeWorkShop: this.structureForm.get('freeWorkShop').value,
}; };
case structureFormStep.structureOtherServices:
return {
categories: {
equipmentsServices: this.structureForm.get('categories').get('equipmentsAndServices').value,
},
};
case structureFormStep.structureWifi: case structureFormStep.structureWifi:
return { return {
categories: { categories: {
...@@ -493,6 +491,12 @@ export class FormViewComponent implements OnInit, AfterViewInit { ...@@ -493,6 +491,12 @@ export class FormViewComponent implements OnInit, AfterViewInit {
labelsQualifications: this.structureForm.get('categories').get('labelsQualifications').value, labelsQualifications: this.structureForm.get('categories').get('labelsQualifications').value,
}, },
}; };
case structureFormStep.structureSolidarityMaterial:
return {
categories: {
solidarityMaterial: this.structureForm.get('categories').get('solidarityMaterial').value,
},
};
case structureFormStep.structureDescription: case structureFormStep.structureDescription:
return { return {
description: this.structureForm.get('description').value, description: this.structureForm.get('description').value,
......
...@@ -31,7 +31,6 @@ import { StructureFormComponent } from './structure-form/structure-form.componen ...@@ -31,7 +31,6 @@ import { StructureFormComponent } from './structure-form/structure-form.componen
import { StructureHoursComponent } from './structure-form/structure-hours/structure-hours.component'; import { StructureHoursComponent } from './structure-form/structure-hours/structure-hours.component';
import { StructureLabelsComponent } from './structure-form/structure-labels/structure-labels.component'; import { StructureLabelsComponent } from './structure-form/structure-labels/structure-labels.component';
import { StructureNameAndAddressComponent } from './structure-form/structure-name-and-address/structure-name-and-address.component'; import { StructureNameAndAddressComponent } from './structure-form/structure-name-and-address/structure-name-and-address.component';
import { StructureOtherServicesComponent } from './structure-form/structure-other-services/structure-other-services.component';
import { structureDigitalHelpingAccompanimentOtherComponent } from './structure-form/structure-public-target-other/structure-public-target-other.component'; import { structureDigitalHelpingAccompanimentOtherComponent } from './structure-form/structure-public-target-other/structure-public-target-other.component';
import { StructurePublicTargetComponent } from './structure-form/structure-public-target/structure-public-target.component'; import { StructurePublicTargetComponent } from './structure-form/structure-public-target/structure-public-target.component';
import { StructureTrainingPriceComponent } from './structure-form/structure-training-price/structure-training-price.component'; import { StructureTrainingPriceComponent } from './structure-form/structure-training-price/structure-training-price.component';
...@@ -39,6 +38,7 @@ import { StructureTrainingTypeComponent } from './structure-form/structure-train ...@@ -39,6 +38,7 @@ import { StructureTrainingTypeComponent } from './structure-form/structure-train
import { StructureTypeComponent } from './structure-form/structure-type/structure-type.component'; import { StructureTypeComponent } from './structure-form/structure-type/structure-type.component';
import { StructureWebAndSocialNetworkComponent } from './structure-form/structure-web-and-social-network/structure-web-and-social-network.component'; import { StructureWebAndSocialNetworkComponent } from './structure-form/structure-web-and-social-network/structure-web-and-social-network.component';
import { StructureWifiComponent } from './structure-form/structure-wifi/structure-wifi.component'; import { StructureWifiComponent } from './structure-form/structure-wifi/structure-wifi.component';
import { StructureSolidarityMaterialComponent } from './structure-form/structure-solidarity-material/structure-solidarity-material.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -53,7 +53,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur ...@@ -53,7 +53,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
ProfileEmployerSelectionComponent, ProfileEmployerSelectionComponent,
ProfileJobSelectionComponent, ProfileJobSelectionComponent,
ProfileStructureChoiceComponent, ProfileStructureChoiceComponent,
PersonalOfferOtherStructureChoiceComponent,
StructureNameAndAddressComponent, StructureNameAndAddressComponent,
StructureContactComponent, StructureContactComponent,
StructureAccompanimentChoiceComponent, StructureAccompanimentChoiceComponent,
...@@ -69,7 +68,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur ...@@ -69,7 +68,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
StructureWifiComponent, StructureWifiComponent,
StructureEquipmentsComponent, StructureEquipmentsComponent,
StructureLabelsComponent, StructureLabelsComponent,
StructureOtherServicesComponent,
StructureDescriptionComponent, StructureDescriptionComponent,
StructureCovidInfoComponent, StructureCovidInfoComponent,
StructureConsentComponent, StructureConsentComponent,
...@@ -79,6 +77,7 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur ...@@ -79,6 +77,7 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
StructureTypeComponent, StructureTypeComponent,
AccountNewsletterComponent, AccountNewsletterComponent,
StructureTrainingTypeComponent, StructureTrainingTypeComponent,
StructureSolidarityMaterialComponent,
], ],
imports: [CommonModule, FormViewRoutingModule, SharedModule], imports: [CommonModule, FormViewRoutingModule, SharedModule],
providers: [PersonalOfferGuard], providers: [PersonalOfferGuard],
......
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
@import '../../../../../assets/scss/breakpoint'; @import '../../../../../assets/scss/breakpoint';
.progressBar { .progressBar {
height: #{$progressBar-height};
max-width: 980px; max-width: 980px;
margin: 16px auto 0 auto; margin: 1rem auto;
@media #{$tablet} { @media #{$tablet} {
margin: 0px 4px; margin: 0px 4px;
......
...@@ -17,7 +17,6 @@ export class ProgressBarComponent implements OnChanges { ...@@ -17,7 +17,6 @@ export class ProgressBarComponent implements OnChanges {
public progressStatus: number; public progressStatus: number;
public formTypeEnum = formType; public formTypeEnum = formType;
public profileFormSteps: number = Object.keys(profileFormStep).length / 2; public profileFormSteps: number = Object.keys(profileFormStep).length / 2;
public personnalOfferFormSteps: number = Object.keys(personalOfferFormStep).length / 2;
public structureFormSteps: number = Object.keys(structureFormStep).length / 2; public structureFormSteps: number = Object.keys(structureFormStep).length / 2;
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
......
...@@ -10,7 +10,8 @@ export class PersonalOfferGuard implements CanActivate { ...@@ -10,7 +10,8 @@ export class PersonalOfferGuard implements CanActivate {
canActivate(route: ActivatedRouteSnapshot): UrlTree | boolean { canActivate(route: ActivatedRouteSnapshot): UrlTree | boolean {
if ( if (
route.routeConfig.path === 'personaloffer' && route.routeConfig.path === 'personaloffer' &&
(this.router.routerState.snapshot.url === '/form/profile' || (this.router.routerState.snapshot.url === '/profile' ||
this.router.routerState.snapshot.url === '/form/profile' ||
this.router.routerState.snapshot.url === '/form/structure') this.router.routerState.snapshot.url === '/form/structure')
) { ) {
return true; return true;
......
...@@ -5,17 +5,6 @@ ...@@ -5,17 +5,6 @@
<p>Facultatif</p> <p>Facultatif</p>
</div> </div>
<div fxLayout="column" fxLayoutGap="32px"> <app-accompaniment-picker [personalOfferForm]="personalOfferForm" [onlineProcedures]="onlineProcedures">
<div *ngIf="onlineProcedures" class="btn-grid"> </app-accompaniment-picker>
<span *ngFor="let module of onlineProcedures.modules">
<app-button
[ngClass]="{ selectedChoice: true }"
[extraClass]="isSelectedModule(module) ? 'selected' : ''"
[style]="buttonTypeEnum.CheckButton"
[text]="module.name"
(action)="toogleResult(module)"
></app-button>
</span>
</div>
</div>
</form> </form>
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { ButtonType } from '../../../../shared/components/button/buttonType.enum';
import { Category } from '../../../../structure-list/models/category.model'; import { Category } from '../../../../structure-list/models/category.model';
import { Module } from '../../../../structure-list/models/module.model';
@Component({ @Component({
selector: 'app-personal-offer-accompaniment', selector: 'app-personal-offer-accompaniment',
...@@ -15,29 +13,7 @@ export class PersonalOfferAccompanimentComponent implements OnInit { ...@@ -15,29 +13,7 @@ export class PersonalOfferAccompanimentComponent implements OnInit {
@Input() onlineProcedures: Category; @Input() onlineProcedures: Category;
@Output() validateForm = new EventEmitter<any>(); @Output() validateForm = new EventEmitter<any>();
public buttonTypeEnum = ButtonType;
public selectedModules: Module[] = [];
ngOnInit(): void { ngOnInit(): void {
this.validateForm.emit(); this.validateForm.emit();
} }
public toogleResult(module: Module): void {
if (this.isSelectedModule(module)) {
const index = this.selectedModules.findIndex((_module) => _module.id === module.id);
this.selectedModules.splice(index, 1);
} else {
this.selectedModules.push(module);
}
this.personalOfferForm
.get('categories')
.get('onlineProcedures')
.patchValue(this.selectedModules.map((module) => module.id));
}
public isSelectedModule(module: Module): boolean {
if (this.selectedModules && this.selectedModules.includes(module)) return true;
return false;
}
} }
<div class="no-max-width"> <div class="no-max-width">
<ng-container *ngIf="currentStep === personalOfferFormStep.personalOfferAccompaniment"> <ng-container *ngIf="currentStep === personalOfferFormStep.personalOfferAccompaniment">
<app-personal-offer-accompaniment <app-personal-offer-accompaniment
*ngIf="onlineProcedures"
[structureName]="structureName" [structureName]="structureName"
[personalOfferForm]="personalOfferForm" [personalOfferForm]="personalOfferForm"
[onlineProcedures]="onlineProcedures" [onlineProcedures]="onlineProcedures"
......
...@@ -30,6 +30,7 @@ export class PersonalOfferFormComponent implements OnChanges, OnInit { ...@@ -30,6 +30,7 @@ export class PersonalOfferFormComponent implements OnChanges, OnInit {
ngOnInit(): void { ngOnInit(): void {
this.setCategories(); this.setCategories();
} }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
if (changes.currentStep) { if (changes.currentStep) {
if ( if (
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<p>Facultatif</p> <p>Facultatif</p>
</div> </div>
</div> </div>
<ng-container *ngFor="let equipment of equipmentsAndServices"> <ng-container *ngFor="let equipment of selfServiceMaterial">
<div class="controller equipments" *ngIf="['computer', 'printer', 'scanner'].includes(equipment.module.id)"> <div class="controller equipments" *ngIf="['computer', 'printer', 'scanner'].includes(equipment.module.id)">
<div fxLayout="column"> <div fxLayout="column">
<div class="controllerHeader" fxLayout="row" fxLayoutAlign="space-between center"> <div class="controllerHeader" fxLayout="row" fxLayoutAlign="space-between center">
......
...@@ -10,7 +10,7 @@ import { CategoriesToggle } from 'src/app/models/categoriesToggle.model'; ...@@ -10,7 +10,7 @@ import { CategoriesToggle } from 'src/app/models/categoriesToggle.model';
export class StructureEquipmentsComponent implements OnInit { export class StructureEquipmentsComponent implements OnInit {
@Input() structureForm: UntypedFormGroup; @Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean; @Input() isEditMode: boolean;
@Input() equipmentsAndServices: CategoriesToggle[]; @Input() selfServiceMaterial: CategoriesToggle[];
@Output() validateForm = new EventEmitter<any>(); @Output() validateForm = new EventEmitter<any>();
private vowels = ['a', 'e', 'i', 'o', 'u', 'y']; private vowels = ['a', 'e', 'i', 'o', 'u', 'y'];
......
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
<div *ngIf="currentStep == structureFormStep.structureEquipments"> <div *ngIf="currentStep == structureFormStep.structureEquipments">
<app-structure-equipments <app-structure-equipments
[structureForm]="structureForm" [structureForm]="structureForm"
[equipmentsAndServices]="equipments" [selfServiceMaterial]="equipments"
(validateForm)="setValidationsForm($event)" (validateForm)="setValidationsForm($event)"
[isEditMode]="isEditMode" [isEditMode]="isEditMode"
(inArray)="isInArray($event)" (inArray)="isInArray($event)"
...@@ -172,14 +172,14 @@ ...@@ -172,14 +172,14 @@
(validateForm)="setValidationsForm($event)" (validateForm)="setValidationsForm($event)"
></app-structure-labels> ></app-structure-labels>
</div> </div>
<div *ngIf="currentStep == structureFormStep.structureOtherServices"> <div *ngIf="currentStep == structureFormStep.structureSolidarityMaterial">
<app-structure-other-services <app-structure-solidarity-material
[structureForm]="structureForm" [structureForm]="structureForm"
[equipmentsAndServices]="equipmentsServices" [solidarityMaterial]="solidarityMaterial"
[isEditMode]="isEditMode" [isEditMode]="isEditMode"
(validateForm)="setValidationsForm($event)" (validateForm)="setValidationsForm($event)"
(checkChange)="onCheckChange($event)" (updateChoice)="updateChoice($event)"
></app-structure-other-services> ></app-structure-solidarity-material>
</div> </div>
<div *ngIf="currentStep == structureFormStep.structureDigitalHelpingAccompaniment"> <div *ngIf="currentStep == structureFormStep.structureDigitalHelpingAccompaniment">
<app-structure-digital-helping-accompaniment <app-structure-digital-helping-accompaniment
......
...@@ -44,7 +44,6 @@ export class StructureFormComponent implements OnChanges, OnInit { ...@@ -44,7 +44,6 @@ export class StructureFormComponent implements OnChanges, OnInit {
public userAcceptSavedDate = false; public userAcceptSavedDate = false;
// Form var // Form var
public equipmentsServices: { module: Module; openned: boolean }[] = [];
public equipments: { module: Module; openned: boolean }[] = []; public equipments: { module: Module; openned: boolean }[] = [];
public trainingCategories: CategoriesToggle[] = []; public trainingCategories: CategoriesToggle[] = [];
public accessModality: Category; public accessModality: Category;
...@@ -54,6 +53,7 @@ export class StructureFormComponent implements OnChanges, OnInit { ...@@ -54,6 +53,7 @@ export class StructureFormComponent implements OnChanges, OnInit {
public publicOthers: Category; public publicOthers: Category;
public handicaps: Category; public handicaps: Category;
public languageAndIlliteracy: Category; public languageAndIlliteracy: Category;
public solidarityMaterial: Category;
constructor( constructor(
private searchService: SearchService, private searchService: SearchService,
...@@ -70,7 +70,7 @@ export class StructureFormComponent implements OnChanges, OnInit { ...@@ -70,7 +70,7 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.currentStep === structureFormStep.structureTrainingType || this.currentStep === structureFormStep.structureTrainingType ||
this.currentStep === structureFormStep.structureEquipments || this.currentStep === structureFormStep.structureEquipments ||
this.currentStep === structureFormStep.structureLabels || this.currentStep === structureFormStep.structureLabels ||
this.currentStep === structureFormStep.structureOtherServices || this.currentStep === structureFormStep.structureSolidarityMaterial ||
this.currentStep === structureFormStep.structureDescription || this.currentStep === structureFormStep.structureDescription ||
this.currentStep === structureFormStep.structureCovidInfo || this.currentStep === structureFormStep.structureCovidInfo ||
this.currentStep === structureFormStep.mailSentInfo || this.currentStep === structureFormStep.mailSentInfo ||
...@@ -220,8 +220,8 @@ export class StructureFormComponent implements OnChanges, OnInit { ...@@ -220,8 +220,8 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.pagesValidation[structureFormStep.structureLabels] = { this.pagesValidation[structureFormStep.structureLabels] = {
valid: true, valid: true,
}; };
this.pagesValidation[structureFormStep.structureOtherServices] = { this.pagesValidation[structureFormStep.structureSolidarityMaterial] = {
valid: this.structureForm.get('categories').get('equipmentsAndServices').valid, valid: true,
}; };
this.pagesValidation[structureFormStep.structureDescription] = { this.pagesValidation[structureFormStep.structureDescription] = {
valid: true, valid: true,
...@@ -260,12 +260,6 @@ export class StructureFormComponent implements OnChanges, OnInit { ...@@ -260,12 +260,6 @@ export class StructureFormComponent implements OnChanges, OnInit {
}); });
break; break;
} }
case CategoryEnum.equipmentsServices: {
categ.modules.forEach((c) => {
this.equipmentsServices.push({ module: c, openned: false });
});
break;
}
case CategoryEnum.labelsQualifications: { case CategoryEnum.labelsQualifications: {
this.labelsQualifications = categ; this.labelsQualifications = categ;
break; break;
...@@ -282,6 +276,10 @@ export class StructureFormComponent implements OnChanges, OnInit { ...@@ -282,6 +276,10 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.publicOthers = categ; this.publicOthers = categ;
break; break;
} }
case CategoryEnum.solidarityMaterial: {
this.solidarityMaterial = categ;
break;
}
case CategoryEnum.handicaps: { case CategoryEnum.handicaps: {
this.handicaps = categ; this.handicaps = categ;
break; break;
......