diff --git a/src/app/form/footer-form/footer-form.component.ts b/src/app/form/footer-form/footer-form.component.ts index 60e8f5f3edad27ca09e24fce1d125c3b062cc505..b2e8abb408dff8dfd903e10adb4992df99d48f4a 100644 --- a/src/app/form/footer-form/footer-form.component.ts +++ b/src/app/form/footer-form/footer-form.component.ts @@ -62,11 +62,7 @@ export class FooterFormComponent implements OnChanges { ) { this.isNextFormTransition = true; } - if ( - this.currentForm === formType.structure && - (this.currentStep === structureFormStep.noStructure || - this.currentStep === structureFormStep.StructureInfoUnknown) - ) { + if (this.currentForm === formType.structure && this.currentStep === structureFormStep.noStructure) { this.isLastFormStep = true; } } @@ -142,13 +138,6 @@ export class FooterFormComponent implements OnChanges { return; } if (this.currentForm === formType.structure) { - if (this.currentStep === structureFormStep.structureChoiceCompletion) { - const chooseCompleteStructInfo = this.form.get('choiceCompletion').value; - if (!chooseCompleteStructInfo) { - this.changeCurrentStep.emit(structureFormStep.StructureInfoUnknown); - return; - } - } if (this.currentStep === structureFormStep.structureAccompanimentChoice) { const hasPlaceOfReception = this.form.get('placeOfReception').value; if (!hasPlaceOfReception) { @@ -214,8 +203,7 @@ export class FooterFormComponent implements OnChanges { this.currentForm === formType.structure && (this.currentStep === structureFormStep.mailSentInfo || this.currentStep === structureFormStep.structureCreationFinishedInfo || - this.currentStep === structureFormStep.noStructure || - this.currentStep === structureFormStep.StructureInfoUnknown) + this.currentStep === structureFormStep.noStructure) ); } diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index 8c71adcc1ea42b08fa7ed537eb2f71984a5ea655..168cd76d926acbd24f20f6e4343ef7336abe3904 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -316,10 +316,6 @@ export class FormViewComponent implements OnInit, AfterViewInit { if (type.formStep === structureFormStep.noStructure) { this.router.navigateByUrl('/profile'); } - if (type.formStep === structureFormStep.StructureInfoUnknown) { - //Creation de coquille vide ?? - this.router.navigateByUrl('/profile'); - } break; case formType.personaloffer: this.savePersonalOfferForm(); @@ -525,7 +521,6 @@ export class FormViewComponent implements OnInit, AfterViewInit { structureFormStep.noStructure, structureFormStep.structureCreationFinishedInfo, structureFormStep.mailSentInfo, - structureFormStep.StructureInfoUnknown, ]; case formType.profile: return [profileFormStep.profileJobSelection]; diff --git a/src/app/form/form-view/form-view.module.ts b/src/app/form/form-view/form-view.module.ts index 4bb05cce3d723a956147a75f0e4c89e9dba1a81b..90f4f5a4ca45e8360d59937cb1ee4235f06853ce 100644 --- a/src/app/form/form-view/form-view.module.ts +++ b/src/app/form/form-view/form-view.module.ts @@ -19,7 +19,6 @@ import { ProfileJobSelectionComponent } from './profile-form/profile-job-selecti import { ProfileStructureChoiceComponent } from './profile-form/profile-structure-choice/profile-structure-choice.component'; 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 { StructureChoiceCompletionComponent } from './structure-form/structure-choice-completion/structure-choice-completion.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'; @@ -32,12 +31,12 @@ import { StructureHoursComponent } from './structure-form/structure-hours/struct 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 { structureDigitalHelpingAccompanimentOtherComponent } from './structure-form/structure-public-target-other/structure-public-target-other.component'; +import { StructureSolidarityMaterialComponent } from './structure-form/structure-solidarity-material/structure-solidarity-material.component'; import { StructureTrainingPriceComponent } from './structure-form/structure-training-price/structure-training-price.component'; import { StructureTrainingTypeComponent } from './structure-form/structure-training-type/structure-training-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 { StructureWifiComponent } from './structure-form/structure-wifi/structure-wifi.component'; -import { StructureSolidarityMaterialComponent } from './structure-form/structure-solidarity-material/structure-solidarity-material.component'; @NgModule({ declarations: [ @@ -55,7 +54,6 @@ import { StructureSolidarityMaterialComponent } from './structure-form/structure StructureNameAndAddressComponent, StructureContactComponent, StructureAccompanimentChoiceComponent, - StructureChoiceCompletionComponent, StructureContactCompletionComponent, StructureAccessModalityComponent, StructureHoursComponent, diff --git a/src/app/form/form-view/global-components/information-step/information-step.component.html b/src/app/form/form-view/global-components/information-step/information-step.component.html index 6fd6632d4b80dd71131d57eae2e98b0745ab3c72..98b1310cec5b811f750c03a29a97ce8b490ef295 100644 --- a/src/app/form/form-view/global-components/information-step/information-step.component.html +++ b/src/app/form/form-view/global-components/information-step/information-step.component.html @@ -78,10 +78,7 @@ </div> </ng-container> <ng-container - *ngIf=" - (formType === formTypeEnum.personaloffer && step === personalOfferFormStep.personalOfferFinishedInfo) || - (formType === formTypeEnum.structure && step === structureFormStepEnum.StructureInfoUnknown) - " + *ngIf="formType === formTypeEnum.personaloffer && step === personalOfferFormStep.personalOfferFinishedInfo" > <div class="information-step-container profile-updated no-max-width"> <img src="../../assets/form/profileUpdated.svg" alt="image profil" /> diff --git a/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.html b/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.html deleted file mode 100644 index 42a1474729e2758aeecd35e69414363859d9beac..0000000000000000000000000000000000000000 --- a/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.html +++ /dev/null @@ -1,11 +0,0 @@ -<form [formGroup]="structureForm" *ngIf="structureForm" (keyup.enter)="isPageValid && !isEditMode ? nextPage() : null"> - <div class="title"> - <h3>Souhaitez-vous renseigner les informations de la structure ?</h3> - <p>Exemple : type d'établissement, accessibilité PMR, type de public ?</p> - </div> - <app-radio-form - [selectedOption]="structureForm.get('choiceCompletion').value" - (selectedEvent)="onRadioChange('choiceCompletion', $event)" - > - </app-radio-form> -</form> diff --git a/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.spec.ts b/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.spec.ts deleted file mode 100644 index cd0a35a3601db77d87a4c59b0396868dcd79b666..0000000000000000000000000000000000000000 --- a/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { StructureChoiceCompletionComponent } from './structure-choice-completion.component'; - -describe('StructureChoiceCompletionComponent', () => { - let component: StructureChoiceCompletionComponent; - let fixture: ComponentFixture<StructureChoiceCompletionComponent>; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ StructureChoiceCompletionComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(StructureChoiceCompletionComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.ts b/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.ts deleted file mode 100644 index 9b6bac48f093ca2d3315c10c4dd08c46c942bbbd..0000000000000000000000000000000000000000 --- a/src/app/form/form-view/structure-form/structure-choice-completion/structure-choice-completion.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; - -@Component({ - selector: 'app-structure-choice-completion', - templateUrl: './structure-choice-completion.component.html', -}) -export class StructureChoiceCompletionComponent { - @Input() structureForm: UntypedFormGroup; - @Input() isEditMode: boolean; - @Output() radioChange = new EventEmitter<any>(); - @Output() validateForm = new EventEmitter<any>(); - - ngOnInit(): void { - this.validateForm.emit(); - } - - public onRadioChange(name: string, value: boolean): void { - this.radioChange.emit({ name, value }); - } - 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 847438c3cff24ec166b9559289e662e6148a833c..f2aa9a8c9aec69e6a06f21ee8cf862cc245cb95a 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 @@ -11,8 +11,7 @@ *ngIf=" currentStep === structureFormStep.structureFormTime || currentStep === structureFormStep.mailSentInfo || - currentStep === structureFormStep.noStructure || - currentStep === structureFormStep.StructureInfoUnknown + currentStep === structureFormStep.noStructure " class="no-max-width" > @@ -47,14 +46,6 @@ (radioChange)="onRadioChange($event)" ></app-structure-accompaniment-choice> </div> - <div *ngIf="currentStep == structureFormStep.structureChoiceCompletion"> - <app-structure-choice-completion - [isEditMode]="isEditMode" - [structureForm]="structureForm" - (validateForm)="setValidationsForm()" - (radioChange)="onRadioChange($event)" - ></app-structure-choice-completion> - </div> <div *ngIf="currentStep == structureFormStep.structureContactCompletion"> <app-structure-contact-completion [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 f5b0c3964770ef7c3e675a0367ccd507478d112c..e3f5d5d1d45f9ea6fba612b8805651bac76791c0 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 @@ -162,9 +162,6 @@ export class StructureFormComponent implements OnChanges, OnInit { this.pagesValidation[structureFormStep.structureAccompanimentChoice] = { valid: this.structureForm.get('placeOfReception').valid, }; - this.pagesValidation[structureFormStep.structureChoiceCompletion] = { - valid: this.isEditMode ? true : this.structureForm.get('choiceCompletion').valid, - }; this.pagesValidation[structureFormStep.structureContactCompletion] = { valid: this.isEditMode ? true 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 5e1ce4ffb19d686e933efecbf2ecf3f90fb3b875..e548acc8d0853bb8fbedfac324a4f443411a02af 100644 --- a/src/app/form/form-view/structure-form/structureFormStep.enum.ts +++ b/src/app/form/form-view/structure-form/structureFormStep.enum.ts @@ -3,7 +3,6 @@ export enum structureFormStep { structureAccompanimentChoice, structureNameAndAddress, structureContact, - structureChoiceCompletion, structureFormTime, structureContactCompletion, structureType, @@ -27,5 +26,4 @@ export enum structureFormStep { structureCreationFinishedInfo, mailSentInfo, noStructure, - StructureInfoUnknown, } diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts index 9efa1ed23fe92d8ed9969d32c0245eaeba075587..df9cf117a1b9e654184dc1260dd711329c46be82 100644 --- a/src/app/utils/formUtils.ts +++ b/src/app/utils/formUtils.ts @@ -48,12 +48,6 @@ export class formUtils { name: 'Partage de données sur data.grandlyon.com', inputs: ['dataShareConsentDate'], }, - { - step: structureFormStep.structureChoiceCompletion, - name: 'Completion info structure', - inputs: ['choiceCompletion'], - hideForEdit: true, - }, { step: structureFormStep.structureContactCompletion, name: 'Personne contact informations',