Skip to content
Snippets Groups Projects
Verified Commit 772fcc53 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #11271 TIME 0:20 add formcontrol form mail tracking

parent 2896637e
No related branches found
No related tags found
No related merge requests found
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<mat-spinner style="margin:auto;"></mat-spinner> <mat-spinner style="margin:auto;"></mat-spinner>
</div> </div>
<ng-container *ngIf="!loading"> <ng-container *ngIf="!loading">
<div *ngIf="!adminMode" style="display: flex;align-items: center;justify-content: flex-end;"> <div *ngIf="!adminMode" style="display: flex;align-items: center;justify-content: flex-end;margin-top: 10px;margin-bottom: -20px;">
<span class="categoryLabel">{{lang[currentCategory]}}</span> <button mat-button class="categoryLabel" (click)="toggleMailTracking()" matTooltip="Activer le suivi de courrier">
<button mat-icon-button> {{lang[currentCategory]}}
<mat-icon color="primary" class="far fa-star" style="font-size: 20px;"></mat-icon> <mat-icon color="primary" class="{{this.arrFormControl['mail­tracking'].value ? 'fas':'far'}} fa-star" style="font-size: 20px;"></mat-icon>
</button> </button>
</div> </div>
<ng-container *ngFor="let category of fieldCategories"> <ng-container *ngFor="let category of fieldCategories">
......
...@@ -302,6 +302,8 @@ export class IndexingFormComponent implements OnInit { ...@@ -302,6 +302,8 @@ export class IndexingFormComponent implements OnInit {
myObservable.pipe( myObservable.pipe(
exhaustMap(() => this.initializeRoutes()), exhaustMap(() => this.initializeRoutes()),
tap((data) => { tap((data) => {
this.arrFormControl['mail­tracking'].setValue(false);
this.fieldCategories.forEach(element => { this.fieldCategories.forEach(element => {
this['indexingModels_' + element].forEach((elem: any) => { this['indexingModels_' + element].forEach((elem: any) => {
if (elem.identifier === 'docDate') { if (elem.identifier === 'docDate') {
...@@ -464,6 +466,8 @@ export class IndexingFormComponent implements OnInit { ...@@ -464,6 +466,8 @@ export class IndexingFormComponent implements OnInit {
this.availableFields = JSON.parse(JSON.stringify(this.availableFieldsClone)); 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.fieldCategories.forEach(category => {
this['indexingModels_' + category] = []; this['indexingModels_' + category] = [];
}); });
...@@ -651,4 +655,8 @@ export class IndexingFormComponent implements OnInit { ...@@ -651,4 +655,8 @@ export class IndexingFormComponent implements OnInit {
}) })
).subscribe();*/ ).subscribe();*/
} }
toggleMailTracking() {
this.arrFormControl['mail­tracking'].setValue(!this.arrFormControl['mail­tracking'].value);
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment