@lysaab/lysa-pep 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +1 -0
- package/lib/Exports.d.ts +8 -8
- package/lib/Exports.js +8 -8
- package/lib/components/CountrySelect.d.ts +22 -22
- package/lib/components/CountrySelect.js +21 -23
- package/lib/components/PepAnswers.d.ts +8 -8
- package/lib/components/PepAnswers.js +38 -38
- package/lib/components/PepAnswers.scss +7 -7
- package/lib/model/Countries.d.ts +4 -4
- package/lib/model/Countries.js +1002 -1002
- package/lib/model/PepModel.d.ts +7 -7
- package/lib/model/PepModel.js +40 -40
- package/lib/model/PepTexts.d.ts +322 -322
- package/lib/model/PepTexts.js +467 -467
- package/lib/pages/PepContext.d.ts +79 -79
- package/lib/pages/PepContext.js +67 -67
- package/lib/pages/PepIsPepPage.d.ts +6 -6
- package/lib/pages/PepIsPepPage.js +55 -57
- package/lib/pages/PepRelationPage.d.ts +6 -6
- package/lib/pages/PepRelationPage.js +79 -83
- package/lib/pages/PepRolePage.d.ts +10 -9
- package/lib/pages/PepRolePage.js +127 -127
- package/lib/pages/PepStatusPage.d.ts +6 -6
- package/lib/pages/PepStatusPage.js +51 -57
- package/package.json +2 -3
- package/src/components/CountrySelect.tsx +2 -6
- package/src/components/PepAnswers.scss +7 -7
- package/src/components/PepAnswers.tsx +122 -122
- package/src/model/PepTexts.ts +514 -514
- package/src/pages/PepIsPepPage.tsx +12 -14
- package/src/pages/PepRelationPage.tsx +24 -28
- package/src/pages/PepRolePage.tsx +38 -30
- package/src/pages/PepStatusPage.tsx +132 -143
- package/.vscode/settings.json +0 -4
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import React, { FunctionComponent } from "react";
|
|
2
|
-
import "./PepAnswers.scss";
|
|
3
|
-
import { PepRequest } from "../model/PepModel";
|
|
4
|
-
import { countries } from "../model/Countries";
|
|
5
|
-
import { LABELS } from "../model/PepTexts";
|
|
6
|
-
import { roleAlternatives, militaryAlternatives } from "../pages/PepRolePage";
|
|
7
|
-
import { EntityType, PepType } from "../pages/PepContext";
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
answer: PepRequest;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const PepAnswers: FunctionComponent<Props> = ({ answer }) => {
|
|
14
|
-
if (!answer.type || answer.type === PepType.NOT_PEP) {
|
|
15
|
-
return <div>Inte PEP</div>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const labels = LABELS("");
|
|
19
|
-
const country = countries.find(country => country.value === answer.country);
|
|
20
|
-
const role = roleAlternatives.find(alt => alt.value === answer.role);
|
|
21
|
-
const militaryRank = militaryAlternatives.find(
|
|
22
|
-
alt => alt.value === answer.militaryRank
|
|
23
|
-
);
|
|
24
|
-
return (
|
|
25
|
-
<div>
|
|
26
|
-
{answer.type && (
|
|
27
|
-
<StaticInput
|
|
28
|
-
label="Vem är pep"
|
|
29
|
-
value={labels[EntityType.PERSON].GENERIC.IS_PEP[answer.type]}
|
|
30
|
-
/>
|
|
31
|
-
)}
|
|
32
|
-
{answer.relationToPEP && (
|
|
33
|
-
<StaticInput
|
|
34
|
-
label="Relation"
|
|
35
|
-
value={
|
|
36
|
-
labels[EntityType.PERSON][PepType.RELATIVE].RELATION[
|
|
37
|
-
answer.relationToPEP
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
/>
|
|
41
|
-
)}
|
|
42
|
-
{answer.businessRelation && (
|
|
43
|
-
<StaticInput
|
|
44
|
-
label="Relation"
|
|
45
|
-
value={
|
|
46
|
-
labels[EntityType.PERSON][PepType.COLLEAGUE].BUSINESS_RELATION[
|
|
47
|
-
answer.businessRelation
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
/>
|
|
51
|
-
)}
|
|
52
|
-
{answer.nameOfPEP && (
|
|
53
|
-
<StaticInput label="Namn på personen" value={answer.nameOfPEP} />
|
|
54
|
-
)}
|
|
55
|
-
{answer.birthdayOfPEP && (
|
|
56
|
-
<StaticInput
|
|
57
|
-
label="Födelsedag för personen"
|
|
58
|
-
value={answer.birthdayOfPEP}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
61
|
-
{answer.ended ? (
|
|
62
|
-
<React.Fragment>
|
|
63
|
-
<StaticInput label="Status" value="Avslutad" />
|
|
64
|
-
<StaticInput label="Avslutades" value={answer.ended} />
|
|
65
|
-
</React.Fragment>
|
|
66
|
-
) : (
|
|
67
|
-
<StaticInput label="Status" value="Pågående" />
|
|
68
|
-
)}
|
|
69
|
-
{answer.birthdayOfPEP && (
|
|
70
|
-
<StaticInput label="Roll" value={answer.birthdayOfPEP} />
|
|
71
|
-
)}
|
|
72
|
-
{answer.country && (
|
|
73
|
-
<StaticInput
|
|
74
|
-
label="Land"
|
|
75
|
-
value={country ? country.label : answer.country}
|
|
76
|
-
/>
|
|
77
|
-
)}
|
|
78
|
-
{role && <StaticInput label="Roll" value={role.text} />}
|
|
79
|
-
{answer.ambassadorCountry && (
|
|
80
|
-
<StaticInput label="Ambassadörsland" value={answer.ambassadorCountry} />
|
|
81
|
-
)}
|
|
82
|
-
{answer.governmentCompany && (
|
|
83
|
-
<StaticInput label="Företagets namn" value={answer.governmentCompany} />
|
|
84
|
-
)}
|
|
85
|
-
{answer.governmentCompanyRole && (
|
|
86
|
-
<StaticInput
|
|
87
|
-
label="Roll på företaget"
|
|
88
|
-
value={answer.governmentCompanyRole}
|
|
89
|
-
/>
|
|
90
|
-
)}
|
|
91
|
-
{answer.internationalOrganisation && (
|
|
92
|
-
<StaticInput
|
|
93
|
-
label="Organisationens namn"
|
|
94
|
-
value={answer.internationalOrganisation}
|
|
95
|
-
/>
|
|
96
|
-
)}
|
|
97
|
-
{answer.internationalOrganisationRole && (
|
|
98
|
-
<StaticInput
|
|
99
|
-
label="Roll i organisationen"
|
|
100
|
-
value={answer.internationalOrganisationRole}
|
|
101
|
-
/>
|
|
102
|
-
)}
|
|
103
|
-
{militaryRank && (
|
|
104
|
-
<StaticInput label="Militär grad" value={militaryRank.value} />
|
|
105
|
-
)}
|
|
106
|
-
</div>
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
interface StaticInputProps {
|
|
111
|
-
label: string;
|
|
112
|
-
value: string | React.ReactNode;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const StaticInput: FunctionComponent<StaticInputProps> = ({ label, value }) => {
|
|
116
|
-
return (
|
|
117
|
-
<div className="static-input">
|
|
118
|
-
<div className="label">{label}</div>
|
|
119
|
-
<div className="value">{value}</div>
|
|
120
|
-
</div>
|
|
121
|
-
);
|
|
122
|
-
};
|
|
1
|
+
import React, { FunctionComponent } from "react";
|
|
2
|
+
import "./PepAnswers.scss";
|
|
3
|
+
import { PepRequest } from "../model/PepModel";
|
|
4
|
+
import { countries } from "../model/Countries";
|
|
5
|
+
import { LABELS } from "../model/PepTexts";
|
|
6
|
+
import { roleAlternatives, militaryAlternatives } from "../pages/PepRolePage";
|
|
7
|
+
import { EntityType, PepType } from "../pages/PepContext";
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
answer: PepRequest;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const PepAnswers: FunctionComponent<Props> = ({ answer }) => {
|
|
14
|
+
if (!answer.type || answer.type === PepType.NOT_PEP) {
|
|
15
|
+
return <div>Inte PEP</div>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const labels = LABELS("");
|
|
19
|
+
const country = countries.find(country => country.value === answer.country);
|
|
20
|
+
const role = roleAlternatives.find(alt => alt.value === answer.role);
|
|
21
|
+
const militaryRank = militaryAlternatives.find(
|
|
22
|
+
alt => alt.value === answer.militaryRank
|
|
23
|
+
);
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
{answer.type && (
|
|
27
|
+
<StaticInput
|
|
28
|
+
label="Vem är pep"
|
|
29
|
+
value={labels[EntityType.PERSON].GENERIC.IS_PEP[answer.type]}
|
|
30
|
+
/>
|
|
31
|
+
)}
|
|
32
|
+
{answer.relationToPEP && (
|
|
33
|
+
<StaticInput
|
|
34
|
+
label="Relation"
|
|
35
|
+
value={
|
|
36
|
+
labels[EntityType.PERSON][PepType.RELATIVE].RELATION[
|
|
37
|
+
answer.relationToPEP
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
{answer.businessRelation && (
|
|
43
|
+
<StaticInput
|
|
44
|
+
label="Relation"
|
|
45
|
+
value={
|
|
46
|
+
labels[EntityType.PERSON][PepType.COLLEAGUE].BUSINESS_RELATION[
|
|
47
|
+
answer.businessRelation
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
{answer.nameOfPEP && (
|
|
53
|
+
<StaticInput label="Namn på personen" value={answer.nameOfPEP} />
|
|
54
|
+
)}
|
|
55
|
+
{answer.birthdayOfPEP && (
|
|
56
|
+
<StaticInput
|
|
57
|
+
label="Födelsedag för personen"
|
|
58
|
+
value={answer.birthdayOfPEP}
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
61
|
+
{answer.ended ? (
|
|
62
|
+
<React.Fragment>
|
|
63
|
+
<StaticInput label="Status" value="Avslutad" />
|
|
64
|
+
<StaticInput label="Avslutades" value={answer.ended} />
|
|
65
|
+
</React.Fragment>
|
|
66
|
+
) : (
|
|
67
|
+
<StaticInput label="Status" value="Pågående" />
|
|
68
|
+
)}
|
|
69
|
+
{answer.birthdayOfPEP && (
|
|
70
|
+
<StaticInput label="Roll" value={answer.birthdayOfPEP} />
|
|
71
|
+
)}
|
|
72
|
+
{answer.country && (
|
|
73
|
+
<StaticInput
|
|
74
|
+
label="Land"
|
|
75
|
+
value={country ? country.label : answer.country}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
{role && <StaticInput label="Roll" value={role.text} />}
|
|
79
|
+
{answer.ambassadorCountry && (
|
|
80
|
+
<StaticInput label="Ambassadörsland" value={answer.ambassadorCountry} />
|
|
81
|
+
)}
|
|
82
|
+
{answer.governmentCompany && (
|
|
83
|
+
<StaticInput label="Företagets namn" value={answer.governmentCompany} />
|
|
84
|
+
)}
|
|
85
|
+
{answer.governmentCompanyRole && (
|
|
86
|
+
<StaticInput
|
|
87
|
+
label="Roll på företaget"
|
|
88
|
+
value={answer.governmentCompanyRole}
|
|
89
|
+
/>
|
|
90
|
+
)}
|
|
91
|
+
{answer.internationalOrganisation && (
|
|
92
|
+
<StaticInput
|
|
93
|
+
label="Organisationens namn"
|
|
94
|
+
value={answer.internationalOrganisation}
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
{answer.internationalOrganisationRole && (
|
|
98
|
+
<StaticInput
|
|
99
|
+
label="Roll i organisationen"
|
|
100
|
+
value={answer.internationalOrganisationRole}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
103
|
+
{militaryRank && (
|
|
104
|
+
<StaticInput label="Militär grad" value={militaryRank.value} />
|
|
105
|
+
)}
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
interface StaticInputProps {
|
|
111
|
+
label: string;
|
|
112
|
+
value: string | React.ReactNode;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const StaticInput: FunctionComponent<StaticInputProps> = ({ label, value }) => {
|
|
116
|
+
return (
|
|
117
|
+
<div className="static-input">
|
|
118
|
+
<div className="label">{label}</div>
|
|
119
|
+
<div className="value">{value}</div>
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
};
|