) {}\r\n\r\n setClient(client: IClientInfo) {\r\n this.store.dispatch(changeClient({ client }));\r\n }\r\n}\r\n"," \r\n \r\n {{ initials$ | async }}\r\n \r\n account\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, OnDestroy, OnInit, ChangeDetectionStrategy } from '@angular/core';\r\nimport { select, Store } from '@ngrx/store';\r\nimport { Auth, AuthActions, IClientInfo, ICurrentClient, LoggedInUser, RootState, isNotNull, isNotNullOrUndefined } from '@core';\r\nimport { filter, first, map } from 'rxjs/operators';\r\nimport { Router } from '@angular/router';\r\nimport { selectDocumentsSigned } from 'src/app/@core/auth/store/auth.selectors';\r\nimport { Idle, DEFAULT_INTERRUPTSOURCES } from '@ng-idle/core';\r\nimport { Unsubscriber } from '@core';\r\n\r\n@Unsubscriber()\r\n@Component({\r\n selector: 'maas-account-info',\r\n templateUrl: './account-info.component.html',\r\n styleUrls: ['./account-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AccountInfoComponent implements OnInit,OnDestroy{\r\n private clientId: string = '';\r\n maxIdleSeconds: number = 1800;\r\n\r\n public initials$ = this.store.pipe(\r\n select(Auth.selectLoggedInUser),\r\n filter(isNotNull),\r\n map((u: LoggedInUser) => u.firstName.charAt(0) + u.lastName.charAt(0))\r\n );\r\n\r\n isAdmin$ = this.store.select(Auth.selectIsAdmin);\r\n documentsSigned$ = this.store.select(selectDocumentsSigned);\r\n hasSupplierMarketAccess$ = this.store.select(Auth.hasSuplierMarketplaceAccess);\r\n hasInsightsAccess$ = this.store.select(Auth.hasEmployerInsightsAccess);\r\n\r\n moreThanOneClient$ = this.store.pipe(\r\n select(Auth.selectClients),\r\n filter(isNotNullOrUndefined),\r\n map((c: IClientInfo[]) => c.length > 2)\r\n );\r\n\r\n constructor(private store: Store,\r\n private router: Router,\r\n private idle: Idle\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.store\r\n .select(Auth.selectCurrentClient)\r\n .pipe(filter(isNotNull))\r\n .subscribe((client: ICurrentClient) => (this.clientId = client.id));\r\n\r\n this.idle.setIdle(5);\r\n this.idle.setTimeout(this.maxIdleSeconds);\r\n this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);\r\n\r\n this.idle.watch();\r\n\r\n this.idle.onTimeout.pipe(first()).subscribe(() => {\r\n this.store.dispatch(AuthActions.sessionExpired());\r\n });\r\n\r\n }\r\n\r\n onEmployeeClick() {\r\n this.router.navigateByUrl(`app/${this.clientId}/employees`);\r\n }\r\n\r\n onAboutClick() {\r\n this.router.navigateByUrl('app/about');\r\n }\r\n\r\n logout() {\r\n this.store.dispatch(AuthActions.logout());\r\n }\r\n\r\n onProfileClick() {\r\n this.router.navigateByUrl(`app/${this.clientId}/profile/employer/company`);\r\n }\r\n\r\n onSupplierProfileClick() {\r\n this.router.navigateByUrl(`app/${this.clientId}/profile/supplier/company`)\r\n }\r\n\r\n ngOnDestroy(): void {\r\n }\r\n}\r\n","\r\n","import { ChangeDetectionStrategy, Component, OnDestroy, ViewEncapsulation } from '@angular/core';\r\nimport { environment } from '@env/environment';\r\nimport { Store, select } from '@ngrx/store';\r\nimport { Auth, ICurrentClient, RootState, SubscriptionOptions, isNotNull, isNotUndefined } from '@core';\r\nimport { Subscription, filter, switchMap } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'maas-header',\r\n templateUrl: './header.component.html',\r\n styleUrls: ['./header.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class HeaderComponent implements OnDestroy {\r\n routes: { url: string; text: string }[] = [];\r\n appname = environment.appName;\r\n sub: Subscription;\r\n\r\n constructor(private store: Store) {\r\n this.sub = this.store.pipe(\r\n select(Auth.selectDocumentsSigned),\r\n filter(signed => !!signed),\r\n switchMap(() => this.store.select(Auth.selectCurrentClient)),\r\n filter(isNotNull)\r\n )\r\n .subscribe((client: ICurrentClient) => {\r\n const clientId = client.id;\r\n this.routes = [{ url: `${clientId}/home`, text: 'overview' }];\r\n if (client.subscriptions & SubscriptionOptions.EmployerInsights) {\r\n this.routes.push({ url: `${clientId}/experience`, text: 'experience insights' });\r\n this.routes.push({ url: `${clientId}/supplier`, text: 'supplier insights' });\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.sub.unsubscribe();\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'maas-footer',\r\n templateUrl: './footer.component.html',\r\n styleUrls: ['./footer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FooterComponent {\r\n currentYear: number = new Date().getFullYear();\r\n}\r\n","\r\n","import { DocumentsSignedGuard } from './../@core/auth/guards/documents-signed.guard';\r\nimport { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { ApplicationWrapperRootComponent } from './application-wrapper-root/application-wrapper-root.component';\r\nimport {\r\n AdminGuard,\r\n ClientAccessGuard,\r\n EmployerHomeGuard,\r\n InsightsAccessGuard,\r\n SupplierHomeGuard,\r\n} from '@core';\r\n\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: ApplicationWrapperRootComponent,\r\n children: [\r\n {\r\n path: 'admin',\r\n canActivate: [AdminGuard],\r\n loadChildren: () => import('../admin/admin.module').then((m) => m.AdminModule),\r\n },\r\n {\r\n path: 'account-disabled',\r\n loadChildren: () => import('../pages/account-diabled/account-diabled.module').then(m => m.AccountDiabledModule)\r\n },\r\n {\r\n path: 'acknowledge',\r\n loadChildren: () => import('../acknowledge-documents/acknowledge-documents.module')\r\n .then(m => m.AcknowledgeDocumentsModule)\r\n },\r\n {\r\n path: ':clientId',\r\n canActivate: [DocumentsSignedGuard, ClientAccessGuard],\r\n children: [\r\n {\r\n path: 'home',\r\n canActivate: [EmployerHomeGuard],\r\n loadChildren: () => import('../home/home.module').then((m) => m.HomeModule),\r\n },\r\n {\r\n path: 'employees',\r\n canActivateChild: [InsightsAccessGuard],\r\n loadChildren: () => import('../pages/employees/employees.module').then((m) => m.EmployeesModule),\r\n },\r\n {\r\n path: 'experience',\r\n loadChildren: () =>\r\n import('../pages/experience-insights/experience-insights.module').then((m) => m.ExperienceInsightsModule),\r\n },\r\n {\r\n path: 'supplier',\r\n loadChildren: () =>\r\n import('../pages/supplier-insights/supplier-insights.module').then((m) => m.SupplierInsightsModule),\r\n },\r\n {\r\n path: 'profile/employer',\r\n loadChildren: () =>\r\n import('../profile/employer-profile/employer-profile.module').then((m) => m.EmployerProfileModule),\r\n },\r\n {\r\n path: 'profile/supplier',\r\n loadChildren: () =>\r\n import('../profile/supplier-profile/supplier-profile.module').then((m) => m.SupplierProfileModule)\r\n },\r\n {\r\n path: 'supplier-home',\r\n canActivate: [SupplierHomeGuard],\r\n loadChildren: () =>\r\n import('../supplier-home/supplier-home.module').then((m) => m.SupplierHomeModule)\r\n },\r\n {\r\n path: 'service-listing',\r\n loadChildren: () => import('../service-listing/service-listing.module').then((m) => m.ServiceListingModule)\r\n },\r\n {\r\n path: 'fit',\r\n loadChildren: () => import('../fit/fit.module').then(m => m.FitModule)\r\n },\r\n\r\n ],\r\n },\r\n ],\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class ApplicationWrapperRoutingModule {}\r\n","/**\r\n * (c) 2020 KPMG LLP, a Delaware limited liability partnership\r\n * and the U.S. member firm of the KPMG network of independent member\r\n * firms affiliated with KPMG International Cooperative (\"KPMG\r\n * International\"), a Swiss entity. All rights reserved.\r\n */\r\n\r\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\r\nimport { routeAnimations } from '@core';\r\n\r\n@Component({\r\n selector: 'maas-application-wrapper-root',\r\n templateUrl: './application-wrapper-root.component.html',\r\n styleUrls: ['./application-wrapper-root.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n animations: [routeAnimations],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ApplicationWrapperRootComponent {\r\n}\r\n","\r\n","/**\r\n * (c) 2020 KPMG LLP, a Delaware limited liability partnership\r\n * and the U.S. member firm of the KPMG network of independent member\r\n * firms affiliated with KPMG International Cooperative (\"KPMG\r\n * International\"), a Swiss entity. All rights reserved.\r\n */\r\n\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ApplicationWrapperRoutingModule } from './application-wrapper-routing.module';\r\nimport { ApplicationWrapperRootComponent } from './application-wrapper-root/application-wrapper-root.component';\r\nimport { HeaderComponent } from './header/header.component';\r\nimport { FooterComponent } from './footer/footer.component';\r\nimport { ClientPickerComponent } from './client-picker/client-picker.component';\r\nimport { AccountInfoComponent } from './account-info/account-info.component';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatSelectModule } from '@angular/material/select';\r\n\r\n@NgModule({\r\n declarations: [\r\n ApplicationWrapperRootComponent,\r\n HeaderComponent,\r\n FooterComponent,\r\n AccountInfoComponent,\r\n ClientPickerComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatMenuModule,\r\n MatSelectModule,\r\n ApplicationWrapperRoutingModule\r\n ],\r\n})\r\nexport class ApplicationWrapperModule {}\r\n","const { isArray } = Array;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n","import { combineLatestInit } from '../observable/combineLatest';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { popResultSelector } from '../util/args';\nexport function combineLatest(...args) {\n const resultSelector = popResultSelector(args);\n return resultSelector\n ? pipe(combineLatest(...args), mapOneOrManyArgs(resultSelector))\n : operate((source, subscriber) => {\n combineLatestInit([source, ...argsOrArgArray(args)])(subscriber);\n });\n}\n","import { combineLatest } from './combineLatest';\nexport function combineLatestWith(...otherSources) {\n return combineLatest(...otherSources);\n}\n"],"x_google_ignoreList":[12,13,14]}