-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(activate/deactivate project): subscribe to the observable #1261
fix(activate/deactivate project): subscribe to the observable #1261
Conversation
…ger the response Need to subscribe to trigger the request, otherwise it will not be sent. The request is lazy. Fix also for activating the project.
DEV-2931 Deactivate project functionality in your account does not work anymore
Expected result : Project gets marked as deactivated and does not show up im my Projects anymore Actual Result: Nothing happens - Project stays active |
@@ -168,6 +171,7 @@ export class ProjectsListComponent implements OnInit { | |||
const dialogRef = this._dialog.open(DialogComponent, dialogConfig); | |||
|
|||
dialogRef.afterClosed().subscribe((response) => { | |||
console.log('Dialog was closed', response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course
@@ -195,18 +199,16 @@ export class ProjectsListComponent implements OnInit { | |||
const uuid = this._projectService.iriToUuid(id); | |||
// the deleteProject() method in js-lib sets the project's status to false, it is not actually deleted | |||
|
|||
this._dspApiConnection.admin.projectsEndpoint | |||
this.deactivateSubscription = this._dspApiConnection.admin.projectsEndpoint | |||
.deleteProject(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of creating subscription use .pipe(take(1)), then you dont need to unsubscribe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. thanks.
…return-true-observables-that-also * main: chore(main): release 11.1.3 (#1268) fix(date-picker): date-picker doesn't show in advanced search (#1267) chore(main): release 11.1.2 (#1265) fix(results): go back to search form button fix (#1266) fix(advanced-search): undefined error leads to blank page (#1264) chore(main): release 11.1.1 (#1263) fix(results): user unable to execute second fulltext search (#1262) fix(activate/deactivate project): subscribe to the observable (#1261)
Need to subscribe to the observable to trigger the request, otherwise it will not be sent. The observable is lazy. Fix also for activating the project.
resolves DEV-2931