@@ -14,6 +14,7 @@ import {
1414 NavMenuBuilderService ,
1515 NavMenuSectionItem ,
1616 PermissionsService ,
17+ SocketConnectionService ,
1718 Store ,
1819 UsersService
1920} from '@gauzy/ui-core/core' ;
@@ -23,15 +24,15 @@ import { ReportService } from './reports/all-report/report.service';
2324
2425@UntilDestroy ( { checkProperties : true } )
2526@Component ( {
26- selector : 'ngx-pages' ,
27- styleUrls : [ 'pages.component.scss' ] ,
28- template : `
27+ selector : 'ngx-pages' ,
28+ styleUrls : [ 'pages.component.scss' ] ,
29+ template : `
2930 <ngx-one-column-layout *ngIf="!!menu && user">
3031 <ga-main-nav-menu></ga-main-nav-menu>
3132 <router-outlet></router-outlet>
3233 </ngx-one-column-layout>
3334 ` ,
34- standalone : false
35+ standalone : false
3536} )
3637export class PagesComponent extends TranslationBaseComponent implements AfterViewInit , OnInit , OnDestroy {
3738 public organization : IOrganization ;
@@ -51,7 +52,8 @@ export class PagesComponent extends TranslationBaseComponent implements AfterVie
5152 private readonly _integrationsService : IntegrationsService ,
5253 private readonly _integrationEntitySettingServiceStoreService : IntegrationEntitySettingServiceStoreService ,
5354 private readonly _navMenuBuilderService : NavMenuBuilderService ,
54- private readonly _permissionsService : PermissionsService
55+ private readonly _permissionsService : PermissionsService ,
56+ private readonly _socketConnectionService : SocketConnectionService
5557 ) {
5658 super ( translate ) ;
5759 }
@@ -127,6 +129,8 @@ export class PagesComponent extends TranslationBaseComponent implements AfterVie
127129 // Add the report menu items to the navigation menu
128130 this . addOrRemoveOrganizationReportsMenuItems ( ) ;
129131 } ) ;
132+
133+ if ( this . store . token ) this . _socketConnectionService . connect ( ) ;
130134 }
131135
132136 /**
0 commit comments