diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.html b/src/frontend/app/indexation/indexing-form/indexing-form.component.html index 15d9da19b90d12d86c582ad0e6858cfea5d2ae58..d341358cfc4cfca1adb6c788a4438dd02ff59569 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.html +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.html @@ -2,10 +2,10 @@ <mat-spinner style="margin:auto;"></mat-spinner> </div> <ng-container *ngIf="!loading"> - <div *ngIf="!adminMode" style="display: flex;align-items: center;justify-content: flex-end;"> - <span class="categoryLabel">{{lang[currentCategory]}}</span> - <button mat-icon-button> - <mat-icon color="primary" class="far fa-star" style="font-size: 20px;"></mat-icon> + <div *ngIf="!adminMode" style="display: flex;align-items: center;justify-content: flex-end;margin-top: 10px;margin-bottom: -20px;"> + <button mat-button class="categoryLabel" (click)="toggleMailTracking()" matTooltip="Activer le suivi de courrier"> + {{lang[currentCategory]}} + <mat-icon color="primary" class="{{this.arrFormControl['mailÂtracking'].value ? 'fas':'far'}} fa-star" style="font-size: 20px;"></mat-icon> </button> </div> <ng-container *ngFor="let category of fieldCategories"> diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts index c3c26f4ba5458ff95ba6f805c392c422f523f7d5..4917d7b1b6bde57c815489f4699a485cc142aa56 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -302,6 +302,8 @@ export class IndexingFormComponent implements OnInit { myObservable.pipe( exhaustMap(() => this.initializeRoutes()), tap((data) => { + this.arrFormControl['mailÂtracking'].setValue(false); + this.fieldCategories.forEach(element => { this['indexingModels_' + element].forEach((elem: any) => { if (elem.identifier === 'docDate') { @@ -464,6 +466,8 @@ export class IndexingFormComponent implements OnInit { this.availableFields = JSON.parse(JSON.stringify(this.availableFieldsClone)); + this.arrFormControl['mailÂtracking'] = new FormControl({ value: '', disabled: this.adminMode ? true : false }); + this.fieldCategories.forEach(category => { this['indexingModels_' + category] = []; }); @@ -651,4 +655,8 @@ export class IndexingFormComponent implements OnInit { }) ).subscribe();*/ } + + toggleMailTracking() { + this.arrFormControl['mailÂtracking'].setValue(!this.arrFormControl['mailÂtracking'].value); + } } \ No newline at end of file