mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF-4522] Metadata value is not rolled back upon error (#5550)
* * initial commit * * removed breaking change * * fixed ts * * fixed minor changes * * fixed changes * * minor changes * * fixed unit test * * docs added * * fixed date clear problem * * fixed unit test
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, EventEmitter, Output, OnDestroy, OnChanges, OnInit } from '@angular/core';
|
||||
import { takeUntil, concatMap } from 'rxjs/operators';
|
||||
import { takeUntil, concatMap, catchError } from 'rxjs/operators';
|
||||
import { Subject, of, forkJoin } from 'rxjs';
|
||||
import {
|
||||
CardViewDateItemModel,
|
||||
@@ -274,12 +274,16 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
*/
|
||||
private updateTaskDetails(updateNotification: UpdateNotification) {
|
||||
this.taskCloudService.updateTask(this.appName, this.taskId, updateNotification.changed)
|
||||
.subscribe(
|
||||
(taskDetails) => {
|
||||
this.taskDetails = taskDetails;
|
||||
.pipe(catchError(() => {
|
||||
this.cardViewUpdateService.updateElement(updateNotification.target);
|
||||
return of(null);
|
||||
}))
|
||||
.subscribe((taskDetails) => {
|
||||
if (taskDetails) {
|
||||
this.taskDetails = taskDetails;
|
||||
}
|
||||
this.refreshData();
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
private loadParentName(taskId: string) {
|
||||
|
Reference in New Issue
Block a user