bug/826 The tasks don't show the correct associated classification

This commit is contained in:
Jose Ignacio Recuerda Cambil 2019-03-08 10:53:28 +01:00 committed by Martin Rojas Miguel Angel
parent f21024cc9a
commit 99bd8118b7
3 changed files with 13 additions and 10 deletions

View File

@ -65,9 +65,13 @@
<span class="caret"></span>
</button>
<ul class="dropdown-menu" *dropdownMenu>
<li>
<a *ngFor="let classification of classifications" (click)="selectClassification(classification)">
{{classification.name}}
<li *ngFor="let classification of classifications" (click)="selectClassification(classification)">
<a>
<label>
<span class="material-icons md-20 blue ">{{classification.name === task.classificationSummaryResource?.name ?
'check_box': 'check_box_outline_blank'}} </span>
<span> {{classification.name}} </span>
</label>
</a>
</li>
</ul>

View File

@ -52,7 +52,6 @@ export class TaskdetailsGeneralFieldsComponent implements OnInit, OnChanges {
this.classificationService.getClassifications().subscribe(classificationList => {
this.requestInProgress = false;
this.classifications = classificationList;
if (classificationList.length > 0) { this.task.classificationSummaryResource = classificationList[0]; }
this.classificationsReceived.emit(this.classifications);
});
}

View File

@ -154,11 +154,11 @@ export class TaskMasterComponent implements OnInit, OnDestroy {
}
ngOnDestroy(): void {
this.taskChangeSubscription.unsubscribe();
this.taskDeletedSubscription.unsubscribe();
this.workbasketChangeSubscription.unsubscribe();
this.taskAddedSubscription.unsubscribe();
this.orientationSubscription.unsubscribe();
this.objectReferenceSubscription.unsubscribe();
if (this.taskChangeSubscription) { this.taskChangeSubscription.unsubscribe(); }
if (this.taskDeletedSubscription) { this.taskDeletedSubscription.unsubscribe(); }
if (this.workbasketChangeSubscription) { this.workbasketChangeSubscription.unsubscribe(); }
if (this.taskAddedSubscription) { this.taskAddedSubscription.unsubscribe(); }
if (this.orientationSubscription) { this.orientationSubscription.unsubscribe(); }
if (this.objectReferenceSubscription) { this.objectReferenceSubscription.unsubscribe(); }
}
}