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:
web-app:
restart: unless-stopped
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:
- ./dev.conf:/etc/nginx/conf.d/default.conf
ports:
......
......@@ -29,10 +29,10 @@ server {
_paq.push(['enableLinkTracking']);
(function() {
var u='<URL_GDLYON>';
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '<SITE_ID>']);
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>";
......
......@@ -2,16 +2,14 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
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 { ToastrModule } from 'ngx-toastr';
import { environment } from '../environments/environment';
import { AnnuaireComponent } from './annuaire/annuaire.component';
import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component';
import { ResultListComponent } from './annuaire/result-list/result-list.component';
import { SearchBarComponent } from './annuaire/search-bar/search-bar.component';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CartoModule } from './carto/carto.module';
import { CustomBreakPointsProvider } from './config/custom-breakpoint';
......@@ -32,6 +30,7 @@ import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsl
import { PageComponent } from './page/page.component';
import { ResetEmailComponent } from './reset-email/reset-email.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
import { PersonalOfferResolver } from './resolvers/personal-offer.resolver';
import { StructureResolver } from './resolvers/structure.resolver';
import { TempUserResolver } from './resolvers/temp-user.resolver';
import { RouterListenerService } from './services/routerListener.service';
......@@ -90,6 +89,7 @@ import { StructureJoinComponent } from './structure/structure-join/structure-joi
DeactivateGuard,
TempUserResolver,
StructureResolver,
PersonalOfferResolver,
RouterListenerService,
UpdateService,
],
......
<div class="footer" fxLayout="row" fxLayoutAlign="center">
<div fxLayout="row">
<div class="footer">
<div class="links">
<!--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="/newsletter" i18n>Newsletter</a>
......@@ -7,14 +7,21 @@
<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>
</div>
<a
class="metro-link"
href="https://www.grandlyon.com"
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 class="right">
<button class="mediationButton" (click)="goToMediation()">
<img src="/assets/ico/telephone.svg" alt="telephone" />
Mediation numérique
</button>
<a
class="metro-link"
href="https://www.grandlyon.com"
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>
......@@ -7,12 +7,16 @@
height: $footer-height;
background-color: black;
display: flex;
align-items: center !important;
justify-content: space-between !important;
padding: 0px 22px;
align-items: center;
justify-content: space-between;
padding: 0 1.5rem;
.links {
display: flex;
gap: 10px;
}
a {
color: $white;
margin: 0px 0px 0px 10px;
text-decoration: none;
@include lato-regular-12;
&:hover {
......@@ -20,7 +24,7 @@
}
&:not(:last-child)::after {
content: '•';
margin: 0px 0px 0px 10px;
margin-left: 10px;
display: inline-block;
}
}
......@@ -29,6 +33,25 @@
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} {
display: none !important;
font-size: 0.75em;
......
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-footer',
......@@ -6,5 +7,9 @@ import { Component } from '@angular/core';
styleUrls: ['./footer.component.scss'],
})
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
import { UntypedFormGroup } from '@angular/forms';
import { Router } from '@angular/router';
import { User } from '../../models/user.model';
import { ProfileService } from '../../profile/services/profile.service';
import { AuthService } from '../../services/auth.service';
import { NewsletterService } from '../../services/newsletter.service';
import { ButtonType } from '../../shared/components/button/buttonType.enum';
......
......@@ -94,6 +94,10 @@ export class FormViewComponent implements OnInit, AfterViewInit {
}
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.initPage();
......@@ -130,9 +134,9 @@ export class FormViewComponent implements OnInit, AfterViewInit {
private initPage(): void {
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 totalFormSteps: number = profileFormSteps + personnalOfferFormSteps + structureFormSteps;
const totalFormSteps: number = profileFormSteps + personalOfferFormSteps + structureFormSteps;
if (formType[this.routeParam] === formType.account) {
this.nbSteps = 3;
this.currentPage = accountFormStep.accountInfo;
......@@ -469,12 +473,6 @@ export class FormViewComponent implements OnInit, AfterViewInit {
return {
freeWorkShop: this.structureForm.get('freeWorkShop').value,
};
case structureFormStep.structureOtherServices:
return {
categories: {
equipmentsServices: this.structureForm.get('categories').get('equipmentsAndServices').value,
},
};
case structureFormStep.structureWifi:
return {
categories: {
......@@ -493,6 +491,12 @@ export class FormViewComponent implements OnInit, AfterViewInit {
labelsQualifications: this.structureForm.get('categories').get('labelsQualifications').value,
},
};
case structureFormStep.structureSolidarityMaterial:
return {
categories: {
solidarityMaterial: this.structureForm.get('categories').get('solidarityMaterial').value,
},
};
case structureFormStep.structureDescription:
return {
description: this.structureForm.get('description').value,
......
......@@ -31,7 +31,6 @@ import { StructureFormComponent } from './structure-form/structure-form.componen
import { StructureHoursComponent } from './structure-form/structure-hours/structure-hours.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 { 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 { StructurePublicTargetComponent } from './structure-form/structure-public-target/structure-public-target.component';
import { StructureTrainingPriceComponent } from './structure-form/structure-training-price/structure-training-price.component';
......@@ -39,6 +38,7 @@ import { StructureTrainingTypeComponent } from './structure-form/structure-train
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 { StructureWifiComponent } from './structure-form/structure-wifi/structure-wifi.component';
import { StructureSolidarityMaterialComponent } from './structure-form/structure-solidarity-material/structure-solidarity-material.component';
@NgModule({
declarations: [
......@@ -53,7 +53,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
ProfileEmployerSelectionComponent,
ProfileJobSelectionComponent,
ProfileStructureChoiceComponent,
PersonalOfferOtherStructureChoiceComponent,
StructureNameAndAddressComponent,
StructureContactComponent,
StructureAccompanimentChoiceComponent,
......@@ -69,7 +68,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
StructureWifiComponent,
StructureEquipmentsComponent,
StructureLabelsComponent,
StructureOtherServicesComponent,
StructureDescriptionComponent,
StructureCovidInfoComponent,
StructureConsentComponent,
......@@ -79,6 +77,7 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur
StructureTypeComponent,
AccountNewsletterComponent,
StructureTrainingTypeComponent,
StructureSolidarityMaterialComponent,
],
imports: [CommonModule, FormViewRoutingModule, SharedModule],
providers: [PersonalOfferGuard],
......
......@@ -4,9 +4,8 @@
@import '../../../../../assets/scss/breakpoint';
.progressBar {
height: #{$progressBar-height};
max-width: 980px;
margin: 16px auto 0 auto;
margin: 1rem auto;
@media #{$tablet} {
margin: 0px 4px;
......
......@@ -17,7 +17,6 @@ export class ProgressBarComponent implements OnChanges {
public progressStatus: number;
public formTypeEnum = formType;
public profileFormSteps: number = Object.keys(profileFormStep).length / 2;
public personnalOfferFormSteps: number = Object.keys(personalOfferFormStep).length / 2;
public structureFormSteps: number = Object.keys(structureFormStep).length / 2;
ngOnChanges(changes: SimpleChanges): void {
......
......@@ -10,7 +10,8 @@ export class PersonalOfferGuard implements CanActivate {
canActivate(route: ActivatedRouteSnapshot): UrlTree | boolean {
if (
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')
) {
return true;
......
......@@ -5,17 +5,6 @@
<p>Facultatif</p>
</div>
<div fxLayout="column" fxLayoutGap="32px">
<div *ngIf="onlineProcedures" class="btn-grid">
<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>
<app-accompaniment-picker [personalOfferForm]="personalOfferForm" [onlineProcedures]="onlineProcedures">
</app-accompaniment-picker>
</form>
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms';
import { ButtonType } from '../../../../shared/components/button/buttonType.enum';
import { Category } from '../../../../structure-list/models/category.model';
import { Module } from '../../../../structure-list/models/module.model';
@Component({
selector: 'app-personal-offer-accompaniment',
......@@ -15,29 +13,7 @@ export class PersonalOfferAccompanimentComponent implements OnInit {
@Input() onlineProcedures: Category;
@Output() validateForm = new EventEmitter<any>();
public buttonTypeEnum = ButtonType;
public selectedModules: Module[] = [];
ngOnInit(): void {
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">
<ng-container *ngIf="currentStep === personalOfferFormStep.personalOfferAccompaniment">
<app-personal-offer-accompaniment
*ngIf="onlineProcedures"
[structureName]="structureName"
[personalOfferForm]="personalOfferForm"
[onlineProcedures]="onlineProcedures"
......
......@@ -30,6 +30,7 @@ export class PersonalOfferFormComponent implements OnChanges, OnInit {
ngOnInit(): void {
this.setCategories();
}
ngOnChanges(changes: SimpleChanges): void {
if (changes.currentStep) {
if (
......
......@@ -12,7 +12,7 @@
<p>Facultatif</p>
</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 fxLayout="column">
<div class="controllerHeader" fxLayout="row" fxLayoutAlign="space-between center">
......
......@@ -10,7 +10,7 @@ import { CategoriesToggle } from 'src/app/models/categoriesToggle.model';
export class StructureEquipmentsComponent implements OnInit {
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Input() equipmentsAndServices: CategoriesToggle[];
@Input() selfServiceMaterial: CategoriesToggle[];
@Output() validateForm = new EventEmitter<any>();
private vowels = ['a', 'e', 'i', 'o', 'u', 'y'];
......
......@@ -157,7 +157,7 @@
<div *ngIf="currentStep == structureFormStep.structureEquipments">
<app-structure-equipments
[structureForm]="structureForm"
[equipmentsAndServices]="equipments"
[selfServiceMaterial]="equipments"
(validateForm)="setValidationsForm($event)"
[isEditMode]="isEditMode"
(inArray)="isInArray($event)"
......@@ -172,14 +172,14 @@
(validateForm)="setValidationsForm($event)"
></app-structure-labels>
</div>
<div *ngIf="currentStep == structureFormStep.structureOtherServices">
<app-structure-other-services
<div *ngIf="currentStep == structureFormStep.structureSolidarityMaterial">
<app-structure-solidarity-material
[structureForm]="structureForm"
[equipmentsAndServices]="equipmentsServices"
[solidarityMaterial]="solidarityMaterial"
[isEditMode]="isEditMode"
(validateForm)="setValidationsForm($event)"
(checkChange)="onCheckChange($event)"
></app-structure-other-services>
(updateChoice)="updateChoice($event)"
></app-structure-solidarity-material>
</div>
<div *ngIf="currentStep == structureFormStep.structureDigitalHelpingAccompaniment">
<app-structure-digital-helping-accompaniment
......
......@@ -44,7 +44,6 @@ export class StructureFormComponent implements OnChanges, OnInit {
public userAcceptSavedDate = false;
// Form var
public equipmentsServices: { module: Module; openned: boolean }[] = [];
public equipments: { module: Module; openned: boolean }[] = [];
public trainingCategories: CategoriesToggle[] = [];
public accessModality: Category;
......@@ -54,6 +53,7 @@ export class StructureFormComponent implements OnChanges, OnInit {
public publicOthers: Category;
public handicaps: Category;
public languageAndIlliteracy: Category;
public solidarityMaterial: Category;
constructor(
private searchService: SearchService,
......@@ -70,7 +70,7 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.currentStep === structureFormStep.structureTrainingType ||
this.currentStep === structureFormStep.structureEquipments ||
this.currentStep === structureFormStep.structureLabels ||
this.currentStep === structureFormStep.structureOtherServices ||
this.currentStep === structureFormStep.structureSolidarityMaterial ||
this.currentStep === structureFormStep.structureDescription ||
this.currentStep === structureFormStep.structureCovidInfo ||
this.currentStep === structureFormStep.mailSentInfo ||
......@@ -220,8 +220,8 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.pagesValidation[structureFormStep.structureLabels] = {
valid: true,
};
this.pagesValidation[structureFormStep.structureOtherServices] = {
valid: this.structureForm.get('categories').get('equipmentsAndServices').valid,
this.pagesValidation[structureFormStep.structureSolidarityMaterial] = {
valid: true,
};
this.pagesValidation[structureFormStep.structureDescription] = {
valid: true,
......@@ -260,12 +260,6 @@ export class StructureFormComponent implements OnChanges, OnInit {
});
break;
}
case CategoryEnum.equipmentsServices: {
categ.modules.forEach((c) => {
this.equipmentsServices.push({ module: c, openned: false });
});
break;
}
case CategoryEnum.labelsQualifications: {
this.labelsQualifications = categ;
break;
......@@ -282,6 +276,10 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.publicOthers = categ;
break;
}
case CategoryEnum.solidarityMaterial: {
this.solidarityMaterial = categ;
break;
}
case CategoryEnum.handicaps: {
this.handicaps = categ;
break;
......