You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by hs...@apache.org on 2022/09/14 16:42:40 UTC
[incubator-datalab] branch feat/DATALAB-3046/confrimation-and-notification-windows updated: minor fix
This is an automated email from the ASF dual-hosted git repository.
hshpak pushed a commit to branch feat/DATALAB-3046/confrimation-and-notification-windows
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/feat/DATALAB-3046/confrimation-and-notification-windows by this push:
new ee6f7287c minor fix
ee6f7287c is described below
commit ee6f7287c12bb8a15111016e39f7c4929d58b414
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Wed Sep 14 19:42:32 2022 +0300
minor fix
---
.../share-dialog/share-dialog.component.ts | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts
index ae26b0bdd..08711f5b8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts
@@ -23,7 +23,7 @@ import { DialogWindowTabConfig, UserData, UserDataType } from '../image-action.m
import { NgModel } from '@angular/forms';
import { ImagesService } from '../../../images/images.service';
import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
-import { ImageActionModalData, ModalTitle, Toaster_Message, UnShareModal } from '../../../images';
+import { ImageActionModalData, ImageParams, ModalTitle, ProjectImagesInfo, Toaster_Message, UnShareModal } from '../../../images';
import { switchMap, tap } from 'rxjs/operators';
import { EMPTY, Observable } from 'rxjs';
import { UnShareWarningComponent } from '../unshare-warning/un-share-warning.component';
@@ -101,17 +101,19 @@ export class ShareDialogComponent implements OnInit {
panelClass: 'modal-sm'
}).afterClosed()
.pipe(
- switchMap((confirm) => {
- if (confirm) {
- return this.imagesService.shareImageAllUsers(imageInfo);
- }
- return EMPTY;
- }),
- switchMap((v) => this.getSharingUserList()),
+ switchMap((isShare) => this.sendShareRequest(isShare, imageInfo)),
+ switchMap(() => this.getSharingUserList()),
tap(() => this.toastr.success(Toaster_Message.successUnShare, Toaster_Message.successTitle))
);
}
+ private sendShareRequest(flag: boolean, imageInfo: ImageParams): Observable<ProjectImagesInfo> {
+ if (!flag) {
+ return EMPTY;
+ }
+ return this.imagesService.shareImageAllUsers(imageInfo);
+ }
+
private initUserList(): void {
this.$getUserListData = this.getSharingUserList();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org