diff --git a/web/src/app/administration/components/classification-details/classification-details.component.ts b/web/src/app/administration/components/classification-details/classification-details.component.ts index b0681db39..196b02fc9 100644 --- a/web/src/app/administration/components/classification-details/classification-details.component.ts +++ b/web/src/app/administration/components/classification-details/classification-details.component.ts @@ -242,7 +242,6 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy { return `custom${customNumber}`; } - // TODO: Remove when classification is in store getAvailableCategories(type: string) { let returnCategories: string[] = []; this.classificationTypes$.pipe(take(1)).subscribe(classTypes => { diff --git a/web/src/app/shared/store/classification-store/classification.state.ts b/web/src/app/shared/store/classification-store/classification.state.ts index 5b3bb7163..a4b1576f1 100644 --- a/web/src/app/shared/store/classification-store/classification.state.ts +++ b/web/src/app/shared/store/classification-store/classification.state.ts @@ -83,7 +83,7 @@ export class ClassificationState implements NgxsAfterBootstrap { classification.children = !classification.children ? [] : classification.children; }); ctx.patchState({ - classifications: [...classifications] + classifications }); }), ); @@ -159,16 +159,9 @@ export class ClassificationState implements NgxsAfterBootstrap { @Action(UpdateClassification) updateClassification(ctx: StateContext, action: SaveClassification): Observable { - return this.classificationsService.putClassification(action.classification).pipe( - // TODO remove this call when backend is fixed modified dates are not same - take(1), tap(() => this.classificationsService.getClassifications(ctx.getState().selectedClassificationType).subscribe( - classifications => { - ctx.patchState({ - classifications - }); - } - )) - ); + return this.classificationsService.putClassification(action.classification).pipe(take(1), tap( + classifications => ctx.patchState({ classifications }) + )); } // initialize after Startup service has configured the taskanaRestUrl properly.