@lysaab/lysa-pep 1.0.0-0 → 1.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.
Files changed (78) hide show
  1. package/README.md +0 -0
  2. package/lib/Exports.d.ts +8 -7
  3. package/lib/Exports.js +8 -7
  4. package/lib/components/CountrySelect.d.ts +22 -15
  5. package/lib/components/CountrySelect.js +21 -30
  6. package/lib/components/PepAnswers.d.ts +8 -8
  7. package/lib/components/PepAnswers.js +39 -131
  8. package/lib/components/PepAnswers.scss +0 -0
  9. package/lib/model/Countries.d.ts +4 -4
  10. package/lib/model/Countries.js +1002 -1002
  11. package/lib/model/PepModel.d.ts +7 -7
  12. package/lib/model/PepModel.js +40 -40
  13. package/lib/model/PepTexts.d.ts +380 -0
  14. package/lib/model/PepTexts.js +552 -0
  15. package/lib/pages/PepContext.d.ts +80 -80
  16. package/lib/pages/PepContext.js +88 -88
  17. package/lib/pages/PepIsPepPage.d.ts +15 -0
  18. package/lib/pages/PepIsPepPage.js +59 -0
  19. package/lib/pages/{StatusPage/StatusPage.d.ts → PepRelationPage.d.ts} +6 -6
  20. package/lib/pages/PepRelationPage.js +79 -0
  21. package/lib/pages/PepRolePage.d.ts +10 -0
  22. package/lib/pages/PepRolePage.js +127 -0
  23. package/lib/pages/{RelationPage/RelationPage.d.ts → PepStatusPage.d.ts} +6 -6
  24. package/lib/pages/PepStatusPage.js +58 -0
  25. package/package.json +10 -13
  26. package/public/favicon.ico +0 -0
  27. package/public/index.html +0 -0
  28. package/public/logo192.png +0 -0
  29. package/public/logo512.png +0 -0
  30. package/public/manifest.json +0 -0
  31. package/public/robots.txt +0 -0
  32. package/src/App.css +0 -0
  33. package/src/App.test.tsx +0 -0
  34. package/src/App.tsx +0 -0
  35. package/src/Exports.ts +8 -7
  36. package/src/components/CountrySelect.tsx +10 -14
  37. package/src/components/PepAnswers.scss +0 -0
  38. package/src/components/PepAnswers.tsx +34 -166
  39. package/src/demo/Done.tsx +6 -2
  40. package/src/demo/Pep.tsx +81 -87
  41. package/src/index.css +0 -0
  42. package/src/index.tsx +0 -0
  43. package/src/logo.svg +0 -0
  44. package/src/model/Countries.ts +0 -0
  45. package/src/model/PepModel.ts +0 -0
  46. package/src/model/PepTexts.ts +607 -0
  47. package/src/pages/PepContext.tsx +0 -0
  48. package/src/pages/PepIsPepPage.tsx +107 -0
  49. package/src/pages/PepRelationPage.tsx +188 -0
  50. package/src/pages/PepRolePage.tsx +272 -0
  51. package/src/pages/PepStatusPage.tsx +157 -0
  52. package/src/react-app-env.d.ts +0 -0
  53. package/src/serviceWorker.ts +0 -0
  54. package/tsconfig.json +0 -0
  55. package/tsconfig_build.json +0 -0
  56. package/.vscode/settings.json +0 -3
  57. package/lib/pages/IsPep/IsPepMessages.d.ts +0 -32
  58. package/lib/pages/IsPep/IsPepMessages.js +0 -74
  59. package/lib/pages/IsPep/IsPepPage.d.ts +0 -14
  60. package/lib/pages/IsPep/IsPepPage.js +0 -39
  61. package/lib/pages/RelationPage/RelationMessages.d.ts +0 -105
  62. package/lib/pages/RelationPage/RelationMessages.js +0 -282
  63. package/lib/pages/RelationPage/RelationPage.js +0 -142
  64. package/lib/pages/RolePage/RoleMessages.d.ts +0 -185
  65. package/lib/pages/RolePage/RoleMessages.js +0 -381
  66. package/lib/pages/RolePage/RolePage.d.ts +0 -11
  67. package/lib/pages/RolePage/RolePage.js +0 -214
  68. package/lib/pages/StatusPage/StatusMessages.d.ts +0 -72
  69. package/lib/pages/StatusPage/StatusMessages.js +0 -74
  70. package/lib/pages/StatusPage/StatusPage.js +0 -75
  71. package/src/pages/IsPep/IsPepMessages.ts +0 -75
  72. package/src/pages/IsPep/IsPepPage.tsx +0 -94
  73. package/src/pages/RelationPage/RelationMessages.ts +0 -287
  74. package/src/pages/RelationPage/RelationPage.tsx +0 -269
  75. package/src/pages/RolePage/RoleMessages.ts +0 -389
  76. package/src/pages/RolePage/RolePage.tsx +0 -342
  77. package/src/pages/StatusPage/StatusMessages.ts +0 -80
  78. package/src/pages/StatusPage/StatusPage.tsx +0 -172
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from "react";
2
- interface Props {
3
- next: () => void;
4
- }
5
- export declare const RelationPage: FunctionComponent<Props>;
6
- export {};
1
+ import { FunctionComponent } from "react";
2
+ interface Props {
3
+ next: () => void;
4
+ }
5
+ export declare const PepStatusPage: FunctionComponent<Props>;
6
+ export {};
@@ -0,0 +1,58 @@
1
+ import React, { useRef, useCallback, useContext, } from "react";
2
+ import { Form, RadioGroup, RequiredValidator, PrimaryButton, Datepicker, } from "@lysaab/ui-2";
3
+ import { PepContext, PepStatus, EntityType, PepType } from "./PepContext";
4
+ import { CountrySelect } from "../components/CountrySelect";
5
+ import { LABELS, getStatusOngoingHeader, getStatusCountryHeader, } from "../model/PepTexts";
6
+ const stateAlternatives = [
7
+ {
8
+ text: "Pågående",
9
+ value: PepStatus.ONGOING,
10
+ },
11
+ {
12
+ text: "Avslutad",
13
+ value: PepStatus.ENDED,
14
+ },
15
+ ];
16
+ const isSwedenAlternatives = [
17
+ { text: "Sverige", value: "sweden" },
18
+ { text: "Annat", value: "other" },
19
+ ];
20
+ export const PepStatusPage = ({ next }) => {
21
+ const pepContext = useContext(PepContext);
22
+ const formRef = useRef();
23
+ const nextPage = useCallback(() => {
24
+ if (formRef.current && formRef.current.isValid) {
25
+ next();
26
+ }
27
+ }, [formRef, next]);
28
+ const updateIsSweden = useCallback((alternative) => {
29
+ pepContext.setState({ isSweden: alternative.value });
30
+ if (alternative.value === "other") {
31
+ pepContext.setState({ country: undefined });
32
+ }
33
+ }, [pepContext]);
34
+ const updateIsOngoing = useCallback((alternative) => {
35
+ pepContext.setState({ isOngoing: alternative.value });
36
+ if (alternative.value === PepStatus.ONGOING) {
37
+ pepContext.setState({ ended: undefined });
38
+ }
39
+ }, [pepContext]);
40
+ const labels = LABELS(pepContext.state.ownerName);
41
+ const entityType = pepContext.state.legalEntityType || EntityType.PERSON;
42
+ const type = pepContext.state.type;
43
+ if (!type || type === PepType.NOT_PEP) {
44
+ return null;
45
+ }
46
+ return (React.createElement("div", null,
47
+ React.createElement(Form, { lysaFormRef: formRef, onSubmit: () => {
48
+ nextPage();
49
+ } },
50
+ React.createElement(RadioGroup, { alternatives: stateAlternatives, header: getStatusOngoingHeader(entityType, type, pepContext.state.relationToPEP, pepContext.state.businessRelation, pepContext.state.ownerName), onChange: updateIsOngoing, value: stateAlternatives.find((alt) => alt.value === pepContext.state.isOngoing), validators: [new RequiredValidator("Du måste välja ett alternativ")] }),
51
+ pepContext.state.isOngoing &&
52
+ pepContext.state.isOngoing === PepStatus.ENDED ? (React.createElement(Datepicker, { label: "N\u00E4r avslutades uppdraget?", selected: pepContext.state.ended, onChange: (event) => pepContext.setState({ ended: event || undefined }), validators: [new RequiredValidator("Du måste ange datum")], showMonthYearPicker: true, dateFormat: "yyyy-MM", maxDate: new Date() })) : null,
53
+ React.createElement(RadioGroup, { alternatives: isSwedenAlternatives, header: getStatusCountryHeader(entityType, type, pepContext.state.relationToPEP, pepContext.state.businessRelation, pepContext.state.ownerName), onChange: updateIsSweden, value: isSwedenAlternatives.find((alt) => alt.value === pepContext.state.isSweden), validators: [new RequiredValidator("Du måste välja ett alternativ")] }),
54
+ pepContext.state.isSweden && pepContext.state.isSweden === "other" ? (React.createElement(CountrySelect, { label: "V\u00E4lj i vilket land befattningen \u00E4r", onChange: (event) => pepContext.setState({
55
+ country: event.value ? event.value.toString() : undefined,
56
+ }), validators: [new RequiredValidator("Du måste välja land")], value: pepContext.state.country, removeSweden: true })) : null,
57
+ React.createElement(PrimaryButton, { type: "submit" }, "N\u00E4sta"))));
58
+ };
package/package.json CHANGED
@@ -1,30 +1,28 @@
1
1
  {
2
2
  "name": "@lysaab/lysa-pep",
3
3
  "author": "Lysa AB",
4
- "version": "1.0.0-0",
4
+ "version": "1.0.0",
5
5
  "main": "./lib/Exports.js",
6
6
  "dependencies": {
7
7
  "@types/luxon": "^1.15.2",
8
- "@types/react-intl": "^3.0.0",
9
- "luxon": "^1.21.1",
10
- "react-intl": "^4.1.1"
8
+ "luxon": "^1.21.1"
11
9
  },
12
10
  "devDependencies": {
13
- "@lysaab/ui-2": "^16.11.1",
11
+ "@lysaab/ui-2": "^18.0.0",
14
12
  "@types/jest": "24.0.20",
15
13
  "@types/luxon": "^1.15.2",
16
14
  "@types/node": "12.11.7",
17
- "@types/react": "^16.9.23",
18
- "@types/react-dom": "^16.9.5",
15
+ "@types/react": "16.9.11",
16
+ "@types/react-dom": "16.9.3",
19
17
  "copyfiles": "^2.1.1",
20
18
  "luxon": "^1.21.1",
21
- "react": "^16.13.0",
22
- "react-dom": "^16.13.0",
23
- "react-scripts": "^3.4.0",
19
+ "react": "^16.11.0",
20
+ "react-dom": "^16.11.0",
21
+ "react-scripts": "^3.4.1",
24
22
  "typescript": "^3.7.2"
25
23
  },
26
24
  "peerDependencies": {
27
- "@lysaab/ui-2": "^16.3.2"
25
+ "@lysaab/ui-2": "^18.0.0"
28
26
  },
29
27
  "scripts": {
30
28
  "start": "react-scripts start",
@@ -35,8 +33,7 @@
35
33
  "copyscss": "copyfiles -u 1 \"src/components/**/*.scss\" lib/",
36
34
  "release:patch": "npm run build:lib && npm run copyscss && npm version patch && npm publish",
37
35
  "release:minor": "npm run build:lib && npm run copyscss && npm version minor && npm publish",
38
- "release:major": "npm run build:lib && npm run copyscss && npm version major && npm publish",
39
- "release:premajor": "npm run build:lib && npm run copyscss && npm version premajor && npm publish"
36
+ "release:major": "npm run build:lib && npm run copyscss && npm version major && npm publish"
40
37
  },
41
38
  "eslintConfig": {
42
39
  "extends": "react-app"
File without changes
package/public/index.html CHANGED
File without changes
File without changes
File without changes
File without changes
package/public/robots.txt CHANGED
File without changes
package/src/App.css CHANGED
File without changes
package/src/App.test.tsx CHANGED
File without changes
package/src/App.tsx CHANGED
File without changes
package/src/Exports.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  export * from "./pages/PepContext";
2
2
  export * from "./model/PepModel";
3
- export * from "./pages/IsPep/IsPepPage";
4
- export { RelationPage } from "./pages/RelationPage/RelationPage";
3
+ export * from "./model/PepTexts";
4
+ export * from "./pages/PepIsPepPage";
5
+ export { PepRelationPage } from "./pages/PepRelationPage";
5
6
  export {
6
- RolePage as PepRolePage,
7
- getMilitaryAlts,
8
- getRoleAlts
9
- } from "./pages/RolePage/RolePage";
10
- export { StatusPage as PepStatusPage } from "./pages/StatusPage/StatusPage";
7
+ PepRolePage,
8
+ militaryAlternatives,
9
+ roleAlternatives
10
+ } from "./pages/PepRolePage";
11
+ export { PepStatusPage } from "./pages/PepStatusPage";
11
12
 
12
13
  export { PepAnswers } from "./components/PepAnswers";
@@ -2,7 +2,12 @@ import React, { useState, FunctionComponent } from "react";
2
2
  import { Alternative, Select } from "@lysaab/ui-2";
3
3
  import { ValidationProps } from "@lysaab/ui-2/hooks/useValidation";
4
4
  import { countries } from "../model/Countries";
5
- import { defineMessages, useIntl } from "react-intl";
5
+
6
+ declare global {
7
+ interface Window {
8
+ lysa: { contentPath: string };
9
+ }
10
+ }
6
11
 
7
12
  export interface Country {
8
13
  label: string;
@@ -13,33 +18,24 @@ interface Props extends ValidationProps {
13
18
  value?: string;
14
19
  onChange?(value: Alternative<string>): void;
15
20
  label: string;
16
- omitCountries?: string[];
21
+ removeSweden?: boolean;
17
22
  }
18
23
 
19
- const messages = defineMessages({
20
- placeholder: {
21
- id: 'component.select.country',
22
- description: 'Select a country placeholder',
23
- defaultMessage: 'Välj ett land'
24
- }
25
- })
26
-
27
24
  export const CountrySelect: FunctionComponent<Props> = ({
28
25
  value,
29
- omitCountries = [],
26
+ removeSweden = false,
30
27
  ...props
31
28
  }) => {
32
- const intl = useIntl();
33
29
  const [countryAlternatives] = useState(
34
30
  countries
35
- .filter(country => !omitCountries.includes(country.value))
31
+ .filter(country => !(removeSweden && country.value === "SE"))
36
32
  .map(country => ({ text: country.label, value: country.value }))
37
33
  );
38
34
 
39
35
  return (
40
36
  <Select
41
37
  alternatives={countryAlternatives}
42
- placeholder={intl.formatMessage(messages.placeholder)}
38
+ placeholder={"Välj ett land"}
43
39
  value={countryAlternatives.find(country => country.value === value)}
44
40
  {...props}
45
41
  />
File without changes
@@ -2,236 +2,104 @@ import React, { FunctionComponent } from "react";
2
2
  import "./PepAnswers.scss";
3
3
  import { PepRequest } from "../model/PepModel";
4
4
  import { countries } from "../model/Countries";
5
- import { getRoleAlts, getMilitaryAlts } from "../pages/RolePage/RolePage";
5
+ import { LABELS } from "../model/PepTexts";
6
+ import { roleAlternatives, militaryAlternatives } from "../pages/PepRolePage";
6
7
  import { EntityType, PepType } from "../pages/PepContext";
7
- import { useIntl, defineMessages, FormattedMessage } from "react-intl";
8
- import { messages as isPepMessages } from "../pages/IsPep/IsPepMessages";
9
- import {
10
- relationMessages,
11
- businessRelationMessages
12
- } from "../pages/RelationPage/RelationMessages";
13
8
 
14
9
  interface Props {
15
10
  answer: PepRequest;
16
11
  }
17
12
 
18
- const messages = defineMessages({
19
- whoIsPepLabel: {
20
- id: "pep.anwers.who.label",
21
- description: "Who is pep label",
22
- defaultMessage: "Vem är pep"
23
- },
24
- relationLabel: {
25
- id: "pep.anwers.relation.label",
26
- description: "Relation label",
27
- defaultMessage: "Relation"
28
- },
29
- businessRelationLabel: {
30
- id: "pep.anwers.businessRelation.label",
31
- description: "Business relation label",
32
- defaultMessage: "Vem är pep"
33
- },
34
- nameOfPepLabel: {
35
- id: "pep.anwers.nameOfPep.label",
36
- description: "Name of pep label",
37
- defaultMessage: "Namn på personen"
38
- },
39
- birthdayOfPEPLabel: {
40
- id: "pep.anwers.birthdayOfPEP.label",
41
- description: "Birthday of pep label",
42
- defaultMessage: "Födelsedag för personen"
43
- },
44
- statusLabel: {
45
- id: "pep.anwers.status.label",
46
- description: "Status label",
47
- defaultMessage: "Status"
48
- },
49
- statusEndedValue: {
50
- id: "pep.anwers.statusEnded.value",
51
- description: "Status ended value",
52
- defaultMessage: "Avslutad"
53
- },
54
- statusOngoingValue: {
55
- id: "pep.anwers.statusOngoing.value",
56
- description: "Status ongoing value",
57
- defaultMessage: "Pågående"
58
- },
59
- endedLabel: {
60
- id: "pep.anwers.endedStatus.label",
61
- description: "Ended label",
62
- defaultMessage: "Avslutades"
63
- },
64
- roleLabel: {
65
- id: "pep.anwers.role.label",
66
- description: "Role label",
67
- defaultMessage: "Roll"
68
- },
69
- countryLabel: {
70
- id: "pep.anwers.country.label",
71
- description: "Country label",
72
- defaultMessage: "Land"
73
- },
74
- ambassadorCountryLabel: {
75
- id: "pep.anwers.ambassadorCountry.label",
76
- description: "Ambassador country label",
77
- defaultMessage: "Ambassadörsland"
78
- },
79
- governmentCompanyNameLabel: {
80
- id: "pep.anwers.governmentCompanyName.label",
81
- description: "Government company name label",
82
- defaultMessage: "Företags namn"
83
- },
84
- governmentCompanyRoleLabel: {
85
- id: "pep.anwers.governmentCompanyRole.label",
86
- description: "Government company role label",
87
- defaultMessage: "Roll på företaget"
88
- },
89
- internationalOrganisationNameLabel: {
90
- id: "pep.anwers.companyName.label",
91
- description: "International organisation name label",
92
- defaultMessage: "Organisationens namn"
93
- },
94
- internationalOrganisationRoleLabel: {
95
- id: "pep.anwers.companyRole.label",
96
- description: "International organisation role label",
97
- defaultMessage: "Roll i organisationen"
98
- },
99
- militaryGradeLabel: {
100
- id: "pep.anwers.militaryRank.label",
101
- description: "Military rank label",
102
- defaultMessage: "Roll i organisationen"
103
- }
104
- });
105
-
106
13
  export const PepAnswers: FunctionComponent<Props> = ({ answer }) => {
107
- const intl = useIntl();
108
14
  if (!answer.type || answer.type === PepType.NOT_PEP) {
109
- return (
110
- <div>
111
- <p>
112
- <FormattedMessage
113
- id="pep.anwers.notpep"
114
- description="Not pep"
115
- defaultMessage="Personen är inte PEP"
116
- />
117
- </p>
118
- </div>
119
- );
15
+ return <div><p>Personen är inte PEP</p></div>;
120
16
  }
121
17
 
18
+ const entityType = answer.legalEntityType || EntityType.PERSON;
19
+ const labels = LABELS(answer.ownerName);
122
20
  const country = countries.find(country => country.value === answer.country);
123
- const role = getRoleAlts(intl).find(alt => alt.value === answer.role);
124
- const militaryRank = getMilitaryAlts(intl).find(
21
+ const role = roleAlternatives.find(alt => alt.value === answer.role);
22
+ const militaryRank = militaryAlternatives.find(
125
23
  alt => alt.value === answer.militaryRank
126
24
  );
127
25
  return (
128
26
  <div>
129
27
  {answer.type && (
130
28
  <StaticInput
131
- label={intl.formatMessage(messages.whoIsPepLabel)}
132
- value={intl.formatMessage(isPepMessages[answer.type], {
133
- entityType: EntityType.PERSON
134
- })}
29
+ label="Vem är pep"
30
+ value={labels[entityType].GENERIC.IS_PEP[answer.type]}
135
31
  />
136
32
  )}
137
33
  {answer.relationToPEP && (
138
34
  <StaticInput
139
- label={intl.formatMessage(messages.relationLabel)}
140
- value={intl.formatMessage(relationMessages[answer.relationToPEP])}
35
+ label="Relation"
36
+ value={
37
+ labels[entityType][PepType.RELATIVE].RELATION[
38
+ answer.relationToPEP
39
+ ]
40
+ }
141
41
  />
142
42
  )}
143
43
  {answer.businessRelation && (
144
44
  <StaticInput
145
- label={intl.formatMessage(messages.businessRelationLabel)}
146
- value={intl.formatMessage(
147
- businessRelationMessages[answer.businessRelation]
148
- )}
45
+ label="Relation"
46
+ value={
47
+ labels[entityType][PepType.COLLEAGUE].BUSINESS_RELATION[
48
+ answer.businessRelation
49
+ ]
50
+ }
149
51
  />
150
52
  )}
151
53
  {answer.nameOfPEP && (
152
- <StaticInput
153
- label={intl.formatMessage(messages.nameOfPepLabel)}
154
- value={answer.nameOfPEP}
155
- />
54
+ <StaticInput label="Namn på personen" value={answer.nameOfPEP} />
156
55
  )}
157
56
  {answer.birthdayOfPEP && (
158
57
  <StaticInput
159
- label={intl.formatMessage(messages.birthdayOfPEPLabel)}
58
+ label="Födelsedag för personen"
160
59
  value={answer.birthdayOfPEP}
161
60
  />
162
61
  )}
163
62
  {answer.ended ? (
164
63
  <React.Fragment>
165
- <StaticInput
166
- label={intl.formatMessage(messages.statusLabel)}
167
- value={intl.formatMessage(messages.statusEndedValue)}
168
- />
169
- <StaticInput
170
- label={intl.formatMessage(messages.endedLabel)}
171
- value={answer.ended}
172
- />
64
+ <StaticInput label="Status" value="Avslutad" />
65
+ <StaticInput label="Avslutades" value={answer.ended} />
173
66
  </React.Fragment>
174
67
  ) : (
175
- <StaticInput
176
- label={intl.formatMessage(messages.statusLabel)}
177
- value={intl.formatMessage(messages.statusOngoingValue)}
178
- />
68
+ <StaticInput label="Status" value="Pågående" />
179
69
  )}
180
70
  {answer.country && (
181
71
  <StaticInput
182
- label={intl.formatMessage(messages.countryLabel)}
72
+ label="Land"
183
73
  value={country ? country.label : answer.country}
184
74
  />
185
75
  )}
186
- {role && (
187
- <StaticInput
188
- label={intl.formatMessage(messages.roleLabel)}
189
- value={role.text}
190
- />
191
- )}
76
+ {role && <StaticInput label="Roll" value={role.text} />}
192
77
  {answer.ambassadorCountry && (
193
- <StaticInput
194
- label={intl.formatMessage(messages.ambassadorCountryLabel)}
195
- value={
196
- countries.find(
197
- country => country.value === answer.ambassadorCountry
198
- )?.label || answer.ambassadorCountry
199
- }
200
- />
78
+ <StaticInput label="Ambassadörsland" value={answer.ambassadorCountry} />
201
79
  )}
202
80
  {answer.governmentCompany && (
203
- <StaticInput
204
- label={intl.formatMessage(messages.governmentCompanyNameLabel)}
205
- value={answer.governmentCompany}
206
- />
81
+ <StaticInput label="Företagets namn" value={answer.governmentCompany} />
207
82
  )}
208
83
  {answer.governmentCompanyRole && (
209
84
  <StaticInput
210
- label={intl.formatMessage(messages.governmentCompanyRoleLabel)}
85
+ label="Roll på företaget"
211
86
  value={answer.governmentCompanyRole}
212
87
  />
213
88
  )}
214
89
  {answer.internationalOrganisation && (
215
90
  <StaticInput
216
- label={intl.formatMessage(
217
- messages.internationalOrganisationNameLabel
218
- )}
91
+ label="Organisationens namn"
219
92
  value={answer.internationalOrganisation}
220
93
  />
221
94
  )}
222
95
  {answer.internationalOrganisationRole && (
223
96
  <StaticInput
224
- label={intl.formatMessage(
225
- messages.internationalOrganisationRoleLabel
226
- )}
97
+ label="Roll i organisationen"
227
98
  value={answer.internationalOrganisationRole}
228
99
  />
229
100
  )}
230
101
  {militaryRank && (
231
- <StaticInput
232
- label={intl.formatMessage(messages.militaryGradeLabel)}
233
- value={militaryRank.value}
234
- />
102
+ <StaticInput label="Militär grad" value={militaryRank.text} />
235
103
  )}
236
104
  </div>
237
105
  );
package/src/demo/Done.tsx CHANGED
@@ -9,8 +9,12 @@ export function Done() {
9
9
  <div>
10
10
  <h2>Taco hej!</h2>
11
11
  <p>Leverpastej!</p>
12
- <PepAnswers answer={stateToRequest(pepContext.state)} />
13
- <pre>{JSON.stringify(stateToRequest(pepContext.state), null, 2)}</pre>
12
+ <PepAnswers
13
+ answer={{
14
+ ...stateToRequest(pepContext.state),
15
+ ownerName: pepContext.state.ownerName,
16
+ }}
17
+ />
14
18
  </div>
15
19
  );
16
20
  }