Commit 2f93e385 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #10684 TIME 0:10 fix close modal

parent 1f620f34
......@@ -5,7 +5,7 @@ import { LANG } from '../../translate.component';
import { NotificationService } from '../../notification.service';
import { MatChipInputEvent } from '@angular/material/chips';
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { switchMap, map, catchError, filter, exhaustMap, tap, debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { switchMap, map, catchError, filter, exhaustMap, tap, debounceTime, distinctUntilChanged, finalize } from 'rxjs/operators';
import { FormControl } from '@angular/forms';
import { FunctionsService } from '../../../service/functions.service';
import { CdkDragDrop, transferArrayItem } from '@angular/cdk/drag-drop';
......@@ -625,7 +625,11 @@ export class SentResourcePageComponent implements OnInit {
if (closeModal) {
this.closeModal('success');
}
}),
finalize(() => {
if (this.emailStatus === 'DRAFT') {
this.closeModal('success');
}
}),
catchError((err) => {
this.notify.handleSoftErrors(err);
......@@ -664,6 +668,11 @@ export class SentResourcePageComponent implements OnInit {
this.closeModal('success');
}
}),
finalize(() => {
if (this.emailStatus === 'DRAFT') {
this.closeModal('success');
}
}),
catchError((err) => {
this.notify.handleSoftErrors(err);
return of(false);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment