/
attribution-tab-view.component.ts
82 lines (77 loc) · 3.25 KB
/
attribution-tab-view.component.ts
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
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-attribution-tab-view',
templateUrl: './attribution-tab-view.component.html',
styleUrls: ['./attribution-tab-view.component.scss']
})
export class AttributionTabViewComponent implements OnInit{
// attribution input
@Input() attribution: object;
// hard-coded data to complete the functionality
people = [{
'address': {'addressLocality': 'Basel', 'postalCode': '4000', 'streetAddress': 'Teststrasse'},
'email': 'benjamin.jones@test.ch',
'familyName': 'Jones',
'givenName': 'Benjamin',
'jobTitle': 'Dr. des.',
'organisation': {
'address': {'addressLocality': 'Toronto', 'postalCode': '40000', 'streetAddress': 'University of Toronto Street'},
'email': 'info@universityoftoronto.ca',
'name': 'University of Toronto',
'url': 'http://www.utoronto.ca/'
}
}, {
'address': {'addressLocality': 'Basel', 'postalCode': '4000', 'streetAddress': 'Teststrasse'},
'email': 'james.coleman@dasch.swiss',
'familyName': 'Coleman',
'givenName': 'James',
'jobTitle': 'Dr. des.',
'organisation': {
'address': {'addressLocality': 'Toronto', 'postalCode': '40000', 'streetAddress': 'University of Toronto Street'},
'email': 'info@universityoftoronto.ca',
'name': 'University of Toronto',
}
}, {
'address': {'addressLocality': 'Basel', 'postalCode': '4000', 'streetAddress': 'Teststrasse'},
'email': 'lauren.berry@unibas.ch',
'familyName': 'Berry',
'givenName': 'Lauren',
'jobTitle': 'Dr.',
'organisation': {
'address': {'addressLocality': 'Toronto', 'postalCode': '40000', 'streetAddress': 'University of Toronto Street'},
'email': 'info@universityoftoronto.ca',
'name': 'University of Toronto',
}
}, {
'address': {'addressLocality': 'Basel', 'postalCode': '4000', 'streetAddress': 'Teststrasse'},
'email': 'leonhard.hart@test.ch',
'familyName': 'Hart',
'givenName': 'Leonhard',
'jobTitle': 'Prof.',
'organisation': {
'address': {'addressLocality': 'Toronto', 'postalCode': '40000', 'streetAddress': 'University of Toronto Street'},
'email': 'info@universityoftoronto.ca',
'name': 'University of Toronto',
}
},{
'address': {'addressLocality': 'Basel', 'postalCode': '4000', 'streetAddress': 'Teststrasse'},
'email': 'lauren.berry@unibas.ch',
'familyName': 'Berry',
'givenName': 'Lauren',
'jobTitle': 'Dr.',
'organisation': {
'address': {'addressLocality': 'Toronto', 'postalCode': '40000', 'streetAddress': 'University of Toronto Street'},
'email': 'info@universityoftoronto.ca',
'name': 'University of Toronto',
'url': 'http://www.utoronto.ca/'
}
}];
ngOnInit(): void {
// reformat data
for (let idx = 0; idx < this.people.length; idx++) {
if (this.people[idx]['sameAs']) {
this.people[idx]['sameAs'] = this.people[idx]['sameAs']['value'];
}
}
}
}