diff --git a/src/frontend/app/indexation/indexation.component.html b/src/frontend/app/indexation/indexation.component.html index ca8c585a056a5908ea92542f06df988dfe3679aa..c8d7bf06707d7115fd230e7fb2e695ceb5f7bbcc 100644 --- a/src/frontend/app/indexation/indexation.component.html +++ b/src/frontend/app/indexation/indexation.component.html @@ -17,11 +17,11 @@ <button mat-menu-item disabled style="text-align:center;" (click)="$event.stopPropagation();">Modèles d'enregistrement</button> <ng-container *ngFor="let indexingModel of indexingModels"> - <button mat-menu-item (click)="loadIndexingModel(indexingModel)" + <button mat-menu-item *ngIf="indexingModel.master === null" (click)="loadIndexingModel(indexingModel)" [title]="indexingModel.label" [class.listModels-menu-selected]="indexingModel.id === currentIndexingModel.id">{{indexingModel.label}} {{indexingModel.default ? '(' + lang.default + ')': ''}}</button> - <ng-container *ngFor="let privateIndexingModel of indexingModel.children"> - <button mat-menu-item (click)="loadIndexingModel(privateIndexingModel)" + <ng-container *ngFor="let privateIndexingModel of indexingModels"> + <button mat-menu-item *ngIf="privateIndexingModel.master === indexingModel.id" (click)="loadIndexingModel(privateIndexingModel)" [title]="privateIndexingModel.label" [class.listModels-menu-selected]="privateIndexingModel.id === currentIndexingModel.id" style="padding-left: 50px;display: flex;align-items: center;"> <div style="flex:1;"> {{privateIndexingModel.label}} <span class="listModels-menu-badge">privée</span> diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts index 6ece4c5e53343fb6c56c49f0275415c1778c2a47..06b859c7766b823ec33de365d7edb155e5823740 100644 --- a/src/frontend/app/indexation/indexation.component.ts +++ b/src/frontend/app/indexation/indexation.component.ts @@ -83,22 +83,6 @@ export class IndexationComponent implements OnInit { } } - //TO DO : WAIT BACK - this.indexingModels[0].children = - [ - { - id: 9, - label: 'toto', - category: 'outgoing', - default: false, - owner: 23, - private: false, - master: 1, - enabled: true, - used: false - } - ] - if (this.appService.getViewMode()) { setTimeout(() => { this.sidenavLeft.open(); @@ -171,7 +155,7 @@ export class IndexationComponent implements OnInit { const privateIndexingModel = { category: this.indexingForm.getCategory(), - label: 'toto', + label: this.currentIndexingModel.label + '_' + Math.floor(Math.random() * Math.floor(9999)), owner: this.headerService.user.id, private: true, fields: fields,