diff --git a/src/app/form/footer-form/footer-form.component.ts b/src/app/form/footer-form/footer-form.component.ts index d3381fc7ae98f580781272488111c93ce127aa5d..13bbe79924d75728d79c52f8a915817b345783d4 100644 --- a/src/app/form/footer-form/footer-form.component.ts +++ b/src/app/form/footer-form/footer-form.component.ts @@ -95,10 +95,6 @@ export class FooterFormComponent implements OnChanges { } if (this.currentForm === formType.structure) { - if (this.currentStep === structureFormStep.structureType) { - this.changeCurrentStep.emit(structureFormStep.structureFormTime); - return; - } if (this.currentStep === structureFormStep.structureWifi) { if (this.isTrainingsSelected()) { this.changeCurrentStep.emit(structureFormStep.structureTrainingPrice); @@ -150,10 +146,6 @@ export class FooterFormComponent implements OnChanges { return; } } - if (this.currentStep === structureFormStep.structureFormTime) { - this.changeCurrentStep.emit(structureFormStep.structureType); - return; - } // Check if trainings are selected in order to ask for pricing if (this.currentStep === structureFormStep.structureTrainingType) { if (this.isTrainingsSelected()) { @@ -172,10 +164,6 @@ export class FooterFormComponent implements OnChanges { } return; } - if (this.currentStep === structureFormStep.structureContactCompletion) { - // TODO Go to send mail page and send the mail - return; - } } if (this.isPersonalOfferPage()) { this.endForm.emit({ formType: this.currentForm }); diff --git a/src/app/form/form-view/form-view.module.ts b/src/app/form/form-view/form-view.module.ts index d68ad3f8a1e596858a3f755ef557228eed72cae9..02714b62f092b96c44f244c744c9b915ac7802bd 100644 --- a/src/app/form/form-view/form-view.module.ts +++ b/src/app/form/form-view/form-view.module.ts @@ -20,7 +20,6 @@ import { ProfileStructureChoiceComponent } from './profile-form/profile-structur import { StructureAccessModalityComponent } from './structure-form/structure-access-modality/structure-access-modality.component'; import { StructureAccompanimentChoiceComponent } from './structure-form/structure-accompaniment-choice/structure-accompaniment-choice.component'; import { StructureConsentComponent } from './structure-form/structure-consent/structure-consent.component'; -import { StructureContactCompletionComponent } from './structure-form/structure-contact-completion/structure-contact-completion.component'; import { StructureContactComponent } from './structure-form/structure-contact/structure-contact.component'; import { StructureCovidInfoComponent } from './structure-form/structure-covid-info/structure-covid-info.component'; import { StructureDescriptionComponent } from './structure-form/structure-description/structure-description.component'; @@ -54,7 +53,6 @@ import { StructureWifiComponent } from './structure-form/structure-wifi/structur StructureNameAndAddressComponent, StructureContactComponent, StructureAccompanimentChoiceComponent, - StructureContactCompletionComponent, StructureAccessModalityComponent, StructureHoursComponent, StructureWebAndSocialNetworkComponent, diff --git a/src/app/form/form-view/structure-form/structure-contact-completion/structure-contact-completion.component.html b/src/app/form/form-view/structure-form/structure-contact-completion/structure-contact-completion.component.html deleted file mode 100644 index c0d833c40db2a97bf5314736b5feffc4d86f3a63..0000000000000000000000000000000000000000 --- a/src/app/form/form-view/structure-form/structure-contact-completion/structure-contact-completion.component.html +++ /dev/null @@ -1,70 +0,0 @@ -<form *ngIf="structureForm" [formGroup]="structureForm"> - <app-go-back *ngIf="isEditMode" (action)="goBack()" /> - <div class="title"> - <h3>Quelle personne pourrait connaître ces informations ?</h3> - <p>Informations demandées : téléphone, email, accessibilité PMR, type de public...</p> - </div> - <div class="form-group" fxLayout="column"> - <label for="contactPersonFirstname">Prénom</label> - <div fxLayout="row" fxLayoutGap="13px"> - <input - type="text" - name="contactPersonFirstname" - id="contactPersonFirstname" - formControlName="contactPersonFirstname" - class="form-input" - (input)="setValidationsForm()" - /> - <app-svg-icon - *ngIf="structureForm.get('contactPersonFirstname').valid" - [iconClass]="'icon-26'" - [folder]="'form'" - [icon]="'validate'" - /> - </div> - </div> - <div class="form-group" fxLayout="column"> - <label for="contactPersonLastname">Nom</label> - <div fxLayout="row" fxLayoutGap="13px"> - <input - type="text" - id="contactPersonLastname" - name="contactPersonLastname" - formControlName="contactPersonLastname" - class="form-input" - (input)="setValidationsForm()" - /> - <app-svg-icon - *ngIf="structureForm.get('contactPersonLastname').valid" - [iconClass]="'icon-26'" - [folder]="'form'" - [icon]="'validate'" - /> - </div> - </div> - <div class="form-group" fxLayout="column"> - <label for="contactPersonEmail">Email</label> - <div fxLayout="row" fxLayoutGap="13px"> - <input - type="text" - id="contactPersonEmail" - name="contactPersonEmail" - formControlName="contactPersonEmail" - class="form-input" - (input)="setValidationsForm()" - /> - <app-svg-icon - *ngIf="structureForm.get('contactPersonEmail').valid" - [iconClass]="'icon-26'" - [folder]="'form'" - [icon]="'validate'" - /> - <app-svg-icon - *ngIf="structureForm.get('contactPersonEmail').invalid && structureForm.get('contactPersonEmail').value" - [iconClass]="'icon-26'" - [folder]="'form'" - [icon]="'notValidate'" - /> - </div> - </div> -</form> diff --git a/src/app/form/form-view/structure-form/structure-contact-completion/structure-contact-completion.component.ts b/src/app/form/form-view/structure-form/structure-contact-completion/structure-contact-completion.component.ts deleted file mode 100644 index 55171c1f85947d1a67140479687c77abdc9bb708..0000000000000000000000000000000000000000 --- a/src/app/form/form-view/structure-form/structure-contact-completion/structure-contact-completion.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; - -@Component({ - selector: 'app-structure-contact-completion', - templateUrl: './structure-contact-completion.component.html', -}) -export class StructureContactCompletionComponent implements OnInit { - @Input() structureForm: UntypedFormGroup; - @Input() isEditMode: boolean; - @Output() validateForm = new EventEmitter<any>(); - - ngOnInit(): void { - this.validateForm.emit(); - } - - public setValidationsForm(): void { - this.validateForm.emit(); - } - public goBack(): void { - history.back(); - } -} diff --git a/src/app/form/form-view/structure-form/structure-form.component.html b/src/app/form/form-view/structure-form/structure-form.component.html index 1ce93bf0a506182909e8de9d209f01f85a970127..49e45d2a5c93de5b97b0da4a42891984426f0db7 100644 --- a/src/app/form/form-view/structure-form/structure-form.component.html +++ b/src/app/form/form-view/structure-form/structure-form.component.html @@ -44,13 +44,6 @@ (radioChange)="onRadioChange($event)" /> </div> -<div *ngIf="currentStep === structureFormStep.structureContactCompletion"> - <app-structure-contact-completion - [isEditMode]="isEditMode" - [structureForm]="structureForm" - (validateForm)="setValidationsForm()" - /> -</div> <div *ngIf="currentStep === structureFormStep.structureType"> <app-structure-type [isEditMode]="isEditMode" diff --git a/src/app/form/form-view/structure-form/structure-form.component.ts b/src/app/form/form-view/structure-form/structure-form.component.ts index dc85a4ee18b823c2b406bfb7601e850e275e656b..5df54bc3e1a3b45c6271cb8e9dcdff21865beeb5 100644 --- a/src/app/form/form-view/structure-form/structure-form.component.ts +++ b/src/app/form/form-view/structure-form/structure-form.component.ts @@ -134,13 +134,6 @@ export class StructureFormComponent implements OnChanges, OnInit { this.pagesValidation[structureFormStep.structureAccompanimentChoice] = { valid: this.structureForm.get('placeOfReception').valid, }; - this.pagesValidation[structureFormStep.structureContactCompletion] = { - valid: this.isEditMode - ? true - : this.structureForm.get('contactPersonFirstname').valid && - this.structureForm.get('contactPersonLastname').valid && - this.structureForm.get('contactPersonEmail').valid, - }; this.pagesValidation[structureFormStep.structureType] = { valid: this.structureForm.get('structureType').valid, }; diff --git a/src/app/form/form-view/structure-form/structureFormStep.enum.ts b/src/app/form/form-view/structure-form/structureFormStep.enum.ts index 154d2a881a4c68f7082045721ec94c85597f2536..aa44903c735e2a810422f02d8fdce30123e9dba5 100644 --- a/src/app/form/form-view/structure-form/structureFormStep.enum.ts +++ b/src/app/form/form-view/structure-form/structureFormStep.enum.ts @@ -4,7 +4,6 @@ export enum structureFormStep { structureNameAndAddress, structureContact, structureFormTime, - structureContactCompletion, structureType, structureAccessModality, structureHours, diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts index fd7484fa3397be2ba86c12023a6c504aa59380c6..9a435eacd86c2a465ccfa2a896f388876a3e2202 100644 --- a/src/app/utils/formUtils.ts +++ b/src/app/utils/formUtils.ts @@ -47,12 +47,6 @@ export class FormUtils { name: 'Partage de données sur data.grandlyon.com', inputs: ['dataShareConsentDate'], }, - { - step: structureFormStep.structureContactCompletion, - name: 'Personne contact informations', - inputs: ['contactPersonFirstname', 'contactPersonLastname', 'contactPersonEmail'], - hideForEdit: true, - }, { step: structureFormStep.structureAccompanimentChoice, name: "Lieu d'accueil",