-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathaffiliations-interstitial-dialog.component.ts
More file actions
96 lines (90 loc) · 2.98 KB
/
Copy pathaffiliations-interstitial-dialog.component.ts
File metadata and controls
96 lines (90 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import {
Component,
EventEmitter,
HostBinding,
Inject,
Input,
Output,
} from '@angular/core'
import { AssertionVisibilityString, EmailsEndpoint } from 'src/app/types'
import {
FormBuilder,
FormControl,
FormGroup,
UntypedFormBuilder,
} from '@angular/forms'
import { RecordEmailsService } from 'src/app/core/record-emails/record-emails.service'
import { error } from 'console'
import {
MAT_LEGACY_DIALOG_DATA,
MatLegacyDialogRef,
MatLegacyDialogState,
} from '@angular/material/legacy-dialog'
import { OrganizationsService, UserService } from 'src/app/core'
import { RecordService } from 'src/app/core/record/record.service'
import { RecordAffiliationService } from 'src/app/core/record-affiliations/record-affiliations.service'
import { RegisterService } from 'src/app/core/register/register.service'
import {
BaseInterstitialDialogInput,
BaseInterstitialDialogOutput,
} from 'src/app/core/login-interstitials-manager/abstractions/dialog-interface'
import { PlatformInfoService } from 'src/app/cdk/platform-info/platform-info.service'
import { WINDOW } from 'src/app/cdk/window'
import { AffiliationsInterstitialComponent } from '../interstitial-component/affiliations-interstitial.component'
import { Affiliation } from 'src/app/types/record-affiliation.endpoint'
export interface AffilationsComponentDialogInput
extends BaseInterstitialDialogInput {
type: 'affiliation-interstitial'
}
export interface AffilationsComponentDialogOutput
extends BaseInterstitialDialogOutput {
type: 'affiliation-interstitial'
addedAffiliation?: Affiliation
}
@Component({
templateUrl:
'../interstitial-component/affiliations-interstitial.component.html',
styleUrls: [
'./affiliations-interstitial-dialog.component.scss',
'../interstitial-component/affiliations-interstitial.component.scss',
'../interstitial-component/affiliations-interstitial.component.scss-theme.scss',
],
})
export class AffiliationsInterstitialDialogComponent extends AffiliationsInterstitialComponent {
@HostBinding('class.columns-12') desktop: boolean = false
organizationFromDatabase: any
constructor(
@Inject(WINDOW) window: Window,
platformService: PlatformInfoService,
recordAffiliationService: RecordAffiliationService,
formBuilder: UntypedFormBuilder,
recordService: RecordService,
organizationService: OrganizationsService,
registerService: RegisterService,
private dialogRef: MatLegacyDialogRef<
AffiliationsInterstitialDialogComponent,
AffilationsComponentDialogOutput
>,
user: UserService
) {
super(
window,
platformService,
recordAffiliationService,
formBuilder,
recordService,
organizationService,
registerService,
user
)
}
override afterSummit(affiliation?: Affiliation) {
this.finishIntertsitial(affiliation)
}
override finishIntertsitial(affiliation?: Affiliation) {
this.dialogRef.close({
type: 'affiliation-interstitial',
addedAffiliation: affiliation,
})
}
}