@valtimo/task 13.41.0 → 13.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1852,6 +1852,7 @@ class TaskDetailModalComponent {
|
|
|
1852
1852
|
]).pipe(switchMap$1(([task, canAssign]) => canAssign
|
|
1853
1853
|
? this.taskService.getCandidateTeams(task.id).pipe(map(page => page.content), catchError$1(() => of([])))
|
|
1854
1854
|
: of([])), shareReplay(1));
|
|
1855
|
+
this._modalSession = 0;
|
|
1855
1856
|
this._subscriptions = new Subscription();
|
|
1856
1857
|
this.iconService.registerAll([FolderDetailsReference16]);
|
|
1857
1858
|
}
|
|
@@ -1985,6 +1986,8 @@ class TaskDetailModalComponent {
|
|
|
1985
1986
|
this._intermediateSaveComponent.clearCurrentProgress();
|
|
1986
1987
|
}
|
|
1987
1988
|
openTaskDetails(task) {
|
|
1989
|
+
// A skipped close cleanup can leave the preloaded flag of a previous open behind
|
|
1990
|
+
this.processLinkPreloaded$.next(false);
|
|
1988
1991
|
if (task) {
|
|
1989
1992
|
this.task$.next({ ...task });
|
|
1990
1993
|
}
|
|
@@ -2077,8 +2080,13 @@ class TaskDetailModalComponent {
|
|
|
2077
2080
|
this.modalOpen$.next(false);
|
|
2078
2081
|
this.modalCloseEvent$.next(!this.modalCloseEvent$.getValue());
|
|
2079
2082
|
this.modalClosed.emit();
|
|
2080
|
-
|
|
2083
|
+
const session = this._modalSession;
|
|
2084
|
+
// Delay clearing task data and submission until after modal close animation completes.
|
|
2085
|
+
// When the modal has been reopened for another task within that delay, clearing would wipe
|
|
2086
|
+
// the newly opened task, so the cleanup of a stale close is skipped.
|
|
2081
2087
|
runAfterCarbonModalClosed(() => {
|
|
2088
|
+
if (session !== this._modalSession)
|
|
2089
|
+
return;
|
|
2082
2090
|
this.processLinkPreloaded$.next(false);
|
|
2083
2091
|
this.task$.next(null);
|
|
2084
2092
|
this.taskAndProcessLink$.next(null);
|
|
@@ -2086,6 +2094,7 @@ class TaskDetailModalComponent {
|
|
|
2086
2094
|
});
|
|
2087
2095
|
}
|
|
2088
2096
|
openModal() {
|
|
2097
|
+
this._modalSession++;
|
|
2089
2098
|
this.modalOpen$.next(false);
|
|
2090
2099
|
setTimeout(() => {
|
|
2091
2100
|
this.modalOpen$.next(true);
|