@lysaab/lysa-pep 6.1.1 → 7.0.0
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/README.md +7 -0
- package/lib/README.md +51 -0
- package/lib/package.json +73 -0
- package/{pages → lib/pages}/IsPep/IsPepPage.js +2 -3
- package/{pages → lib/pages}/PepContext.d.ts +3 -3
- package/{pages → lib/pages}/RelationPage/RelationPage.js +2 -3
- package/{pages → lib/pages}/RolePage/RolePage.js +2 -3
- package/{pages → lib/pages}/StatusPage/StatusPage.js +2 -3
- package/package.json +20 -21
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +2 -0
- package/src/App.scss +5 -0
- package/src/App.test.tsx +9 -0
- package/src/App.tsx +17 -0
- package/src/Exports.ts +12 -0
- package/src/components/PepAnswers.scss +7 -0
- package/src/components/PepAnswers.tsx +218 -0
- package/src/demo/Done.tsx +21 -0
- package/src/demo/Localization.tsx +66 -0
- package/src/demo/LocalizationContext.tsx +61 -0
- package/src/demo/Pep.tsx +172 -0
- package/src/index.css +13 -0
- package/src/index.tsx +13 -0
- package/src/locales/da.json +98 -0
- package/src/locales/de.json +98 -0
- package/src/locales/defaultMessages.json +335 -0
- package/src/locales/en.json +98 -0
- package/src/locales/fi.json +98 -0
- package/src/locales/sv.json +98 -0
- package/src/locales/whitelist_da.json +2 -0
- package/src/locales/whitelist_en.json +2 -0
- package/src/locales/whitelist_fi.json +2 -0
- package/src/locales/whitelist_sv.json +2 -0
- package/src/logo.svg +1 -0
- package/src/model/PepModel.ts +54 -0
- package/src/pages/IsPep/IsPepMessages.ts +11 -0
- package/src/pages/IsPep/IsPepPage.tsx +119 -0
- package/src/pages/PepContext.tsx +150 -0
- package/src/pages/RelationPage/RelationMessages.ts +74 -0
- package/src/pages/RelationPage/RelationPage.tsx +306 -0
- package/src/pages/RolePage/RoleMessages.ts +128 -0
- package/src/pages/RolePage/RolePage.tsx +359 -0
- package/src/pages/StatusPage/StatusMessages.ts +59 -0
- package/src/pages/StatusPage/StatusPage.tsx +237 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/serviceWorker.ts +143 -0
- package/src/utils/Possession.ts +41 -0
- package/translationRunner.js +7 -0
- package/tsconfig.json +26 -0
- package/tsconfig_build.json +19 -0
- /package/{Exports.d.ts → lib/Exports.d.ts} +0 -0
- /package/{Exports.js → lib/Exports.js} +0 -0
- /package/{components → lib/components}/PepAnswers.d.ts +0 -0
- /package/{components → lib/components}/PepAnswers.js +0 -0
- /package/{components → lib/components}/PepAnswers.scss +0 -0
- /package/{messages → lib/messages}/src/components/PepAnswers.json +0 -0
- /package/{messages → lib/messages}/src/pages/IsPep/IsPepMessages.json +0 -0
- /package/{messages → lib/messages}/src/pages/IsPep/IsPepPage.json +0 -0
- /package/{messages → lib/messages}/src/pages/RelationPage/RelationMessages.json +0 -0
- /package/{messages → lib/messages}/src/pages/RelationPage/RelationPage.json +0 -0
- /package/{messages → lib/messages}/src/pages/RolePage/RoleMessages.json +0 -0
- /package/{messages → lib/messages}/src/pages/RolePage/RolePage.json +0 -0
- /package/{messages → lib/messages}/src/pages/StatusPage/StatusMessages.json +0 -0
- /package/{messages → lib/messages}/src/pages/StatusPage/StatusPage.json +0 -0
- /package/{model → lib/model}/PepModel.d.ts +0 -0
- /package/{model → lib/model}/PepModel.js +0 -0
- /package/{pages → lib/pages}/IsPep/IsPepMessages.d.ts +0 -0
- /package/{pages → lib/pages}/IsPep/IsPepMessages.js +0 -0
- /package/{pages → lib/pages}/IsPep/IsPepPage.d.ts +0 -0
- /package/{pages → lib/pages}/PepContext.js +0 -0
- /package/{pages → lib/pages}/RelationPage/RelationMessages.d.ts +0 -0
- /package/{pages → lib/pages}/RelationPage/RelationMessages.js +0 -0
- /package/{pages → lib/pages}/RelationPage/RelationPage.d.ts +0 -0
- /package/{pages → lib/pages}/RolePage/RoleMessages.d.ts +0 -0
- /package/{pages → lib/pages}/RolePage/RoleMessages.js +0 -0
- /package/{pages → lib/pages}/RolePage/RolePage.d.ts +0 -0
- /package/{pages → lib/pages}/StatusPage/StatusMessages.d.ts +0 -0
- /package/{pages → lib/pages}/StatusPage/StatusMessages.js +0 -0
- /package/{pages → lib/pages}/StatusPage/StatusPage.d.ts +0 -0
- /package/{utils → lib/utils}/Possession.d.ts +0 -0
- /package/{utils → lib/utils}/Possession.js +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pep.answers.ambassadorCountry.label": "Ambassadörsland",
|
|
3
|
+
"pep.answers.birthdayOfPEP.label": "Födelsedag för personen",
|
|
4
|
+
"pep.answers.businessRelationship.label": "Vem är pep?",
|
|
5
|
+
"pep.answers.companyName.label": "Organisationens namn",
|
|
6
|
+
"pep.answers.companyRole.label": "Roll i organisationen",
|
|
7
|
+
"pep.answers.country.label": "Land",
|
|
8
|
+
"pep.answers.endedStatus.label": "Avslutades",
|
|
9
|
+
"pep.answers.governmentCompanyName.label": "Företags namn",
|
|
10
|
+
"pep.answers.governmentCompanyRole.label": "Roll på företaget",
|
|
11
|
+
"pep.answers.militaryRank.label": "Roll i organisationen",
|
|
12
|
+
"pep.answers.nameOfPep.label": "Namn på personen",
|
|
13
|
+
"pep.answers.notpep": "Personen är inte PEP",
|
|
14
|
+
"pep.answers.relationship.label": "Relation",
|
|
15
|
+
"pep.answers.role.label": "Roll",
|
|
16
|
+
"pep.answers.status.label": "Status",
|
|
17
|
+
"pep.answers.statusEnded.value": "Avslutad",
|
|
18
|
+
"pep.answers.statusOngoing.value": "Pågående",
|
|
19
|
+
"pep.answers.who.label": "Vem är pep",
|
|
20
|
+
"pep.ispep.COLLEAGUE": "{ \n entityType, select,\n PERSON {\n Jag är medarbetare till, eller har en affärsrelation med, en person som är PEP\n }\n CORPORATION {\n {name} är medarbetare till, eller har en affärsrelation med, en person som är PEP\n }\n other {}\n }",
|
|
21
|
+
"pep.ispep.ME": "{ \n entityType, select,\n PERSON {\n Jag har en funktion som gör mig till PEP\n }\n CORPORATION {\n På grund av sin funktion är {name} PEP\n }\n other {}\n }",
|
|
22
|
+
"pep.ispep.NOT_PEP": "Nej",
|
|
23
|
+
"pep.ispep.RELATIVE": "{ \n entityType, select,\n PERSON {\n Jag har en relation med en person som är PEP\n }\n CORPORATION {\n {name} har en relation med en person som är PEP\n }\n other {}\n }",
|
|
24
|
+
"pep.ispep.header": "{ \n entityType, select,\n PERSON {\n Är du eller en närstående till dig en person i politisk utsatt ställning (PEP)?\n }\n CORPORATION {\n Är {name} eller en närstående till {name} en person i politisk utsatt ställning (PEP)?\n }\n other {}\n }",
|
|
25
|
+
"pep.ispep.next": "Gå vidare",
|
|
26
|
+
"pep.ispep.required": "Du måste välja ett alternativ",
|
|
27
|
+
"pep.relation.birthday.header": "{ \n entityType, select,\n PERSON {\n {\n relation, select, \n MARRIED_PARTNER { \n När är din make/maka född? \n } \n COLIVING_PARTNER { \n När är din sambo född? \n } \n CHILD { \n När är din förälder född? \n } \n PARENT { \n När är ditt barn fött? \n } \n CHILD_MARRIED_PARTNER { \n När är föräldern till din make/maka född? \n } \n CHILD_COLIVING_PARTNER { \n När är föräldern till din sambo född? \n }\n other {}\n }\n }\n CORPORATION {\n {\n relation, select, \n MARRIED_PARTNER {\n När är {possessiveName} make/maka född?\n }\n COLIVING_PARTNER {\n När är {possessiveName} sambo född?\n }\n CHILD {\n När är {possessiveName} förälder född?\n }\n PARENT {\n När är {possessiveName} barn fött?\n }\n CHILD_MARRIED_PARTNER {\n När är föräldern till {possessiveName} make/maka född?\n }\n CHILD_COLIVING_PARTNER {\n När är föräldern till {possessiveName} sambo född?\n }\n other {}\n }\n }\n other {}\n }",
|
|
28
|
+
"pep.relation.birthday.required": "Ange datum",
|
|
29
|
+
"pep.relation.businessrelation.alt.CLOSE_CONNECTION": "{ \n entityType, select,\n PERSON {\n Jag är en person som på annat sätt har eller har haft nära förbindelser med en PEP\n }\n CORPORATION {\n {name} är en person som på annat sätt har eller har haft nära förbindelser med en PEP \n }\n other {}\n }",
|
|
30
|
+
"pep.relation.businessrelation.alt.COMPANY_FOR_PEP": "{ \n entityType, select,\n PERSON {\n Jag är verklig huvudman till en juridisk person eller konstruktion som har upprättats till förmån för en PEP\n }\n CORPORATION {\n {name} är ensam verklig huvudman till en juridisk person eller konstruktion som har upprättats till förmån för en PEP\n }\n other {}\n }",
|
|
31
|
+
"pep.relation.businessrelation.alt.CO_OWNERSHIP": "{ \n entityType, select,\n PERSON {\n Jag är verklig huvudman till en juridisk person, eller juridiska konstruktioner, tillsammans med en PEP\n }\n CORPORATION {\n {name} är verklig huvudman till en juridisk person, eller juridiska konstruktioner, tillsammans med en PEP\n }\n other {}\n }",
|
|
32
|
+
"pep.relation.businessrelation.header": "{ \n entityType, select,\n PERSON {\n Vilken relation har du till personen i politisk utsatt ställning?\n }\n CORPORATION {\n Vilken relation har {name} till personen i politisk utsatt ställning?\n }\n other {}\n }",
|
|
33
|
+
"pep.relation.businessrelation.required": "Du måste välja ett alternativ",
|
|
34
|
+
"pep.relation.colleague.name.header": "{ \n entityType, select,\n PERSON {\n { \n relation, select, \n CO_OWNERSHIP { \n Vad heter personen i politisk utsatt ställning som du har en relation till?\n }\n CLOSE_CONNECTION { \n Vad heter personen i politisk utsatt ställning som du har en relation till?\n }\n COMPANY_FOR_PEP { \n Vad heter personen i politisk utsatt ställning som den juridiska personen eller konstruktionen har upprättats till förmån till?\n }\n other {}\n }\n }\n CORPORATION {\n {\n relation, select,\n CO_OWNERSHIP { \n Vad heter personen i politisk utsatt ställning som {name} har en relation till?\n }\n CLOSE_CONNECTION { \n Vad heter personen i politisk utsatt ställning som {name} har en relation till?\n }\n COMPANY_FOR_PEP { \n Vad heter personen i politisk utsatt ställning som den juridiska personen eller konstruktionen har upprättats till förmån till?\n }\n other {}\n }\n }\n other {}\n }",
|
|
35
|
+
"pep.relation.colleague.name.required": "Du måste välja ett alternativ",
|
|
36
|
+
"pep.relation.next": "Gå vidare",
|
|
37
|
+
"pep.relation.relation.CHILD": "Barn till PEP",
|
|
38
|
+
"pep.relation.relation.CHILD_COLIVING_PARTNER": "Sambo till barn till PEP",
|
|
39
|
+
"pep.relation.relation.CHILD_MARRIED_PARTNER": "Make/Maka till barn till PEP",
|
|
40
|
+
"pep.relation.relation.COLIVING_PARTNER": "Sambo till PEP",
|
|
41
|
+
"pep.relation.relation.MARRIED_PARTNER": "Make/Maka till PEP",
|
|
42
|
+
"pep.relation.relation.PARENT": "Förälder till PEP",
|
|
43
|
+
"pep.relation.relation.required": "Du måste välja ett alternativ",
|
|
44
|
+
"pep.relation.relationship.header": "{ \n entityType, select,\n PERSON {\n Vilken relation har du till personen i politiskt utsatt ställning?\n }\n CORPORATION {\n Vilken relation har {name} till personen i politiskt utsatt ställning?\n }\n other {}\n }",
|
|
45
|
+
"pep.relation.relative.name.header": "{ \n entityType, select,\n PERSON {\n {\n relation, select, \n MARRIED_PARTNER {\n Vad heter din make/maka?\n }\n COLIVING_PARTNER {\n Vad heter din sambo?\n }\n CHILD {\n Vad heter din förälder?\n }\n PARENT {\n Vad heter ditt barn?\n }\n CHILD_MARRIED_PARTNER {\n Vad heter föräldern till din make/maka?\n }\n CHILD_COLIVING_PARTNER {\n Vad heter föräldern till din sambo?\n }\n other {}\n }\n }\n CORPORATION {\n {\n relation, select, \n MARRIED_PARTNER {\n Vad heter {possessiveName} make/maka?\n }\n COLIVING_PARTNER {\n Vad heter {possessiveName} sambo?\n }\n CHILD {\n Vad heter {possessiveName} förälder?\n }\n PARENT {\n Vad heter {possessiveName} barn?\n }\n CHILD_MARRIED_PARTNER {\n Vad heter föräldern till {possessiveName} make/maka?\n }\n CHILD_COLIVING_PARTNER {\n Vad heter föräldern till {possessiveName} sambo?\n }\n other {}\n }\n }\n other {}\n }",
|
|
46
|
+
"pep.relation.relative.name.required": "Du måste välja ett alternativ",
|
|
47
|
+
"pep.role.ambassador.header": "Ange land",
|
|
48
|
+
"pep.role.ambassador.placeholder": "Välj ett land",
|
|
49
|
+
"pep.role.ambassador.required": "Du måste välja land",
|
|
50
|
+
"pep.role.governmentCompany.name.header": "Ange namnet på företaget",
|
|
51
|
+
"pep.role.governmentCompany.name.required": "Du måste ange ett namn",
|
|
52
|
+
"pep.role.governmentCompany.role.header": "Ange tjänst/roll",
|
|
53
|
+
"pep.role.governmentCompany.role.required": "Du måste ange roll",
|
|
54
|
+
"pep.role.intCompany.name.header": "Ange organisationens namn",
|
|
55
|
+
"pep.role.intCompany.name.required": "Du måste ange ett namn",
|
|
56
|
+
"pep.role.intCompany.role.header": "Ange tjänst/roll",
|
|
57
|
+
"pep.role.intCompany.role.required": "Du måste ange roll",
|
|
58
|
+
"pep.role.military.alt.ADMIRAL": "Amiral",
|
|
59
|
+
"pep.role.military.alt.GENERAL": "General",
|
|
60
|
+
"pep.role.military.alt.LIEUTENANT_GENERAL": "Generallöjtnant",
|
|
61
|
+
"pep.role.military.alt.MAJOR_GENERAL": "Generalmajor",
|
|
62
|
+
"pep.role.military.alt.REAR_ADMIRAL": "Konteramiral",
|
|
63
|
+
"pep.role.military.alt.VICE_ADMIRAL": "Viceamiral",
|
|
64
|
+
"pep.role.military.header": "Välj en roll",
|
|
65
|
+
"pep.role.military.name.header": "{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n Ange din grad\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Ange din makes/makas grad\n }\n COLIVING_PARTNER { \n Ange din sambos grad\n }\n CHILD { \n Ange din förälders grad\n }\n PARENT { \n Ange ditt barns grad\n }\n CHILD_MARRIED_PARTNER { \n Ange din make/makas förälders grad\n }\n CHILD_COLIVING_PARTNER { \n Ange din sambos förälders grad\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Vilken grad har personen?\n }\n CLOSE_CONNECTION { \n Vilken grad har personen?\n }\n COMPANY_FOR_PEP { \n Vilken grad har personen?\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n Ange {possessiveName} grad\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Ange {possessiveName} makes/makas grad\n }\n COLIVING_PARTNER { \n Ange {possessiveName} sambos grad\n }\n CHILD { \n Ange {possessiveName} förälders grad\n }\n PARENT { \n Ange {possessiveName} barns grad\n }\n CHILD_MARRIED_PARTNER { \n Ange {possessiveName} make/makas förälders grad\n }\n CHILD_COLIVING_PARTNER { \n Ange {possessiveName} sambos grad\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Ange grad för personen i politisk utsatt ställning som {name} har en relation till\n }\n CLOSE_CONNECTION { \n Ange grad för personen som {name} har eller har haft nära förbindelse\n }\n COMPANY_FOR_PEP { \n Vilken grad har personen\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }",
|
|
66
|
+
"pep.role.military.required": "Du måste välja roll",
|
|
67
|
+
"pep.role.next": "Gå vidare",
|
|
68
|
+
"pep.role.roles.alt.AMBASSADOR": "Ambassadör eller bestickningschef",
|
|
69
|
+
"pep.role.roles.alt.BOARD_MEMBER_POLITICAL_PARTY": "Ledamot för styrelsen i politiskt parti representerade i riksdagen",
|
|
70
|
+
"pep.role.roles.alt.CENTRAL_BANK_MEMBER": "Ledamot i centralbanks styrande organ",
|
|
71
|
+
"pep.role.roles.alt.EU_HIGH_RANKING_POSITION": "EU-parlamentariker",
|
|
72
|
+
"pep.role.roles.alt.GOVERNMENT_COMPANY": "Person som ingår i statsägt företags förvaltnings-, lednings eller kontrollorgan",
|
|
73
|
+
"pep.role.roles.alt.HEAD_OF_GOVERNMENT": "Stats eller regeringschef",
|
|
74
|
+
"pep.role.roles.alt.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP": "Befattning på hög nivå i en internationell organisation",
|
|
75
|
+
"pep.role.roles.alt.JUDGE_OTHER_HIGH_COURT": "Domare i konstitutionell domstol eller annat rättsligt organ på hög nivå vars beslut endast undantagsvis kan överklagas",
|
|
76
|
+
"pep.role.roles.alt.JUDGE_SUPREME_COURT": "Domare i högsta domstolen",
|
|
77
|
+
"pep.role.roles.alt.MILITARY_OFFICER": "Högre officer i försvarsmakt",
|
|
78
|
+
"pep.role.roles.alt.MINISTER": "Minister eller Vice/Biträdande minister",
|
|
79
|
+
"pep.role.roles.alt.PARLIMENT_MEMBER": "Ledamot i parlament eller riksdag",
|
|
80
|
+
"pep.role.roles.alt.REVISION_INSTITUTE": "Högre tjänsteman vid revisionsmyndighet",
|
|
81
|
+
"pep.role.roles.header": "{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n Ange din roll\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Ange tjänst/roll för din make/maka\n }\n COLIVING_PARTNER { \n Ange tjänst/roll för din sambo\n }\n CHILD { \n Ange tjänst/roll för din förälder\n }\n PARENT { \n Ange tjänst/roll för din barn\n }\n CHILD_MARRIED_PARTNER { \n Ange tjänst/roll för föräldern till din make/maka\n }\n CHILD_COLIVING_PARTNER { \n Ange tjänst/roll för föräldern till din sambo\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Ange tjänst/roll för personen i politisk utsatt ställning som du har en relation till\n }\n CLOSE_CONNECTION { \n Ange tjänst/roll för personen i politisk utsatt ställning som du har en relation till\n }\n COMPANY_FOR_PEP { \n Ange tjänst/roll för personen i politisk utsatt ställning som du har en relation till\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n Ange {possessiveName} roll\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Ange tjänst/roll för {possessiveName} make/maka\n }\n COLIVING_PARTNER { \n Ange tjänst/roll för {possessiveName} sambo\n }\n CHILD { \n Ange tjänst/roll för {possessiveName} förälder\n }\n PARENT { \n Ange tjänst/roll för {possessiveName} barn\n }\n CHILD_MARRIED_PARTNER { \n Ange tjänst/roll för föräldern till {possessiveName} make/maka\n }\n CHILD_COLIVING_PARTNER { \n Ange tjänst/roll för föräldern till {possessiveName} sambo\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Ange tjänst/roll för personen i politisk utsatt ställning som {name} har en relation till\n }\n CLOSE_CONNECTION { \n Ange tjänst/roll för personen i politisk utsatt ställning som {name} har en relation till\n }\n COMPANY_FOR_PEP { \n Ange tjänst/roll för personen i politisk utsatt ställning som {name} har en relation till\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }",
|
|
82
|
+
"pep.role.roles.placeholder": "Välj en roll",
|
|
83
|
+
"pep.role.roles.required": "Du måste välja roll",
|
|
84
|
+
"pep.status.countryselection.placeholder": "Välj ett land",
|
|
85
|
+
"pep.status.countryselecton.header": "{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n Välj i vilket land befattningen är/var\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Välj i vilket land din makes/makas befattning är/var\n }\n COLIVING_PARTNER { \n Välj i vilket land din sambos befattning är/var\n }\n CHILD { \n Välj i vilket land din förälders befattning är/var\n }\n PARENT { \n Välj i vilket land ditt barns befattning är/var\n }\n CHILD_MARRIED_PARTNER { \n Välj i vilket land din makes/makas förälders befattning är/var\n }\n CHILD_COLIVING_PARTNER { \n Välj i vilket land din sambos förälders befattning är/var\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n I vilket land har/hade personen som har bestämmande rätt över företaget som du har en relation till sin befattning?\n }\n CLOSE_CONNECTION { \n I vilket land har/hade personen som du har eller har haft nära förbindelse med sin befattning?\n }\n COMPANY_FOR_PEP { \n I vilket land har/hade personen i politisk utsatt ställning som du har en relation till sin befattning?\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n I vilket land är/var {possessiveName} befattning?\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n I vilket land är/var {possessiveName} makes/makas befattning?\n }\n COLIVING_PARTNER { \n I vilket land är/var {possessiveName} sambos befattning?\n }\n CHILD { \n I vilket land är/var {possessiveName} förälders befattning?\n }\n PARENT { \n I vilket land är/var {possessiveName} barns befattning?\n }\n CHILD_MARRIED_PARTNER { \n I vilket land är/var {possessiveName} make/makas förälders befattning?\n }\n CHILD_COLIVING_PARTNER { \n I vilket land är/var {possessiveName} sambos förälders befattning?\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n I vilket land har/hade personen som har bestämmande rätt över företaget som {name} har en relation till sin befattning?\n }\n CLOSE_CONNECTION { \n I vilket land har/hade personen som {name} har eller har haft nära förbindelse med sin befattning?\n }\n COMPANY_FOR_PEP { \n I vilket land har/hade personen i politisk utsatt ställning som {name} har en relation till sin befattning?\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }",
|
|
86
|
+
"pep.status.countryselecton.required": "Du måste välja ett land",
|
|
87
|
+
"pep.status.ended.header": "När avslutades uppdraget?",
|
|
88
|
+
"pep.status.ended.required": "Du måste ange ett slutdatum",
|
|
89
|
+
"pep.status.isongoing.header": "{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n Är din befattning pågående eller avslutad?\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Är din makes/makas befattning pågående eller avslutad?\n }\n COLIVING_PARTNER { \n Är din sambos befattning pågående eller avslutad?\n }\n CHILD { \n Är din förälders befattning pågående eller avslutad?\n }\n PARENT { \n Är ditt barns befattning pågående eller avslutad?\n }\n CHILD_MARRIED_PARTNER { \n Är din make/makas förälders befattning pågående eller avslutad?\n }\n CHILD_COLIVING_PARTNER { \n Är din sambos förälders befattning pågående eller avslutad?\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Är befattningen för personen i politisk utsatt ställning, som är verklig huvudman till ett företag tillsammans med dig, pågående eller avslutad?\n }\n CLOSE_CONNECTION { \n Är befattningen för personen i politisk utsatt ställning, som du har eller har haft nära förbindelse med, pågående eller avslutad?\n }\n COMPANY_FOR_PEP { \n Är befattningen för personen i politisk utsatt ställning, som du har en relation till, pågående eller avslutad?\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n Är {possessiveName} befattning pågående eller avslutad?\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Är {possessiveName} makes/makas befattning pågående eller avslutad?\n }\n COLIVING_PARTNER { \n Är {possessiveName} sambos befattning pågående eller avslutad?\n }\n CHILD { \n Är {possessiveName} förälders befattning pågående eller avslutad?\n }\n PARENT { \n Är {possessiveName} barns befattning pågående eller avslutad?\n }\n CHILD_MARRIED_PARTNER { \n Är {possessiveName} make/makas förälders befattning pågående eller avslutad?\n }\n CHILD_COLIVING_PARTNER { \n Är {possessiveName} sambos förälders befattning pågående eller avslutad?\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Är befattningen för personen i politisk utsatt ställning, som är verklig huvudman till ett företag tillsammans med {name}, pågående eller avslutad?\n }\n CLOSE_CONNECTION { \n Är befattningen för personen i politisk utsatt ställning, som {name} har eller har haft nära förbindelse med, pågående eller avslutad?\n }\n COMPANY_FOR_PEP { \n Är befattningen för personen i politisk utsatt ställning, som {name} har en relation till, pågående eller avslutad?\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }",
|
|
90
|
+
"pep.status.isongoing.required": "Du måste välja ett alternativ",
|
|
91
|
+
"pep.status.localcountry.header": "I vilket land är/var befattningen?",
|
|
92
|
+
"pep.status.localcountry.required": "Du måste välja ett alternativ",
|
|
93
|
+
"pep.status.localcountryalt.local": "{countryName}",
|
|
94
|
+
"pep.status.next": "Gå vidare",
|
|
95
|
+
"pep.status.othercountryalt.other": "Annat",
|
|
96
|
+
"pep.status.state.ENDED": "Avslutad",
|
|
97
|
+
"pep.status.state.ONGOING": "Pågående"
|
|
98
|
+
}
|
package/src/logo.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 170.96 159.93"><defs><style>.cls-1{fill:#09d3ac;}</style></defs><path class="cls-1" d="M141.35,73.27c0-6.89-8.11-13-20.58-16.73,3-12.67,1.69-22.75-4.28-26.16a9.55,9.55,0,0,0-4.79-1.2c-5.57,0-12.61,3.89-19.72,10.62-7.11-6.68-14.13-10.55-19.69-10.55a9.46,9.46,0,0,0-4.86,1.22c-5.94,3.42-7.17,13.44-4.21,26.05-12.41,3.71-20.48,9.77-20.5,16.63s8.12,13,20.59,16.72c-3,12.68-1.7,22.75,4.28,26.16a9.41,9.41,0,0,0,4.78,1.2c5.58,0,12.62-3.89,19.73-10.62,7.1,6.68,14.12,10.55,19.69,10.55a9.59,9.59,0,0,0,4.86-1.22c5.94-3.42,7.16-13.44,4.21-26C133.27,86.18,141.34,80.12,141.35,73.27ZM96.56,42.06c8.19-7.33,13.31-8.12,15.13-8.12h0a4.71,4.71,0,0,1,2.42.58c2.86,1.63,4,7.38,3.09,15a56.73,56.73,0,0,1-1,5.79,97.7,97.7,0,0,0-12.58-2.07,98.47,98.47,0,0,0-8.24-10.08C95.75,42.79,96.15,42.42,96.56,42.06ZM71.77,78.94c.78,1.5,1.61,3,2.47,4.51S76,86.49,77,88c-2.71-.39-5.34-.88-7.84-1.46C69.86,84,70.75,81.5,71.77,78.94ZM69,59.9c2.53-.59,5.18-1.08,7.93-1.46-1,1.48-1.86,3-2.76,4.59s-1.69,3-2.46,4.52Q70.18,63.65,69,59.9Zm5.21,13.34q1.86-3.93,4.09-7.86c1.5-2.62,3.11-5.17,4.77-7.61,2.91-.22,5.91-.34,9-.33s6,.12,8.89.35c1.66,2.42,3.25,5,4.75,7.55s2.88,5.22,4.12,7.83c-1.23,2.62-2.6,5.25-4.08,7.85s-3.11,5.18-4.77,7.62c-2.91.23-5.91.34-9,.34s-6-.13-8.89-.36c-1.66-2.42-3.26-4.94-4.76-7.55S75.5,75.85,74.25,73.24Zm32.86-14.77c2.72.38,5.35.87,7.84,1.45-.74,2.47-1.62,5-2.64,7.55-.79-1.5-1.61-3-2.48-4.51S108,59.93,107.11,58.47Zm2.76,24.92q1.29-2.27,2.46-4.53c1,2.6,2,5.16,2.7,7.66-2.52.59-5.17,1.07-7.92,1.45Q108.52,85.75,109.87,83.39ZM92,46.56c1.8,1.92,3.57,4,5.3,6.23-1.71-.07-3.46-.12-5.23-.12s-3.58,0-5.33.12C88.45,50.57,90.2,48.48,92,46.56Zm-22.18-12A4.82,4.82,0,0,1,72.29,34a13.11,13.11,0,0,1,5.19,1.31,39.07,39.07,0,0,1,10,6.78l1.17,1.07a98.49,98.49,0,0,0-8.16,10,98.88,98.88,0,0,0-12.65,2.06c-.44-1.94-.8-3.84-1-5.67C65.8,42,67,36.24,69.81,34.6ZM64.53,85.26a58.75,58.75,0,0,1-5.54-2c-7.1-3-11.5-6.85-11.5-10.14S51.91,66,59,63.05a57.63,57.63,0,0,1,5.44-1.94A97.93,97.93,0,0,0,69,73.25,98.72,98.72,0,0,0,64.53,85.26Zm23,19.1c-8.19,7.33-13.31,8.11-15.14,8.11a4.69,4.69,0,0,1-2.42-.58c-2.86-1.63-4-7.38-3.09-15a56.07,56.07,0,0,1,1-5.78,99.51,99.51,0,0,0,12.58,2.06,97.17,97.17,0,0,0,8.24,10.08Zm4.57-4.51c-1.8-1.92-3.57-4-5.31-6.23,1.72.08,3.47.12,5.24.12s3.58,0,5.33-.11C95.63,95.85,93.87,97.93,92.09,99.85Zm22.18,12a4.82,4.82,0,0,1-2.48.59c-1.82,0-7-.8-15.16-8.1l-1.17-1.07a98.44,98.44,0,0,0,8.15-10,97,97,0,0,0,12.66-2.06c.44,1.94.79,3.84,1,5.67C118.27,104.42,117.12,110.18,114.27,111.81Zm10.8-28.44c-1.71.7-3.52,1.35-5.44,1.93a98.54,98.54,0,0,0-4.57-12.14,98.1,98.1,0,0,0,4.49-12,58.75,58.75,0,0,1,5.54,2c7.09,3,11.5,6.85,11.49,10.14S132.17,80.42,125.07,83.37ZM92,82.39a9.18,9.18,0,1,0-9.17-9.19A9.17,9.17,0,0,0,92,82.39ZM31,17.88V128.53H153.07V17.88ZM148.3,123.77H35.78V22.65H148.3Zm-85-33.9c-3,12.68-1.7,22.75,4.28,26.16a9.41,9.41,0,0,0,4.78,1.2c5.58,0,12.62-3.89,19.73-10.62,7.1,6.68,14.12,10.55,19.69,10.55a9.59,9.59,0,0,0,4.86-1.22c5.94-3.42,7.16-13.44,4.21-26,12.41-3.72,20.48-9.78,20.49-16.63s-8.11-13-20.58-16.73c3-12.67,1.69-22.75-4.28-26.16a9.55,9.55,0,0,0-4.79-1.2c-5.57,0-12.61,3.89-19.72,10.62-7.11-6.68-14.13-10.55-19.69-10.55a9.46,9.46,0,0,0-4.86,1.22c-5.94,3.42-7.17,13.44-4.21,26.05-12.41,3.71-20.48,9.77-20.5,16.63S50.84,86.13,63.31,89.87Zm24.21,14.49c-8.19,7.33-13.31,8.11-15.14,8.11a4.69,4.69,0,0,1-2.42-.58c-2.86-1.63-4-7.38-3.09-15a56.07,56.07,0,0,1,1-5.78,99.51,99.51,0,0,0,12.58,2.06,97.17,97.17,0,0,0,8.24,10.08Zm24.79-36.89c-.79-1.5-1.61-3-2.48-4.51s-1.8-3-2.72-4.49c2.72.38,5.35.87,7.84,1.45C114.21,62.39,113.33,64.92,112.31,67.47Zm2.72,19c-2.52.59-5.17,1.07-7.92,1.45q1.41-2.22,2.76-4.58t2.46-4.53C113.37,81.46,114.28,84,115,86.52Zm-5.21-13.35c-1.23,2.62-2.6,5.25-4.08,7.85s-3.11,5.18-4.77,7.62c-2.91.23-5.91.34-9,.34s-6-.13-8.89-.36c-1.66-2.42-3.26-4.94-4.76-7.55s-2.87-5.22-4.12-7.83q1.86-3.93,4.09-7.86c1.5-2.62,3.11-5.17,4.77-7.61,2.91-.22,5.91-.34,9-.33s6,.12,8.89.35c1.66,2.42,3.25,5,4.75,7.55S108.58,70.56,109.82,73.17ZM77,88c-2.71-.39-5.34-.88-7.84-1.46.74-2.46,1.63-5,2.65-7.55.78,1.5,1.61,3,2.47,4.51S76,86.49,77,88ZM74.21,63c-.87,1.5-1.69,3-2.46,4.52Q70.18,63.65,69,59.9c2.53-.59,5.18-1.08,7.93-1.46C76,59.92,75.11,61.45,74.21,63ZM92.09,99.85c-1.8-1.92-3.57-4-5.31-6.23,1.72.08,3.47.12,5.24.12s3.58,0,5.33-.11C95.63,95.85,93.87,97.93,92.09,99.85Zm22.18,12a4.82,4.82,0,0,1-2.48.59c-1.82,0-7-.8-15.16-8.1l-1.17-1.07a98.44,98.44,0,0,0,8.15-10,97,97,0,0,0,12.66-2.06c.44,1.94.79,3.84,1,5.67C118.27,104.42,117.12,110.18,114.27,111.81Zm5.28-50.66a58.75,58.75,0,0,1,5.54,2c7.09,3,11.5,6.85,11.49,10.14s-4.41,7.16-11.51,10.11c-1.71.7-3.52,1.35-5.44,1.93a98.54,98.54,0,0,0-4.57-12.14A98.1,98.1,0,0,0,119.55,61.15Zm-23-19.09c8.19-7.33,13.31-8.12,15.13-8.12h0a4.71,4.71,0,0,1,2.42.58c2.86,1.63,4,7.38,3.09,15a56.73,56.73,0,0,1-1,5.79,97.7,97.7,0,0,0-12.58-2.07,98.47,98.47,0,0,0-8.24-10.08C95.75,42.79,96.15,42.42,96.56,42.06ZM92,46.56c1.8,1.92,3.57,4,5.3,6.23-1.71-.07-3.46-.12-5.23-.12s-3.58,0-5.33.12C88.45,50.57,90.2,48.48,92,46.56Zm-22.18-12A4.82,4.82,0,0,1,72.29,34a13.11,13.11,0,0,1,5.19,1.31,39.07,39.07,0,0,1,10,6.78l1.17,1.07a98.49,98.49,0,0,0-8.16,10,98.88,98.88,0,0,0-12.65,2.06c-.44-1.94-.8-3.84-1-5.67C65.8,42,67,36.24,69.81,34.6ZM59,63.05a57.63,57.63,0,0,1,5.44-1.94A97.93,97.93,0,0,0,69,73.25a98.72,98.72,0,0,0-4.49,12,58.75,58.75,0,0,1-5.54-2c-7.1-3-11.5-6.85-11.5-10.14S51.91,66,59,63.05Zm33,1a9.18,9.18,0,1,0,9.17,9.19A9.17,9.17,0,0,0,92,64Zm0,0a9.18,9.18,0,1,0,9.17,9.19A9.17,9.17,0,0,0,92,64Zm0,0a9.18,9.18,0,1,0,9.17,9.19A9.17,9.17,0,0,0,92,64Zm49.35,9.24c0-6.89-8.11-13-20.58-16.73,3-12.67,1.69-22.75-4.28-26.16a9.55,9.55,0,0,0-4.79-1.2c-5.57,0-12.61,3.89-19.72,10.62-7.11-6.68-14.13-10.55-19.69-10.55a9.46,9.46,0,0,0-4.86,1.22c-5.94,3.42-7.17,13.44-4.21,26.05-12.41,3.71-20.48,9.77-20.5,16.63s8.12,13,20.59,16.72c-3,12.68-1.7,22.75,4.28,26.16a9.41,9.41,0,0,0,4.78,1.2c5.58,0,12.62-3.89,19.73-10.62,7.1,6.68,14.12,10.55,19.69,10.55a9.59,9.59,0,0,0,4.86-1.22c5.94-3.42,7.16-13.44,4.21-26C133.27,86.18,141.34,80.12,141.35,73.27ZM96.56,42.06c8.19-7.33,13.31-8.12,15.13-8.12h0a4.71,4.71,0,0,1,2.42.58c2.86,1.63,4,7.38,3.09,15a56.73,56.73,0,0,1-1,5.79,97.7,97.7,0,0,0-12.58-2.07,98.47,98.47,0,0,0-8.24-10.08C95.75,42.79,96.15,42.42,96.56,42.06ZM71.77,78.94c.78,1.5,1.61,3,2.47,4.51S76,86.49,77,88c-2.71-.39-5.34-.88-7.84-1.46C69.86,84,70.75,81.5,71.77,78.94ZM69,59.9c2.53-.59,5.18-1.08,7.93-1.46-1,1.48-1.86,3-2.76,4.59s-1.69,3-2.46,4.52Q70.18,63.65,69,59.9Zm5.21,13.34q1.86-3.93,4.09-7.86c1.5-2.62,3.11-5.17,4.77-7.61,2.91-.22,5.91-.34,9-.33s6,.12,8.89.35c1.66,2.42,3.25,5,4.75,7.55s2.88,5.22,4.12,7.83c-1.23,2.62-2.6,5.25-4.08,7.85s-3.11,5.18-4.77,7.62c-2.91.23-5.91.34-9,.34s-6-.13-8.89-.36c-1.66-2.42-3.26-4.94-4.76-7.55S75.5,75.85,74.25,73.24Zm32.86-14.77c2.72.38,5.35.87,7.84,1.45-.74,2.47-1.62,5-2.64,7.55-.79-1.5-1.61-3-2.48-4.51S108,59.93,107.11,58.47Zm2.76,24.92q1.29-2.27,2.46-4.53c1,2.6,2,5.16,2.7,7.66-2.52.59-5.17,1.07-7.92,1.45Q108.52,85.75,109.87,83.39ZM92,46.56c1.8,1.92,3.57,4,5.3,6.23-1.71-.07-3.46-.12-5.23-.12s-3.58,0-5.33.12C88.45,50.57,90.2,48.48,92,46.56Zm-22.18-12A4.82,4.82,0,0,1,72.29,34a13.11,13.11,0,0,1,5.19,1.31,39.07,39.07,0,0,1,10,6.78l1.17,1.07a98.49,98.49,0,0,0-8.16,10,98.88,98.88,0,0,0-12.65,2.06c-.44-1.94-.8-3.84-1-5.67C65.8,42,67,36.24,69.81,34.6ZM64.53,85.26a58.75,58.75,0,0,1-5.54-2c-7.1-3-11.5-6.85-11.5-10.14S51.91,66,59,63.05a57.63,57.63,0,0,1,5.44-1.94A97.93,97.93,0,0,0,69,73.25,98.72,98.72,0,0,0,64.53,85.26Zm23,19.1c-8.19,7.33-13.31,8.11-15.14,8.11a4.69,4.69,0,0,1-2.42-.58c-2.86-1.63-4-7.38-3.09-15a56.07,56.07,0,0,1,1-5.78,99.51,99.51,0,0,0,12.58,2.06,97.17,97.17,0,0,0,8.24,10.08Zm4.57-4.51c-1.8-1.92-3.57-4-5.31-6.23,1.72.08,3.47.12,5.24.12s3.58,0,5.33-.11C95.63,95.85,93.87,97.93,92.09,99.85Zm22.18,12a4.82,4.82,0,0,1-2.48.59c-1.82,0-7-.8-15.16-8.1l-1.17-1.07a98.44,98.44,0,0,0,8.15-10,97,97,0,0,0,12.66-2.06c.44,1.94.79,3.84,1,5.67C118.27,104.42,117.12,110.18,114.27,111.81Zm10.8-28.44c-1.71.7-3.52,1.35-5.44,1.93a98.54,98.54,0,0,0-4.57-12.14,98.1,98.1,0,0,0,4.49-12,58.75,58.75,0,0,1,5.54,2c7.09,3,11.5,6.85,11.49,10.14S132.17,80.42,125.07,83.37ZM92,82.39a9.18,9.18,0,1,0-9.17-9.19A9.17,9.17,0,0,0,92,82.39Zm-69.32,54.5V26.2L17.89,31V141.66H139.94l4.78-4.77Z"/></svg>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PepState, PepType, EntityType, PepStatus } from "../pages/PepContext";
|
|
2
|
+
import { DateTime } from "luxon";
|
|
3
|
+
|
|
4
|
+
export interface PepRequest
|
|
5
|
+
extends Omit<
|
|
6
|
+
PepState,
|
|
7
|
+
"isLocalCountry" | "isOngoing" | "ended" | "birthdayOfPEP"
|
|
8
|
+
> {
|
|
9
|
+
ended?: string;
|
|
10
|
+
birthdayOfPEP?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Do some minor preprocessing before we are ready to send everything to the
|
|
15
|
+
* server
|
|
16
|
+
*/
|
|
17
|
+
export function stateToRequest(pepState: PepState): PepRequest {
|
|
18
|
+
const state = { ...pepState };
|
|
19
|
+
delete state.isLocalCountry;
|
|
20
|
+
delete state.isOngoing;
|
|
21
|
+
delete state.ownerName;
|
|
22
|
+
if (state.legalEntityType === EntityType.PERSON) {
|
|
23
|
+
delete state.tin;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
...state,
|
|
27
|
+
country: state.type === PepType.NOT_PEP ? undefined : state.country,
|
|
28
|
+
ended: state.ended
|
|
29
|
+
? DateTime.fromJSDate(state.ended).toFormat("yyyy-MM")
|
|
30
|
+
: undefined,
|
|
31
|
+
birthdayOfPEP: state.birthdayOfPEP
|
|
32
|
+
? DateTime.fromJSDate(state.birthdayOfPEP).toFormat("yyyy-MM-dd")
|
|
33
|
+
: undefined,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function requestToState(
|
|
38
|
+
{ ended, birthdayOfPEP, ...serverData }: PepRequest,
|
|
39
|
+
countryCode: string
|
|
40
|
+
): PepState {
|
|
41
|
+
const state: PepState = { ...serverData };
|
|
42
|
+
if (ended) {
|
|
43
|
+
state.ended = DateTime.fromFormat(ended, "yyyy-MM").toJSDate();
|
|
44
|
+
}
|
|
45
|
+
if (birthdayOfPEP) {
|
|
46
|
+
state.birthdayOfPEP = DateTime.fromFormat(
|
|
47
|
+
birthdayOfPEP,
|
|
48
|
+
"yyyy-MM-dd"
|
|
49
|
+
).toJSDate();
|
|
50
|
+
}
|
|
51
|
+
state.isLocalCountry = state.country === countryCode ? "local" : "other";
|
|
52
|
+
state.isOngoing = state.ended ? PepStatus.ENDED : PepStatus.ONGOING;
|
|
53
|
+
return state;
|
|
54
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineMessages } from "react-intl";
|
|
2
|
+
import { PepType } from "../PepContext";
|
|
3
|
+
|
|
4
|
+
export const messages = defineMessages({
|
|
5
|
+
header: { id: "pep.ispep.header" },
|
|
6
|
+
required: { id: "pep.ispep.required" },
|
|
7
|
+
[PepType.NOT_PEP]: { id: "pep.ispep.NOT_PEP" },
|
|
8
|
+
[PepType.ME]: { id: "pep.ispep.ME" },
|
|
9
|
+
[PepType.RELATIVE]: { id: "pep.ispep.RELATIVE" },
|
|
10
|
+
[PepType.COLLEAGUE]: { id: "pep.ispep.COLLEAGUE" },
|
|
11
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
FunctionComponent,
|
|
3
|
+
useRef,
|
|
4
|
+
useCallback,
|
|
5
|
+
useContext,
|
|
6
|
+
} from "react";
|
|
7
|
+
import {
|
|
8
|
+
Form,
|
|
9
|
+
RadioGroup,
|
|
10
|
+
RequiredValidator,
|
|
11
|
+
Button,
|
|
12
|
+
LysaFormRef,
|
|
13
|
+
Card,
|
|
14
|
+
} from "@lysaab/ui-2";
|
|
15
|
+
import { PepType, PepContext, EntityType } from "../PepContext";
|
|
16
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
17
|
+
import { messages } from "./IsPepMessages";
|
|
18
|
+
|
|
19
|
+
export interface QuestionsProps {
|
|
20
|
+
ownerName?: string;
|
|
21
|
+
entityType?: EntityType;
|
|
22
|
+
type?: PepType;
|
|
23
|
+
onChange: (type: PepType) => void;
|
|
24
|
+
resetValues?: () => void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const IsPepQuestion: React.FC<QuestionsProps> = ({
|
|
28
|
+
ownerName,
|
|
29
|
+
entityType,
|
|
30
|
+
type,
|
|
31
|
+
onChange,
|
|
32
|
+
resetValues,
|
|
33
|
+
}) => {
|
|
34
|
+
const intl = useIntl();
|
|
35
|
+
|
|
36
|
+
const IsPepAlternatives = [
|
|
37
|
+
{
|
|
38
|
+
text: intl.formatMessage(messages[PepType.NOT_PEP], {
|
|
39
|
+
entityType,
|
|
40
|
+
name: ownerName,
|
|
41
|
+
}),
|
|
42
|
+
value: PepType.NOT_PEP,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
text: intl.formatMessage(messages[PepType.ME], {
|
|
46
|
+
entityType,
|
|
47
|
+
name: ownerName,
|
|
48
|
+
}),
|
|
49
|
+
value: PepType.ME,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: intl.formatMessage(messages[PepType.RELATIVE], {
|
|
53
|
+
entityType,
|
|
54
|
+
name: ownerName,
|
|
55
|
+
}),
|
|
56
|
+
value: PepType.RELATIVE,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
text: intl.formatMessage(messages[PepType.COLLEAGUE], {
|
|
60
|
+
entityType,
|
|
61
|
+
name: ownerName,
|
|
62
|
+
}),
|
|
63
|
+
value: PepType.COLLEAGUE,
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<RadioGroup
|
|
69
|
+
alternatives={IsPepAlternatives}
|
|
70
|
+
onChange={(alternative) => {
|
|
71
|
+
onChange(alternative.value);
|
|
72
|
+
resetValues?.();
|
|
73
|
+
}}
|
|
74
|
+
value={IsPepAlternatives.find((alt) => alt.value === type)}
|
|
75
|
+
header={intl.formatMessage(messages.header, {
|
|
76
|
+
entityType,
|
|
77
|
+
name: ownerName,
|
|
78
|
+
})}
|
|
79
|
+
validators={[
|
|
80
|
+
new RequiredValidator(intl.formatMessage(messages.required)),
|
|
81
|
+
]}
|
|
82
|
+
data-test-id="pep-ispep"
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
interface Props {
|
|
88
|
+
next: () => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const IsPepPage: FunctionComponent<Props> = ({ next }) => {
|
|
92
|
+
const pepContext = useContext(PepContext);
|
|
93
|
+
const formRef = useRef<LysaFormRef>();
|
|
94
|
+
|
|
95
|
+
const nextPage = useCallback(() => {
|
|
96
|
+
if (formRef.current && formRef.current.isValid) {
|
|
97
|
+
next();
|
|
98
|
+
}
|
|
99
|
+
}, [formRef, next]);
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<Form onSubmit={nextPage} lysaFormRef={formRef}>
|
|
103
|
+
<Card>
|
|
104
|
+
<IsPepQuestion
|
|
105
|
+
ownerName={pepContext.state.ownerName}
|
|
106
|
+
entityType={pepContext.state.legalEntityType || EntityType.PERSON}
|
|
107
|
+
type={pepContext.state.type}
|
|
108
|
+
onChange={(type) => pepContext.setState({ type })}
|
|
109
|
+
/>
|
|
110
|
+
</Card>
|
|
111
|
+
|
|
112
|
+
<Button
|
|
113
|
+
label={<FormattedMessage id="pep.ispep.next" />}
|
|
114
|
+
block
|
|
115
|
+
type="submit"
|
|
116
|
+
/>
|
|
117
|
+
</Form>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { WorldCountry } from "@lysaab/ui-2";
|
|
2
|
+
import React, { useReducer } from "react";
|
|
3
|
+
|
|
4
|
+
export enum EntityType {
|
|
5
|
+
PERSON = "PERSON",
|
|
6
|
+
CORPORATION = "CORPORATION",
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum PepType {
|
|
10
|
+
NOT_PEP = "NOT_PEP",
|
|
11
|
+
ME = "ME",
|
|
12
|
+
RELATIVE = "RELATIVE",
|
|
13
|
+
COLLEAGUE = "COLLEAGUE",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum PepStatus {
|
|
17
|
+
ONGOING = "ONGOING",
|
|
18
|
+
ENDED = "ENDED",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum Role {
|
|
22
|
+
HEAD_OF_GOVERNMENT = "HEAD_OF_GOVERNMENT",
|
|
23
|
+
MINISTER = "MINISTER",
|
|
24
|
+
PARLIMENT_MEMBER = "PARLIMENT_MEMBER",
|
|
25
|
+
CENTRAL_BANK_MEMBER = "CENTRAL_BANK_MEMBER",
|
|
26
|
+
BOARD_MEMBER_POLITICAL_PARTY = "BOARD_MEMBER_POLITICAL_PARTY",
|
|
27
|
+
JUDGE_SUPREME_COURT = "JUDGE_SUPREME_COURT",
|
|
28
|
+
JUDGE_OTHER_HIGH_COURT = "JUDGE_OTHER_HIGH_COURT",
|
|
29
|
+
REVISION_INSTITUTE = "REVISION_INSTITUTE",
|
|
30
|
+
AMBASSADOR = "AMBASSADOR",
|
|
31
|
+
MILITARY_OFFICER = "MILITARY_OFFICER",
|
|
32
|
+
GOVERNMENT_COMPANY = "GOVERNMENT_COMPANY",
|
|
33
|
+
EU_HIGH_RANKING_POSITION = "EU_HIGH_RANKING_POSITION",
|
|
34
|
+
HIGH_RANKING_POSITION_INTERNALTIONAL_CORP = "HIGH_RANKING_POSITION_INTERNALTIONAL_CORP",
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export enum Relation {
|
|
38
|
+
MARRIED_PARTNER = "MARRIED_PARTNER",
|
|
39
|
+
COLIVING_PARTNER = "COLIVING_PARTNER",
|
|
40
|
+
CHILD = "CHILD",
|
|
41
|
+
PARENT = "PARENT",
|
|
42
|
+
CHILD_MARRIED_PARTNER = "CHILD_MARRIED_PARTNER",
|
|
43
|
+
CHILD_COLIVING_PARTNER = "CHILD_COLIVING_PARTNER",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum BusinessRelation {
|
|
47
|
+
CO_OWNERSHIP = "CO_OWNERSHIP",
|
|
48
|
+
CLOSE_CONNECTION = "CLOSE_CONNECTION",
|
|
49
|
+
COMPANY_FOR_PEP = "COMPANY_FOR_PEP",
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export enum MilitaryRank {
|
|
53
|
+
GENERAL = "GENERAL",
|
|
54
|
+
LIEUTENANT_GENERAL = "LIEUTENANT_GENERAL",
|
|
55
|
+
MAJOR_GENERAL = "MAJOR_GENERAL",
|
|
56
|
+
ADMIRAL = "ADMIRAL",
|
|
57
|
+
VICE_ADMIRAL = "VICE_ADMIRAL",
|
|
58
|
+
REAR_ADMIRAL = "REAR_ADMIRAL",
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Types for the state
|
|
62
|
+
export interface PepState {
|
|
63
|
+
legalEntityType?: EntityType;
|
|
64
|
+
type?: PepType;
|
|
65
|
+
role?: Role;
|
|
66
|
+
country?: WorldCountry;
|
|
67
|
+
ended?: Date;
|
|
68
|
+
ambassadorCountry?: WorldCountry;
|
|
69
|
+
militaryRank?: MilitaryRank;
|
|
70
|
+
governmentCompany?: string;
|
|
71
|
+
governmentCompanyRole?: string;
|
|
72
|
+
internationalOrganisation?: string;
|
|
73
|
+
internationalOrganisationRole?: string;
|
|
74
|
+
relationToPEP?: Relation;
|
|
75
|
+
nameOfPEP?: string;
|
|
76
|
+
birthdayOfPEP?: Date;
|
|
77
|
+
tin?: string;
|
|
78
|
+
businessRelation?: BusinessRelation;
|
|
79
|
+
locked?: boolean;
|
|
80
|
+
|
|
81
|
+
isOngoing?: PepStatus;
|
|
82
|
+
isLocalCountry?: string;
|
|
83
|
+
ownerName?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const EMPTY_PEP_STATE: PepState = {
|
|
87
|
+
legalEntityType: undefined,
|
|
88
|
+
type: undefined,
|
|
89
|
+
role: undefined,
|
|
90
|
+
country: undefined,
|
|
91
|
+
ended: undefined,
|
|
92
|
+
ambassadorCountry: undefined,
|
|
93
|
+
militaryRank: undefined,
|
|
94
|
+
governmentCompany: undefined,
|
|
95
|
+
governmentCompanyRole: undefined,
|
|
96
|
+
internationalOrganisation: undefined,
|
|
97
|
+
internationalOrganisationRole: undefined,
|
|
98
|
+
relationToPEP: undefined,
|
|
99
|
+
nameOfPEP: undefined,
|
|
100
|
+
birthdayOfPEP: undefined,
|
|
101
|
+
tin: undefined,
|
|
102
|
+
businessRelation: undefined,
|
|
103
|
+
locked: undefined,
|
|
104
|
+
|
|
105
|
+
isOngoing: undefined,
|
|
106
|
+
isLocalCountry: undefined,
|
|
107
|
+
ownerName: undefined,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// All types for the context. This includes setter methods
|
|
111
|
+
export interface PepContextProps {
|
|
112
|
+
state: PepState;
|
|
113
|
+
setState: (newState: Partial<PepState>) => void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Create the context. (This will just create a template)
|
|
117
|
+
export const PepContext = React.createContext<PepContextProps>(
|
|
118
|
+
{} as PepContextProps
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* A Higher Order Component. This is used to wrap classes so that the context is injected
|
|
123
|
+
* There is quite a bit TS magic here. This is so that the internal props off the component
|
|
124
|
+
* will be stripped of the context props so that the external props will only show the relevant
|
|
125
|
+
* props
|
|
126
|
+
*/
|
|
127
|
+
export const withPep =
|
|
128
|
+
<P extends object>(
|
|
129
|
+
Component: React.ComponentType<React.PropsWithChildren<P>>
|
|
130
|
+
): React.FC<React.PropsWithChildren<Omit<P, keyof PepContextProps>>> =>
|
|
131
|
+
(props) =>
|
|
132
|
+
(
|
|
133
|
+
<PepContext.Consumer>
|
|
134
|
+
{(contextProps) => <Component {...(props as P)} {...contextProps} />}
|
|
135
|
+
</PepContext.Consumer>
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
function stateReducer(state: PepState, newState: Partial<PepState>) {
|
|
139
|
+
return { ...state, ...newState };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export const PepContextProvider: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
|
|
143
|
+
const [pep, setPep] = useReducer(stateReducer, {});
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<PepContext.Provider value={{ state: pep, setState: setPep }}>
|
|
147
|
+
{children}
|
|
148
|
+
</PepContext.Provider>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineMessages } from "react-intl";
|
|
2
|
+
import { BusinessRelation, Relation } from "../PepContext";
|
|
3
|
+
|
|
4
|
+
export const relationMessages = defineMessages({
|
|
5
|
+
header: {
|
|
6
|
+
id: "pep.relation.relationship.header",
|
|
7
|
+
},
|
|
8
|
+
required: {
|
|
9
|
+
id: "pep.relation.relation.required",
|
|
10
|
+
},
|
|
11
|
+
[Relation.MARRIED_PARTNER]: {
|
|
12
|
+
id: "pep.relation.relation.MARRIED_PARTNER",
|
|
13
|
+
},
|
|
14
|
+
[Relation.COLIVING_PARTNER]: {
|
|
15
|
+
id: "pep.relation.relation.COLIVING_PARTNER",
|
|
16
|
+
},
|
|
17
|
+
[Relation.CHILD]: {
|
|
18
|
+
id: "pep.relation.relation.CHILD",
|
|
19
|
+
},
|
|
20
|
+
[Relation.PARENT]: {
|
|
21
|
+
id: "pep.relation.relation.PARENT",
|
|
22
|
+
},
|
|
23
|
+
[Relation.CHILD_MARRIED_PARTNER]: {
|
|
24
|
+
id: "pep.relation.relation.CHILD_MARRIED_PARTNER",
|
|
25
|
+
},
|
|
26
|
+
[Relation.CHILD_COLIVING_PARTNER]: {
|
|
27
|
+
id: "pep.relation.relation.CHILD_COLIVING_PARTNER",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const businessRelationMessages = defineMessages({
|
|
32
|
+
header: {
|
|
33
|
+
id: "pep.relation.businessrelation.header",
|
|
34
|
+
},
|
|
35
|
+
required: {
|
|
36
|
+
id: "pep.relation.businessrelation.required",
|
|
37
|
+
},
|
|
38
|
+
[BusinessRelation.CO_OWNERSHIP]: {
|
|
39
|
+
id: "pep.relation.businessrelation.alt.CO_OWNERSHIP",
|
|
40
|
+
},
|
|
41
|
+
[BusinessRelation.CLOSE_CONNECTION]: {
|
|
42
|
+
id: "pep.relation.businessrelation.alt.CLOSE_CONNECTION",
|
|
43
|
+
},
|
|
44
|
+
[BusinessRelation.COMPANY_FOR_PEP]: {
|
|
45
|
+
id: "pep.relation.businessrelation.alt.COMPANY_FOR_PEP",
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const relativeNameMessages = defineMessages({
|
|
50
|
+
header: {
|
|
51
|
+
id: "pep.relation.relative.name.header",
|
|
52
|
+
},
|
|
53
|
+
required: {
|
|
54
|
+
id: "pep.relation.relative.name.required",
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const birthdayMessages = defineMessages({
|
|
59
|
+
header: {
|
|
60
|
+
id: "pep.relation.birthday.header",
|
|
61
|
+
},
|
|
62
|
+
required: {
|
|
63
|
+
id: "pep.relation.birthday.required",
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export const colleagueNameMessages = defineMessages({
|
|
68
|
+
header: {
|
|
69
|
+
id: "pep.relation.colleague.name.header",
|
|
70
|
+
},
|
|
71
|
+
required: {
|
|
72
|
+
id: "pep.relation.colleague.name.required",
|
|
73
|
+
},
|
|
74
|
+
});
|