|
|
@ -18,8 +18,9 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog'; |
|
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog'; |
|
|
import { ActivatedRoute, Router } from '@angular/router'; |
|
|
import { ActivatedRoute, Router } from '@angular/router'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { Observable, of, Subject } from 'rxjs'; |
|
|
import { EMPTY, Observable, of, Subject } from 'rxjs'; |
|
|
import { |
|
|
import { |
|
|
|
|
|
catchError, |
|
|
distinctUntilChanged, |
|
|
distinctUntilChanged, |
|
|
map, |
|
|
map, |
|
|
switchMap, |
|
|
switchMap, |
|
|
@ -78,16 +79,17 @@ export class GfActivityDialogHostComponent implements OnDestroy, OnInit { |
|
|
return { activity, user }; |
|
|
return { activity, user }; |
|
|
}) |
|
|
}) |
|
|
); |
|
|
); |
|
|
|
|
|
}), |
|
|
|
|
|
catchError(() => { |
|
|
|
|
|
this.navigateBack(); |
|
|
|
|
|
|
|
|
|
|
|
return EMPTY; |
|
|
}) |
|
|
}) |
|
|
); |
|
|
); |
|
|
}), |
|
|
}), |
|
|
takeUntilDestroyed(this.destroyRef) |
|
|
takeUntilDestroyed(this.destroyRef) |
|
|
) |
|
|
) |
|
|
.subscribe({ |
|
|
.subscribe(({ activity, user }) => { |
|
|
error: () => { |
|
|
|
|
|
this.navigateBack(); |
|
|
|
|
|
}, |
|
|
|
|
|
next: ({ activity, user }) => { |
|
|
|
|
|
if (mode === 'update') { |
|
|
if (mode === 'update') { |
|
|
if ( |
|
|
if ( |
|
|
!activity || |
|
|
!activity || |
|
|
@ -134,7 +136,6 @@ export class GfActivityDialogHostComponent implements OnDestroy, OnInit { |
|
|
}, |
|
|
}, |
|
|
isUpdate: false |
|
|
isUpdate: false |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|