Skip to content

Commit 7ef88b1

Browse files
committed
9694-capture-affiliations-during-sign-in
1 parent 90ccc01 commit 7ef88b1

8 files changed

Lines changed: 22 additions & 12 deletions

File tree

src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { FormsModule } from '@angular/forms'
3939
PseudoModule, // Remove on angular 10 https://bit.ly/3ezbF4v
4040
// Environmental dependent modules
4141
EnvironmentBannerModule,
42-
FormsModule
42+
FormsModule,
4343
],
4444
providers: [
4545
TitleService,

src/app/authorize/pages/authorize/authorize.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export class AuthorizeComponent {
7373
*/
7474
ngOnInit(): void {
7575
this.loading = true
76-
7776

7877
forkJoin({
7978
platform: this.loadPlatformInfo(),

src/app/cdk/interstitials/affiliations-interstitial/interstitial-component/affiliations-interstitial.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@
343343
class="orcid-logo"
344344
/>
345345
<div class="published-domain">
346-
<strong class="$orcid-custom-typography">{{ addedAffiliation?.affiliationName?.value }}</strong>
346+
<strong class="$orcid-custom-typography">{{
347+
addedAffiliation?.affiliationName?.value
348+
}}</strong>
347349
<div>
348350
<small> {{ addedAffiliation?.departmentName?.value }} </small>
349351
<small

src/app/core/login-interstitials-manager/implementations/login-domain-interstitials-manager.service.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Injectable, Type } from '@angular/core'
1+
import { Inject, Injectable, Type } from '@angular/core'
22
import { Observable, of } from 'rxjs'
33

44
import { InterstitialsService } from 'src/app/cdk/interstitials/interstitials.service'
@@ -40,7 +40,7 @@ export class LoginDomainInterstitialManagerService extends LoginBaseInterstitial
4040
interstitialsService: InterstitialsService,
4141
togglzService: TogglzService,
4242
qaFlagService: QaFlagsService,
43-
@Inject(WINDOW) private _window: Window,
43+
@Inject(WINDOW) private _window: Window
4444
) {
4545
// Pass dependencies to the parent
4646
super(_matDialog, togglzService, interstitialsService, qaFlagService)
@@ -63,7 +63,12 @@ export class LoginDomainInterstitialManagerService extends LoginBaseInterstitial
6363
const hasNoPublicDomains = !this.userHasPublicDomains(userRecord.emails)
6464
const hasPrivateDomains = this.userHasPrivateDomains(userRecord.emails)
6565

66-
if (!hasNoPublicDomains || !hasPrivateDomains || isImpersonation || insidePopUpWindows) {
66+
if (
67+
!hasNoPublicDomains ||
68+
!hasPrivateDomains ||
69+
isImpersonation ||
70+
insidePopUpWindows
71+
) {
6772
return of(false)
6873
}
6974
return of(true)
@@ -96,7 +101,3 @@ export class LoginDomainInterstitialManagerService extends LoginBaseInterstitial
96101
return ShareEmailsDomainsComponent
97102
}
98103
}
99-
function Inject(WINDOW: any): (target: typeof LoginDomainInterstitialManagerService, propertyKey: undefined, parameterIndex: 4) => void {
100-
throw new Error('Function not implemented.')
101-
}
102-

src/app/core/login-interstitials-manager/test/login-affiliation-interstitials-manager.service.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { QaFlagsService } from '../../qa-flag/qa-flag.service'
1313
import { QaFlag } from '../../qa-flag/qa-flags.enum'
1414
import { LoginAffiliationInterstitialManagerService } from '../implementations/login-affiliation-interstitials-manager.service'
1515
import { AffiliationsInterstitialDialogComponent } from 'src/app/cdk/interstitials/affiliations-interstitial/interstitial-dialog-extend/affiliations-interstitial-dialog.component'
16+
import { WINDOW_PROVIDERS } from 'src/app/cdk/window'
1617

1718
describe('LoginAffiliationInterstitialManagerService', () => {
1819
let service: LoginAffiliationInterstitialManagerService
@@ -44,6 +45,7 @@ describe('LoginAffiliationInterstitialManagerService', () => {
4445
{ provide: TogglzService, useValue: mockTogglzService },
4546
{ provide: InterstitialsService, useValue: mockInterstitialsService },
4647
{ provide: QaFlagsService, useValue: mockQaFlagsService },
48+
WINDOW_PROVIDERS,
4749
],
4850
})
4951

src/app/core/login-interstitials-manager/test/login-domain-interstitials-manager.service.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { QaFlag } from '../../qa-flag/qa-flags.enum'
1414
import { TogglzService } from '../../togglz/togglz.service'
1515
import { LoginDomainInterstitialManagerService } from '../implementations/login-domain-interstitials-manager.service'
1616
import { ShareEmailsDomainsDialogComponent } from 'src/app/cdk/interstitials/share-emails-domains/interstitial-dialog-extend/share-emails-domains-dialog.component'
17+
import { inject } from '@angular/core'
18+
import { WINDOW_PROVIDERS } from 'src/app/cdk/window'
1719

1820
describe('LoginDomainInterstitialManagerService', () => {
1921
let service: LoginDomainInterstitialManagerService
@@ -44,6 +46,7 @@ describe('LoginDomainInterstitialManagerService', () => {
4446
{ provide: InterstitialsService, useValue: mockInterstitialsService },
4547
{ provide: TogglzService, useValue: mockTogglzService },
4648
{ provide: QaFlagsService, useValue: mockQaFlagsService },
49+
WINDOW_PROVIDERS,
4750
],
4851
})
4952

src/app/core/qa-flag/qa-flag.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export class QaFlagsService {
1818
// we only do a simple localStorage check.
1919
const value = localStorage.getItem(flag)
2020
if (runtimeEnvironment.debugger && value) {
21-
console.info(`[QAFlag] ⚠️ Caution you have "${flag}" is set to "${value}"`)
21+
console.info(
22+
`[QAFlag] ⚠️ Caution you have "${flag}" is set to "${value}"`
23+
)
2224
}
2325
return value === 'true'
2426
}

src/app/core/record/record.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ export class RecordService {
223223

224224
if (allValuesLoaded) {
225225
if (this.getRecordPerformanceStartTime) {
226-
const executionTime = performance.now() - this.getRecordPerformanceStartTime
226+
const executionTime =
227+
performance.now() - this.getRecordPerformanceStartTime
227228
this.getRecordPerformanceStartTime = undefined
228229
console.info(
229230
'[Record Service] :',

0 commit comments

Comments
 (0)