File tree Expand file tree Collapse file tree
components/hosted-databases Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { Title } from '@angular/platform-browser';
88import posthog from 'posthog-js' ;
99import { FoundHostedDatabase } from 'src/app/models/hosted-database' ;
1010import { CompanyService } from 'src/app/services/company.service' ;
11+ import { ConnectionsService } from 'src/app/services/connections.service' ;
1112import { HostedDatabaseService } from 'src/app/services/hosted-database.service' ;
1213
1314import { UserService } from 'src/app/services/user.service' ;
@@ -24,6 +25,7 @@ import { HostedDatabaseResetPasswordDialogComponent } from './hosted-database-re
2425} )
2526export class HostedDatabasesComponent implements OnInit {
2627 private _hostedDatabaseService = inject ( HostedDatabaseService ) ;
28+ private _connectionsService = inject ( ConnectionsService ) ;
2729 private _userService = inject ( UserService ) ;
2830 private _company = inject ( CompanyService ) ;
2931 private _dialog = inject ( MatDialog ) ;
@@ -56,6 +58,7 @@ export class HostedDatabasesComponent implements OnInit {
5658 dialogRef . afterClosed ( ) . subscribe ( async ( action ) => {
5759 if ( action === 'delete' ) {
5860 posthog . capture ( 'Hosted Databases: database deleted successfully' ) ;
61+ this . _connectionsService . invalidateConnections ( ) ;
5962 await this . _loadDatabases ( ) ;
6063 }
6164 } ) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ export class ConnectionsService {
6868
6969 public cast = this . connectionsSubject . asObservable ( ) ;
7070
71+ invalidateConnections ( ) : void {
72+ this . connectionsSubject . next ( null ) ;
73+ }
74+
7175 constructor (
7276 private _http : HttpClient ,
7377 private router : Router ,
You can’t perform that action at this time.
0 commit comments