diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index e15f1a4c9c1de8fe96f75b499b191d74bbdded7b..720f12a742b316980fe47b0176aefa1d05f26925 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -452,7 +452,7 @@ export class FormViewComponent implements OnInit, AfterViewInit { categories: { languageAndIlliteracy: this.structureForm.get('categories').get('languageAndIlliteracy').value, handicaps: this.structureForm.get('categories').get('handicaps').value, - publicOthers: this.structureForm.get('categories').get('publicOthers').value, + genre: this.structureForm.get('categories').get('genre').value, }, }; case structureFormStep.structureDigitalHelpingAccompaniment: 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 4c7c99c90ed0ef90146fe0d89aab86b264405242..9bb4424a88fbbf1fafd27405b9f5436a443a1618 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 @@ -114,7 +114,7 @@ [isEditMode]="isEditMode" [structureForm]="structureForm" [handicaps]="handicaps" - [publicOthers]="publicOthers" + [genre]="genre" [languageAndIlliteracy]="languageAndIlliteracy" [isMandatoryFields]="false" (validateForm)="setValidationsForm()" 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 f7f8ed8de4ad656a9d6171145e7462ad884d90aa..cbb6c7daa22198b9671ea6400ae8f75f68e586f4 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 @@ -51,7 +51,7 @@ export class StructureFormComponent implements OnChanges, OnInit { public labelsQualifications: Category; public onlineProcedures: Category; public age: Category; - public publicOthers: Category; + public genre: Category; public handicaps: Category; public languageAndIlliteracy: Category; public solidarityMaterial: Category; @@ -274,8 +274,8 @@ export class StructureFormComponent implements OnChanges, OnInit { this.languageAndIlliteracy = categ; break; } - case CategoryEnum.publicOthers: { - this.publicOthers = categ; + case CategoryEnum.genre: { + this.genre = categ; break; } case CategoryEnum.solidarityMaterial: { diff --git a/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.html b/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.html index 725cb30b3e84991df282019a13bc086cd5d0308c..f7ba4ce7c9d31904f3a9a12d5ccf97ee0ed646a1 100644 --- a/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.html +++ b/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.html @@ -56,18 +56,18 @@ /> </div> </div> - <div *ngIf="publicOthers"> + <div *ngIf="genre"> <div class="title"> - <h4>Autre</h4> + <h4>Genre</h4> </div> <div class="btn-grid"> <app-button - *ngFor="let choice of publicOthers.modules" + *ngFor="let choice of genre.modules" [ngClass]="{ selectedChoice: true }" - [extraClass]="isInArray(choice.id, 'publicOthers') ? 'selected' : ''" + [extraClass]="isInArray(choice.id, 'genre') ? 'selected' : ''" [style]="buttonTypeEnum.CheckButton" [text]="choice.name" - (action)="updateChoicePublic(choice.id, 'publicOthers')" + (action)="updateChoicePublic(choice.id, 'genre')" /> </div> </div> diff --git a/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.ts b/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.ts index f1fbd1c6f20883fee4370c2ed640e0156597fc5c..2c7871bf3407da5a8d6e6c0acdd4225434d21d11 100644 --- a/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.ts +++ b/src/app/form/form-view/structure-form/structure-public-target/structure-public-target.component.ts @@ -12,7 +12,7 @@ export class StructurePublicTargetComponent implements OnInit, OnChanges { @Input() age: Category; @Input() languageAndIlliteracy: Category; @Input() handicaps: Category; - @Input() publicOthers: Category; + @Input() genre: Category; @Input() isEditMode: boolean; @Input() isMandatoryFields = true; @Output() updateChoice = new EventEmitter<any>(); diff --git a/src/app/form/orientation-form-view/online-demarch/onlineDemarch-form.component.html b/src/app/form/orientation-form-view/online-demarch/onlineDemarch-form.component.html index e59029fa4f07d4ef90f509d2d58102d3e6a44a3c..4259b8ace0421ff487704f15b66efc2065f48b10 100644 --- a/src/app/form/orientation-form-view/online-demarch/onlineDemarch-form.component.html +++ b/src/app/form/orientation-form-view/online-demarch/onlineDemarch-form.component.html @@ -32,7 +32,7 @@ [structureForm]="form" [languageAndIlliteracy]="categories.languageAndIlliteracy" [handicaps]="categories.handicaps" - [publicOthers]="categories.publicOthers" + [genre]="categories.genre" [age]="categories.age" [isMandatoryFields]="currentStep === onlineDemarchesMeetingSteps.publicTypeMandatory" (validateForm)="checkValidation()" diff --git a/src/app/form/orientation-form-view/orientation-form-view.component.ts b/src/app/form/orientation-form-view/orientation-form-view.component.ts index 72e5a0ce98e747f419936847d2fd64de82aa24b7..c377ca210b178591e3ed398d9dd6e32affeda3c9 100644 --- a/src/app/form/orientation-form-view/orientation-form-view.component.ts +++ b/src/app/form/orientation-form-view/orientation-form-view.component.ts @@ -84,7 +84,7 @@ export class OrientationFormViewComponent implements OnInit, AfterContentChecked theme: '', modules: [], }, - publicOthers: { + genre: { id: '', name: '', theme: '', @@ -270,8 +270,8 @@ export class OrientationFormViewComponent implements OnInit, AfterContentChecked this.categories.languageAndIlliteracy = categ; break; } - case CategoryEnum.publicOthers: { - this.categories.publicOthers = categ; + case CategoryEnum.genre: { + this.categories.genre = categ; break; } case CategoryEnum.handicaps: { diff --git a/src/app/models/personalOffer.model.ts b/src/app/models/personalOffer.model.ts index 3d830779c78249e18da8835fe797e0ba76e68b5c..e456b40dc0b84a08c66a42f1196bec49dac98423 100644 --- a/src/app/models/personalOffer.model.ts +++ b/src/app/models/personalOffer.model.ts @@ -14,7 +14,7 @@ export class PersonalOffer { labelsQualifications: obj?.categories?.labelsQualifications || [], languageAndIlliteracy: obj?.categories?.languageAndIlliteracy || [], onlineProcedures: obj?.categories?.onlineProcedures || [], - publicOthers: obj?.categories?.publicOthers || [], + genre: obj?.categories?.genre || [], }, }); } diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 4d0e652071007b964ce681555dba665f050676ec..6f0ccefc2bfbcc3b7d000abdb045b9aed1d5c0a3 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -73,7 +73,7 @@ export class Structure { labelsQualifications: obj?.categories?.labelsQualifications || [], languageAndIlliteracy: obj?.categories?.languageAndIlliteracy || [], onlineProcedures: obj?.categories?.onlineProcedures || [], - publicOthers: obj?.categories?.publicOthers || [], + genre: obj?.categories?.genre || [], selfServiceMaterial: obj?.categories?.selfServiceMaterial || [], solidarityMaterial: obj?.categories?.solidarityMaterial || [], }, diff --git a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html index 081a360c36a6ee6c21f74b58ebef7ab803497d1c..7898b2331c38bd5d621d4f8933344d8b591c834b 100644 --- a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html +++ b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html @@ -355,12 +355,10 @@ <div class="content"> <ng-container *ngIf=" - isFieldValid('publicOthers', 'categories') && - structure.categoriesDisplay && - structure.categoriesDisplay.publicOthers + isFieldValid('genre', 'categories') && structure.categoriesDisplay && structure.categoriesDisplay.genre " > - <div *ngFor="let public of structure.categoriesDisplay.publicOthers" class="list"> + <div *ngFor="let public of structure.categoriesDisplay.genre" class="list"> <p>{{ public }}</p> </div> </ng-container> @@ -369,7 +367,7 @@ <ng-container *ngIf=" structure.categoriesDisplay.languageAndIlliteracy.length === 0 && - structure.categoriesDisplay.publicOthers.length === 0 && + structure.categoriesDisplay.genre.length === 0 && structure.categoriesDisplay.handicaps.length === 0 " > diff --git a/src/app/shared/enum/category.enum.ts b/src/app/shared/enum/category.enum.ts index 2efdafe76403563af950cd8b114565665333910e..e6f7a57ce8f6d56588acbdfcbe81d074e1517755 100644 --- a/src/app/shared/enum/category.enum.ts +++ b/src/app/shared/enum/category.enum.ts @@ -9,5 +9,5 @@ export enum CategoryEnum { age = 'age', languageAndIlliteracy = 'languageAndIlliteracy', handicaps = 'handicaps', - publicOthers = 'publicOthers', + genre = 'genre', } diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html index 1c3d8e369da1753525e318626f688b73b8d701d7..1198532199230f618f2aad14b0702ec60ad51724 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.html +++ b/src/app/structure-list/components/structure-details/structure-details.component.html @@ -279,11 +279,11 @@ </p> </div> <div - *ngIf="structure.categoriesDisplay.publicOthers && structure.categoriesDisplay.publicOthers.length" + *ngIf="structure.categoriesDisplay.genre && structure.categoriesDisplay.genre.length" fxLayout="column" fxLayoutGap="8px" > - <p *ngFor="let label of structure.categoriesDisplay.publicOthers.sort()" class="no-margin-bottom"> + <p *ngFor="let label of structure.categoriesDisplay.genre.sort()" class="no-margin-bottom"> {{ label }} </p> </div> diff --git a/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts b/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts index e5aa63ebc08c46f0283ee9682fd4bbb9f6ee8ef3..61b960f3e4c877f1061a740e69fb0f2c716e7b50 100644 --- a/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts +++ b/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts @@ -154,7 +154,7 @@ export class StructureListSearchComponent implements OnInit { module.name === 'age' || module.name === 'languageAndIlliteracy' || module.name === 'handicaps' || - module.name === 'publicOthers' + module.name === 'genre' ).length; this.numberEquipmentChecked = checkedModules.filter( (module) => module.name === 'solidarityMaterial' || module.name === 'selfServiceMaterial' diff --git a/src/app/structure-list/enum/public.enum.ts b/src/app/structure-list/enum/public.enum.ts index 6ee5e79fd13ea34cbbf01983a7bf8afa5be1f58a..f99b7d044b0ce1810454973b1d06028f8a40e5d6 100644 --- a/src/app/structure-list/enum/public.enum.ts +++ b/src/app/structure-list/enum/public.enum.ts @@ -2,5 +2,5 @@ export enum PublicCategorie { age = 'age', handicaps = 'handicaps', languageAndIlliteracy = 'languageAndIlliteracy', - other = 'publicOthers', + other = 'genre', } diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts index 0061edd0c5969576801d645b3245cf333aef55ee..700bfca136661cff7a102708a9585afa2987ca5e 100644 --- a/src/app/utils/formUtils.ts +++ b/src/app/utils/formUtils.ts @@ -123,7 +123,7 @@ export class formUtils { age: this.loadArrayForCheckbox(structure.categories?.age, true), languageAndIlliteracy: this.loadArrayForCheckbox(structure.categories?.languageAndIlliteracy, false), selfServiceMaterial: this.loadArrayForCheckbox(structure.categories?.selfServiceMaterial, false), - publicOthers: this.loadArrayForCheckbox(structure.categories?.publicOthers, false), + genre: this.loadArrayForCheckbox(structure.categories?.genre, false), baseSkills: new UntypedFormControl(structure.categories?.baseSkills), advancedSkills: new UntypedFormControl(structure.categories?.advancedSkills), solidarityMaterial: this.loadArrayForCheckbox(structure.categories?.solidarityMaterial, false), diff --git a/src/app/utils/orientationUtils.ts b/src/app/utils/orientationUtils.ts index 96dac5edae3822075e66f49ca1f136a87455d312..881ee4c6f58bce9edcc8d37c6b1c524ea787daa9 100644 --- a/src/app/utils/orientationUtils.ts +++ b/src/app/utils/orientationUtils.ts @@ -118,7 +118,7 @@ export class OrientationUtils { { age: new UntypedFormArray([], Validators.required), languageAndIlliteracy: new UntypedFormArray([]), - publicOthers: new UntypedFormArray([]), + genre: new UntypedFormArray([]), handicaps: new UntypedFormArray([]), }, Validators.required