From 355bd22225a9d6169dada005d2f1f7af598078b6 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Tue, 19 Sep 2023 23:11:57 -0500 Subject: [PATCH] Update integration logic (#38) Signed-off-by: Sean Sundberg --- src/components/CustomerRisk/CustomerRisk.scss | 3 + src/components/CustomerRisk/CustomerRisk.tsx | 33 ++ src/components/CustomerRisk/index.ts | 1 + src/components/KycSummary/KycSummary.scss | 4 + src/components/KycSummary/KycSummary.tsx | 33 ++ src/components/KycSummary/index.ts | 2 + src/components/NegativeNews/NegativeNews.scss | 4 + src/components/NegativeNews/NegativeNews.tsx | 34 ++ src/components/NegativeNews/index.ts | 2 + src/components/index.ts | 3 + src/models/kyc-case.model.ts | 8 +- src/services/menu-options/index.ts | 2 +- src/services/menu-options/menu-options.api.ts | 2 + .../menu-options/menu-options.graphql.ts | 63 ++ .../menu-options/menu-options.mock.ts | 537 +++++++++--------- .../KYCCaseOutreach/KYCCaseOutreach.tsx | 2 +- .../KYCCasePending/KYCCasePending.tsx | 25 +- 17 files changed, 497 insertions(+), 261 deletions(-) create mode 100644 src/components/CustomerRisk/CustomerRisk.scss create mode 100644 src/components/CustomerRisk/CustomerRisk.tsx create mode 100644 src/components/CustomerRisk/index.ts create mode 100644 src/components/KycSummary/KycSummary.scss create mode 100644 src/components/KycSummary/KycSummary.tsx create mode 100644 src/components/KycSummary/index.ts create mode 100644 src/components/NegativeNews/NegativeNews.scss create mode 100644 src/components/NegativeNews/NegativeNews.tsx create mode 100644 src/components/NegativeNews/index.ts create mode 100644 src/services/menu-options/menu-options.graphql.ts diff --git a/src/components/CustomerRisk/CustomerRisk.scss b/src/components/CustomerRisk/CustomerRisk.scss new file mode 100644 index 0000000..a062391 --- /dev/null +++ b/src/components/CustomerRisk/CustomerRisk.scss @@ -0,0 +1,3 @@ +.craTitle { + font-weight: bold; +} \ No newline at end of file diff --git a/src/components/CustomerRisk/CustomerRisk.tsx b/src/components/CustomerRisk/CustomerRisk.tsx new file mode 100644 index 0000000..f0eba5d --- /dev/null +++ b/src/components/CustomerRisk/CustomerRisk.tsx @@ -0,0 +1,33 @@ + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import React from 'react'; + +import './CustomerRisk.scss'; +import {CustomerRiskAssessmentModel} from "../../models"; + +export interface CustomerRiskProps { + customerRisk?: CustomerRiskAssessmentModel +} + +export const CustomerRisk: React.FunctionComponent = (props: CustomerRiskProps) => { + + const getContent = (): string => { + if (!props.customerRisk) { + return 'Pending' + } + + if (props.customerRisk.error) { + return 'Error' + } + + return `${props.customerRisk.rating} - ${props.customerRisk.score}` + } + + return ( +
+
Customer risk
+
{getContent()}
+
+ ) +} diff --git a/src/components/CustomerRisk/index.ts b/src/components/CustomerRisk/index.ts new file mode 100644 index 0000000..44089b3 --- /dev/null +++ b/src/components/CustomerRisk/index.ts @@ -0,0 +1 @@ +export * from './CustomerRisk'; diff --git a/src/components/KycSummary/KycSummary.scss b/src/components/KycSummary/KycSummary.scss new file mode 100644 index 0000000..9999a01 --- /dev/null +++ b/src/components/KycSummary/KycSummary.scss @@ -0,0 +1,4 @@ + +.kycSummaryTitle { + font-weight: bold; +} diff --git a/src/components/KycSummary/KycSummary.tsx b/src/components/KycSummary/KycSummary.tsx new file mode 100644 index 0000000..7558160 --- /dev/null +++ b/src/components/KycSummary/KycSummary.tsx @@ -0,0 +1,33 @@ + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import React from 'react'; + +import './KycSummary.scss'; +import {KycCaseSummaryModel} from "../../models"; + +export interface KycSummaryProps { + kycSummary: KycCaseSummaryModel; +} + +export const KycSummary: React.FunctionComponent = (props: KycSummaryProps) => { + + const getContent = (): string => { + if (!props.kycSummary) { + return 'Pending' + } + + if (props.kycSummary.error) { + return 'Error' + } + + return props.kycSummary.summary || '--' + } + + return ( +
+
KYC Summary
+
{getContent()}
+
+ ) +} diff --git a/src/components/KycSummary/index.ts b/src/components/KycSummary/index.ts new file mode 100644 index 0000000..ec53750 --- /dev/null +++ b/src/components/KycSummary/index.ts @@ -0,0 +1,2 @@ + +export * from './KycSummary'; diff --git a/src/components/NegativeNews/NegativeNews.scss b/src/components/NegativeNews/NegativeNews.scss new file mode 100644 index 0000000..ff6dd2b --- /dev/null +++ b/src/components/NegativeNews/NegativeNews.scss @@ -0,0 +1,4 @@ + +.negNewsTitle { + font-weight: bold; +} diff --git a/src/components/NegativeNews/NegativeNews.tsx b/src/components/NegativeNews/NegativeNews.tsx new file mode 100644 index 0000000..3d4c020 --- /dev/null +++ b/src/components/NegativeNews/NegativeNews.tsx @@ -0,0 +1,34 @@ + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import React from 'react'; + +import './NegativeNews.scss'; +import {NegativeScreeningModel} from "../../models"; + +export interface NegativeNewsProps { + type: string; + news?: NegativeScreeningModel; +} + +export const NegativeNews: React.FunctionComponent = (props: NegativeNewsProps) => { + + const getContent = (): string => { + if (!props.news) { + return 'Pending' + } + + if (props.news.error) { + return 'Error' + } + + return props.news.result || '--' + } + + return ( +
+
Negative news - {props.type}
+
{getContent()}
+
+ ) +} diff --git a/src/components/NegativeNews/index.ts b/src/components/NegativeNews/index.ts new file mode 100644 index 0000000..09cfb6e --- /dev/null +++ b/src/components/NegativeNews/index.ts @@ -0,0 +1,2 @@ + +export * from './NegativeNews'; diff --git a/src/components/index.ts b/src/components/index.ts index d26fe69..eca53ca 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -11,3 +11,6 @@ export * from './CountrySelect' export * from './EntityTypeSelect' export * from './IndustryTypeSelect' export * from './AtomSelect' +export * from './CustomerRisk' +export * from './NegativeNews' +export * from './KycSummary' diff --git a/src/models/kyc-case.model.ts b/src/models/kyc-case.model.ts index acf6d07..16c1dee 100644 --- a/src/models/kyc-case.model.ts +++ b/src/models/kyc-case.model.ts @@ -90,10 +90,10 @@ export interface DocumentInputModel { export const createEmptyCustomer = (): CustomerModel => { return { name: '', - countryOfResidence: 'US', + countryOfResidence: 'United States', personalIdentificationNumber: '', - industryType: '', - entityType: '', + industryType: 'Private Limited Company', + entityType: 'Growing of rice', } } @@ -119,7 +119,7 @@ export const createEmptyReviewCase = (id: string): ReviewCaseModel => { id, counterparty: { name: '', - countryOfResidence: 'US' + countryOfResidence: 'United States' }, customerOutreach: '', documents: [] diff --git a/src/services/menu-options/index.ts b/src/services/menu-options/index.ts index ddb0572..31765d2 100644 --- a/src/services/menu-options/index.ts +++ b/src/services/menu-options/index.ts @@ -1,4 +1,4 @@ -import {MenuOptionsMock} from "./menu-options.mock.ts"; +import {MenuOptionsMock} from "./menu-options.mock"; export * from './menu-options.api'; diff --git a/src/services/menu-options/menu-options.api.ts b/src/services/menu-options/menu-options.api.ts index eca0cca..08517de 100644 --- a/src/services/menu-options/menu-options.api.ts +++ b/src/services/menu-options/menu-options.api.ts @@ -2,4 +2,6 @@ import {FormOptionModel} from "../../models"; export abstract class MenuOptionsApi { abstract getCountryList(): Promise; + abstract getIndustries(): Promise; + abstract getEntityTypes(): Promise; } diff --git a/src/services/menu-options/menu-options.graphql.ts b/src/services/menu-options/menu-options.graphql.ts new file mode 100644 index 0000000..94ad2af --- /dev/null +++ b/src/services/menu-options/menu-options.graphql.ts @@ -0,0 +1,63 @@ +import {ApolloClient, gql} from "@apollo/client"; + +import {MenuOptionsApi} from "./menu-options.api"; +import {getApolloClient} from "../../backends"; +import {FormOptionModel} from "../../models"; + +const LIST_COUNTRIES = gql` + query ListCountries { + listCountries { + text + value + } + } +` +const LIST_ENTITY_TYPES = gql` + query ListEntityTypes { + listEntityTypes { + text + value + } + } +` +const LIST_INDUSTRY_TYPES = gql` + query ListIndustryTypes { + listIndustryTypes { + text + value + } + } +` + +export class MenuOptionsGraphql implements MenuOptionsApi { + client: ApolloClient; + + constructor() { + this.client = getApolloClient(); + } + + getCountryList(): Promise { + return this.client + .query<{listCountries: FormOptionModel[]}>({ + query: LIST_COUNTRIES, + }) + .then(result => result.data.listCountries) + } + + getEntityTypes(): Promise { + return this.client + .query<{listEntityTypes: FormOptionModel[]}>({ + query: LIST_ENTITY_TYPES, + }) + .then(result => result.data.listEntityTypes) + } + + getIndustries(): Promise { + return this.client + .query<{listIndustryTypes: FormOptionModel[]}>({ + query: LIST_INDUSTRY_TYPES, + }) + .then(result => result.data.listIndustryTypes) + } + +} \ No newline at end of file diff --git a/src/services/menu-options/menu-options.mock.ts b/src/services/menu-options/menu-options.mock.ts index 27719fc..5860b64 100644 --- a/src/services/menu-options/menu-options.mock.ts +++ b/src/services/menu-options/menu-options.mock.ts @@ -2,8 +2,271 @@ import {MenuOptionsApi} from "./menu-options.api"; import {FormOptionModel} from "../../models"; import {parseCsv} from "../../utils"; -const industryTypesCsv = `Code,Division,Industry ,Strategic Rating, -01.11,Growing of non-perennial crops,"Growing of cereals (except rice), leguminous crops and oil seeds",MEDIUM, +const countryTypesCsv = `NULL,Missing Data,MEDIUM, +NOT_FOUND,Data Not Recognised,MEDIUM, +XH,Other International Org.,LOW, +QU,Unknown,MEDIUM, +XB,Abu Dhabi,HIGH, +AF,Afghanistan,REFER-SANCTIONS, +AX,Aland Islands,HIGH, +AL,Albania,AUTO-HIGH, +DZ,Algeria,HIGH, +AS,American Samoa,HIGH, +AD,Andorra,HIGH, +AO,Angola,HIGH, +AI,Anguilla,HIGH, +AQ,Antarctica,HIGH, +AG,Antigua And Barbuda,HIGH, +AR,Argentina,HIGH, +AM,Armenia,HIGH, +AW,Aruba,HIGH, +AU,Australia,MEDIUM, +AT,Austria,LOW, +AZ,Azerbaijan,HIGH, +BS,Bahamas,AUTO-HIGH, +BH,Bahrain,HIGH, +BD,Bangladesh,HIGH, +BB,Barbados,AUTO-HIGH, +BY,Belarus,REFER-SANCTIONS, +BE,Belgium,LOW, +BZ,Belize,HIGH, +BJ,Benin,HIGH, +BM,Bermuda,HIGH, +BT,Bhutan,MEDIUM, +BO,Bolivia,HIGH, +BQ,"Bonaire, Sint Eust And Saba",HIGH, +BA,Bosnia And Herzegovina,REFER-SANCTIONS, +BW,Botswana,AUTO-HIGH, +BV,Bouvet Island,HIGH, +BR,Brazil,HIGH, +XD,British Antarctic Territory,HIGH, +IO,British Indian Ocean Territory,HIGH, +VG,British Virgin Islands,HIGH, +BN,Brunei Darussalam,HIGH, +BG,Bulgaria,MEDIUM, +BF,Burkina Faso,AUTO-HIGH, +BI,Burundi,REFER-SANCTIONS, +KH,Cambodia,AUTO-HIGH, +CM,Cameroon,HIGH, +CA,Canada,LOW, +XE,Canton & Enderbury Islands,HIGH, +CV,Cape Verde,HIGH, +KY,Cayman Islands,AUTO-HIGH, +CF,Central African Republic,REFER-SANCTIONS, +TD,Chad,HIGH, +CL,Chile,LOW, +CN,China,REFER-SANCTIONS, +CX,Christmas Island,HIGH, +CC,Cocos Keeling Islands,HIGH, +CO,Colombia,HIGH, +KM,Comoros,HIGH, +CG,Congo (Republic Of),HIGH, +CK,Cook Islands,HIGH, +CR,Costa Rica,HIGH, +HR,Croatia,LOW, +CU,Cuba,REFER-SANCTIONS, +CW,Curacao,HIGH, +CY,Cyprus,HIGH, +CZ,Czech Republic,LOW, +CD,Democratic Republic Of Congo,REFER-SANCTIONS, +DK,Denmark,LOW, +DJ,Djibouti,HIGH, +DM,Dominica,HIGH, +DO,Dominican Republic,HIGH, +XC,Dubai,HIGH, +TL,East Timor,HIGH, +EC,Ecuador,HIGH, +EG,Egypt,REFER-SANCTIONS, +SV,El Salvador,HIGH, +GQ,Equatorial Guinea,HIGH, +ER,Eritrea,HIGH, +EE,Estonia,HIGH, +ET,Ethiopia,HIGH, +FK,Falkland Islands (Malvinas),HIGH, +FO,Faroe Islands,HIGH, +FJ,Fiji,HIGH, +FI,Finland,LOW, +FR,France,LOW, +GF,French Guiana,HIGH, +PF,French Polynesia,HIGH, +TF,French Southern Territories,HIGH, +GA,Gabon,HIGH, +GM,Gambia,HIGH, +GE,Georgia,HIGH, +DE,Germany,LOW, +GH,Ghana,AUTO-HIGH, +GI,Gibraltar,MEDIUM, +GR,Greece,LOW, +GL,Greenland,HIGH, +GD,Grenada,HIGH, +GP,Guadeloupe,HIGH, +GU,Guam,HIGH, +GT,Guatemala,HIGH, +GG,Guernsey,MEDIUM, +GN,Guinea,REFER-SANCTIONS, +GW,Guinea-Bissau,REFER-SANCTIONS, +GY,Guyana,HIGH, +HT,Haiti,HIGH, +HM,Heard & Macdonald Islands,HIGH, +HN,Honduras,HIGH, +HK,Hong Kong,HIGH, +HU,Hungary,MEDIUM, +IS,Iceland,LOW, +IN,India,HIGH, +ID,Indonesia,HIGH, +IR,"Iran, Islamic Republic Of",REFER-PROHIBITED, +IQ,Iraq,REFER-SANCTIONS, +IE,Ireland (Republic Of Ireland),LOW, +IM,Isle Of Man,MEDIUM, +IL,Israel,MEDIUM, +IT,Italy,LOW, +CI,Ivory Coast,HIGH, +JM,Jamaica,AUTO-HIGH, +JP,Japan,LOW, +JE,Jersey,MEDIUM, +JO,Jordan,HIGH, +KZ,Kazakhstan,HIGH, +KE,Kenya,HIGH, +KI,Kiribati,HIGH, +QZ,Kosovo,HIGH, +KW,Kuwait,HIGH, +KG,Kyrgyzstan,HIGH, +LA,Laos,HIGH, +LV,Latvia,HIGH, +LB,Lebanon,REFER-SANCTIONS, +LS,Lesotho,MEDIUM, +LR,Liberia,HIGH, +LY,Libya,REFER-SANCTIONS, +LI,Liechtenstein,HIGH, +LT,Lithuania,HIGH, +LU,Luxembourg,MEDIUM, +MO,Macao,HIGH, +MK,"Macedonia (Former Yugo Rep,)",HIGH, +MG,Madagascar ,HIGH, +MW,Malawi,HIGH, +MY,Malaysia,HIGH, +MV,Maldives,HIGH, +ML,Mali,REFER-SANCTIONS, +MT,Malta,MEDIUM, +MH,Marshall Islands,MEDIUM, +MQ,Martinique,HIGH, +MR,Mauritania,HIGH, +MU,Mauritius,AUTO-HIGH, +YT,Mayotte,HIGH, +MX,Mexico,HIGH, +FM,Micronesia,LOW, +MD,Moldova,HIGH, +MC,Monaco,HIGH, +MN,Mongolia,AUTO-HIGH, +ME,Montenegro,REFER-SANCTIONS, +MS,Montserrat,HIGH, +MA,Morocco,AUTO-HIGH, +MZ,Mozambique,HIGH, +MM,Myanmar (Burma),REFER-SANCTIONS, +NA,Namibia,MEDIUM, +NR,Nauru,HIGH, +NP,Nepal,HIGH, +NL,Netherlands,LOW, +AN,Netherlands Antilles,HIGH, +NC,New Caledonia,HIGH, +NZ,New Zealand,LOW, +NI,Nicaragua,REFER-SANCTIONS, +NE,Niger,HIGH, +NG,Nigeria,HIGH, +NU,Niue,HIGH, +NF,Norfolk Island,HIGH, +KP,North Korea (Dem Peop Rep Of),REFER-PROHIBITED, +MP,Northern Mariana Islands,HIGH, +NO,Norway,LOW, +OM,Oman,HIGH, +PK,Pakistan,AUTO-HIGH, +PW,Palau,HIGH, +PS,Palestine,HIGH, +PA,Panama,AUTO-HIGH, +PG,Papua New Guinea,HIGH, +PY,Paraguay,HIGH, +PE,Peru,HIGH, +PH,Philippines,HIGH, +PN,Pitcairn Islands,HIGH, +PL,Poland,LOW, +PT,Portugal,LOW, +PR,Puerto Rico,LOW, +QA,Qatar,HIGH, +RS,Republic Of Serbia,REFER-SANCTIONS, +RE,Reunion,HIGH, +RO,Romania,HIGH, +RU,Russian Federation,REFER-SANCTIONS, +RW,Rwanda,MEDIUM, +BL,Saint Barthelemy,HIGH, +SH,Saint Helena,HIGH, +KN,Saint Kitts & Nevis,HIGH, +LC,Saint Lucia,HIGH, +MF,Saint Martin French Part,HIGH, +PM,Saint Pierre & Miquelon,HIGH, +VC,Saint Vincent & The Grenadines,HIGH, +WS,Samoa,HIGH, +SM,San Marino,HIGH, +ST,Sao Tome & Principe,MEDIUM, +SA,Saudi Arabia,HIGH, +SN,Senegal,AUTO-HIGH, +CS,Serbia And Montenegro,REFER-SANCTIONS, +SC,Seychelles,HIGH, +SL,Sierra Leone,HIGH, +SG,Singapore ,LOW, +SX,Sint Maarten,HIGH, +SK,Slovakia,LOW, +SI,Slovenia,LOW, +SB,Solomon Islands,HIGH, +SO,Somalia,REFER-SANCTIONS, +ZA,South Africa,MEDIUM, +GS,South Georgia & South Sandwich Islands,HIGH, +KR,South Korea (Republic Of),LOW, +SS,South Sudan,REFER-SANCTIONS, +ES,Spain,LOW, +LK,Sri Lanka,HIGH, +SD,Sudan,REFER-SANCTIONS, +SR,Suriname,HIGH, +SJ,Svalbard,HIGH, +SZ,Eswatini (Swaziland),HIGH, +SE,Sweden,LOW, +CH,Switzerland,MEDIUM, +SY,Syria,REFER-PROHIBITED, +TW,Taiwan,MEDIUM, +TJ,Tajikistan,HIGH, +TZ,Tanzania,HIGH, +TH,Thailand,HIGH, +TG,Togo,HIGH, +TK,Tokelau,HIGH, +TO,Tonga,LOW, +TT,Trinidad And Tobago,AUTO-HIGH, +TN,Tunisia,HIGH, +TR,Turkey,REFER-SANCTIONS, +TM,Turkmenistan,HIGH, +TC,Turks And Caicos Islands,HIGH, +TV,Tuvalu,HIGH, +UG,Uganda,AUTO-HIGH, +UA,Ukraine,REFER-SANCTIONS, +AE,United Arab Emirates,HIGH, +XF,United Arab Emirates (Other),HIGH, +GB,United Kingdom,LOW, +US,United States,LOW, +UY,Uruguay,LOW, +UM,US Minor Outlying Islands,HIGH, +VI,US Virgin Islands,HIGH, +UZ,Uzbekistan,HIGH, +VU,Vanuatu,AUTO-HIGH, +VA,Vatican City State,HIGH, +VE,Venezuela,REFER-SANCTIONS, +VN,Vietnam,HIGH, +WF,Wallis & Futuna,HIGH, +EH,Western Sahara,HIGH, +YE,Yemen,REFER-SANCTIONS, +YU,"Macedonia (Former Yugo Rep,)",HIGH, +ZR,Zaire (Democratic Republic Of Congo),REFER-SANCTIONS, +ZM,Zambia,HIGH, +ZW,Zimbabwe,REFER-SANCTIONS,` + +const industryTypesCsv = `01.11,Growing of non-perennial crops,"Growing of cereals (except rice), leguminous crops and oil seeds",MEDIUM, 01.12,Growing of non-perennial crops,Growing of rice,LOW, 01.13,Growing of non-perennial crops,"Growing of vegetables and melons, roots and tubers",MEDIUM, 01.14,Growing of non-perennial crops,Growing of sugar cane,LOW, @@ -742,9 +1005,7 @@ const industryTypesCsv = `Code,Division,Industry ,Strategic Rating, NOT_FOUND,,Data Not Recognised,HIGH, NULL,,MISSING DATA,HIGH, `; -const entityTypesCsv = ` -code,description,risk_weight -01,Private Limited Company,MEDIUM +const entityTypesCsv = `01,Private Limited Company,MEDIUM 02,Sole Trader,MEDIUM 03,Limited Liability Partnership,MEDIUM 04,Clubs,HIGH @@ -761,254 +1022,22 @@ code,description,risk_weight let entityTypes: FormOptionModel[]; let industryTypes: FormOptionModel[]; +let countryTypes: FormOptionModel[]; export class MenuOptionsMock implements MenuOptionsApi { async getCountryList(): Promise { - return [ - {text: 'Afghanistan', value: 'AF'}, - {text: 'Ă…land Islands', value: 'AX'}, - {text: 'Albania', value: 'AL'}, - {text: 'Algeria', value: 'DZ'}, - {text: 'American Samoa', value: 'AS'}, - {text: 'AndorrA', value: 'AD'}, - {text: 'Angola', value: 'AO'}, - {text: 'Anguilla', value: 'AI'}, - {text: 'Antarctica', value: 'AQ'}, - {text: 'Antigua and Barbuda', value: 'AG'}, - {text: 'Argentina', value: 'AR'}, - {text: 'Armenia', value: 'AM'}, - {text: 'Aruba', value: 'AW'}, - {text: 'Australia', value: 'AU'}, - {text: 'Austria', value: 'AT'}, - {text: 'Azerbaijan', value: 'AZ'}, - {text: 'Bahamas', value: 'BS'}, - {text: 'Bahrain', value: 'BH'}, - {text: 'Bangladesh', value: 'BD'}, - {text: 'Barbados', value: 'BB'}, - {text: 'Belarus', value: 'BY'}, - {text: 'Belgium', value: 'BE'}, - {text: 'Belize', value: 'BZ'}, - {text: 'Benin', value: 'BJ'}, - {text: 'Bermuda', value: 'BM'}, - {text: 'Bhutan', value: 'BT'}, - {text: 'Bolivia', value: 'BO'}, - {text: 'Bosnia and Herzegovina', value: 'BA'}, - {text: 'Botswana', value: 'BW'}, - {text: 'Bouvet Island', value: 'BV'}, - {text: 'Brazil', value: 'BR'}, - {text: 'British Indian Ocean Territory', value: 'IO'}, - {text: 'Brunei Darussalam', value: 'BN'}, - {text: 'Bulgaria', value: 'BG'}, - {text: 'Burkina Faso', value: 'BF'}, - {text: 'Burundi', value: 'BI'}, - {text: 'Cambodia', value: 'KH'}, - {text: 'Cameroon', value: 'CM'}, - {text: 'Canada', value: 'CA'}, - {text: 'Cape Verde', value: 'CV'}, - {text: 'Cayman Islands', value: 'KY'}, - {text: 'Central African Republic', value: 'CF'}, - {text: 'Chad', value: 'TD'}, - {text: 'Chile', value: 'CL'}, - {text: 'China', value: 'CN'}, - {text: 'Christmas Island', value: 'CX'}, - {text: 'Cocos (Keeling) Islands', value: 'CC'}, - {text: 'Colombia', value: 'CO'}, - {text: 'Comoros', value: 'KM'}, - {text: 'Congo', value: 'CG'}, - {text: 'Congo, The Democratic Republic of the', value: 'CD'}, - {text: 'Cook Islands', value: 'CK'}, - {text: 'Costa Rica', value: 'CR'}, - {text: 'Cote D\'Ivoire', value: 'CI'}, - {text: 'Croatia', value: 'HR'}, - {text: 'Cuba', value: 'CU'}, - {text: 'Cyprus', value: 'CY'}, - {text: 'Czech Republic', value: 'CZ'}, - {text: 'Denmark', value: 'DK'}, - {text: 'Djibouti', value: 'DJ'}, - {text: 'Dominica', value: 'DM'}, - {text: 'Dominican Republic', value: 'DO'}, - {text: 'Ecuador', value: 'EC'}, - {text: 'Egypt', value: 'EG'}, - {text: 'El Salvador', value: 'SV'}, - {text: 'Equatorial Guinea', value: 'GQ'}, - {text: 'Eritrea', value: 'ER'}, - {text: 'Estonia', value: 'EE'}, - {text: 'Ethiopia', value: 'ET'}, - {text: 'Falkland Islands (Malvinas)', value: 'FK'}, - {text: 'Faroe Islands', value: 'FO'}, - {text: 'Fiji', value: 'FJ'}, - {text: 'Finland', value: 'FI'}, - {text: 'France', value: 'FR'}, - {text: 'French Guiana', value: 'GF'}, - {text: 'French Polynesia', value: 'PF'}, - {text: 'French Southern Territories', value: 'TF'}, - {text: 'Gabon', value: 'GA'}, - {text: 'Gambia', value: 'GM'}, - {text: 'Georgia', value: 'GE'}, - {text: 'Germany', value: 'DE'}, - {text: 'Ghana', value: 'GH'}, - {text: 'Gibraltar', value: 'GI'}, - {text: 'Greece', value: 'GR'}, - {text: 'Greenland', value: 'GL'}, - {text: 'Grenada', value: 'GD'}, - {text: 'Guadeloupe', value: 'GP'}, - {text: 'Guam', value: 'GU'}, - {text: 'Guatemala', value: 'GT'}, - {text: 'Guernsey', value: 'GG'}, - {text: 'Guinea', value: 'GN'}, - {text: 'Guinea-Bissau', value: 'GW'}, - {text: 'Guyana', value: 'GY'}, - {text: 'Haiti', value: 'HT'}, - {text: 'Heard Island and Mcdonald Islands', value: 'HM'}, - {text: 'Holy See (Vatican City State)', value: 'VA'}, - {text: 'Honduras', value: 'HN'}, - {text: 'Hong Kong', value: 'HK'}, - {text: 'Hungary', value: 'HU'}, - {text: 'Iceland', value: 'IS'}, - {text: 'India', value: 'IN'}, - {text: 'Indonesia', value: 'ID'}, - {text: 'Iran, Islamic Republic Of', value: 'IR'}, - {text: 'Iraq', value: 'IQ'}, - {text: 'Ireland', value: 'IE'}, - {text: 'Isle of Man', value: 'IM'}, - {text: 'Israel', value: 'IL'}, - {text: 'Italy', value: 'IT'}, - {text: 'Jamaica', value: 'JM'}, - {text: 'Japan', value: 'JP'}, - {text: 'Jersey', value: 'JE'}, - {text: 'Jordan', value: 'JO'}, - {text: 'Kazakhstan', value: 'KZ'}, - {text: 'Kenya', value: 'KE'}, - {text: 'Kiribati', value: 'KI'}, - {text: 'Korea, Democratic People\'S Republic of', value: 'KP'}, - {text: 'Korea, Republic of', value: 'KR'}, - {text: 'Kuwait', value: 'KW'}, - {text: 'Kyrgyzstan', value: 'KG'}, - {text: 'Lao People\'S Democratic Republic', value: 'LA'}, - {text: 'Latvia', value: 'LV'}, - {text: 'Lebanon', value: 'LB'}, - {text: 'Lesotho', value: 'LS'}, - {text: 'Liberia', value: 'LR'}, - {text: 'Libyan Arab Jamahiriya', value: 'LY'}, - {text: 'Liechtenstein', value: 'LI'}, - {text: 'Lithuania', value: 'LT'}, - {text: 'Luxembourg', value: 'LU'}, - {text: 'Macao', value: 'MO'}, - {text: 'Macedonia, The Former Yugoslav Republic of', value: 'MK'}, - {text: 'Madagascar', value: 'MG'}, - {text: 'Malawi', value: 'MW'}, - {text: 'Malaysia', value: 'MY'}, - {text: 'Maldives', value: 'MV'}, - {text: 'Mali', value: 'ML'}, - {text: 'Malta', value: 'MT'}, - {text: 'Marshall Islands', value: 'MH'}, - {text: 'Martinique', value: 'MQ'}, - {text: 'Mauritania', value: 'MR'}, - {text: 'Mauritius', value: 'MU'}, - {text: 'Mayotte', value: 'YT'}, - {text: 'Mexico', value: 'MX'}, - {text: 'Micronesia, Federated States of', value: 'FM'}, - {text: 'Moldova, Republic of', value: 'MD'}, - {text: 'Monaco', value: 'MC'}, - {text: 'Mongolia', value: 'MN'}, - {text: 'Montserrat', value: 'MS'}, - {text: 'Morocco', value: 'MA'}, - {text: 'Mozambique', value: 'MZ'}, - {text: 'Myanmar', value: 'MM'}, - {text: 'Namibia', value: 'NA'}, - {text: 'Nauru', value: 'NR'}, - {text: 'Nepal', value: 'NP'}, - {text: 'Netherlands', value: 'NL'}, - {text: 'Netherlands Antilles', value: 'AN'}, - {text: 'New Caledonia', value: 'NC'}, - {text: 'New Zealand', value: 'NZ'}, - {text: 'Nicaragua', value: 'NI'}, - {text: 'Niger', value: 'NE'}, - {text: 'Nigeria', value: 'NG'}, - {text: 'Niue', value: 'NU'}, - {text: 'Norfolk Island', value: 'NF'}, - {text: 'Northern Mariana Islands', value: 'MP'}, - {text: 'Norway', value: 'NO'}, - {text: 'Oman', value: 'OM'}, - {text: 'Pakistan', value: 'PK'}, - {text: 'Palau', value: 'PW'}, - {text: 'Palestinian Territory, Occupied', value: 'PS'}, - {text: 'Panama', value: 'PA'}, - {text: 'Papua New Guinea', value: 'PG'}, - {text: 'Paraguay', value: 'PY'}, - {text: 'Peru', value: 'PE'}, - {text: 'Philippines', value: 'PH'}, - {text: 'Pitcairn', value: 'PN'}, - {text: 'Poland', value: 'PL'}, - {text: 'Portugal', value: 'PT'}, - {text: 'Puerto Rico', value: 'PR'}, - {text: 'Qatar', value: 'QA'}, - {text: 'Reunion', value: 'RE'}, - {text: 'Romania', value: 'RO'}, - {text: 'Russian Federation', value: 'RU'}, - {text: 'RWANDA', value: 'RW'}, - {text: 'Saint Helena', value: 'SH'}, - {text: 'Saint Kitts and Nevis', value: 'KN'}, - {text: 'Saint Lucia', value: 'LC'}, - {text: 'Saint Pierre and Miquelon', value: 'PM'}, - {text: 'Saint Vincent and the Grenadines', value: 'VC'}, - {text: 'Samoa', value: 'WS'}, - {text: 'San Marino', value: 'SM'}, - {text: 'Sao Tome and Principe', value: 'ST'}, - {text: 'Saudi Arabia', value: 'SA'}, - {text: 'Senegal', value: 'SN'}, - {text: 'Serbia and Montenegro', value: 'CS'}, - {text: 'Seychelles', value: 'SC'}, - {text: 'Sierra Leone', value: 'SL'}, - {text: 'Singapore', value: 'SG'}, - {text: 'Slovakia', value: 'SK'}, - {text: 'Slovenia', value: 'SI'}, - {text: 'Solomon Islands', value: 'SB'}, - {text: 'Somalia', value: 'SO'}, - {text: 'South Africa', value: 'ZA'}, - {text: 'South Georgia and the South Sandwich Islands', value: 'GS'}, - {text: 'Spain', value: 'ES'}, - {text: 'Sri Lanka', value: 'LK'}, - {text: 'Sudan', value: 'SD'}, - {text: 'Suritext', value: 'SR'}, - {text: 'Svalbard and Jan Mayen', value: 'SJ'}, - {text: 'Swaziland', value: 'SZ'}, - {text: 'Sweden', value: 'SE'}, - {text: 'Switzerland', value: 'CH'}, - {text: 'Syrian Arab Republic', value: 'SY'}, - {text: 'Taiwan, Province of China', value: 'TW'}, - {text: 'Tajikistan', value: 'TJ'}, - {text: 'Tanzania, United Republic of', value: 'TZ'}, - {text: 'Thailand', value: 'TH'}, - {text: 'Timor-Leste', value: 'TL'}, - {text: 'Togo', value: 'TG'}, - {text: 'Tokelau', value: 'TK'}, - {text: 'Tonga', value: 'TO'}, - {text: 'Trinidad and Tobago', value: 'TT'}, - {text: 'Tunisia', value: 'TN'}, - {text: 'Turkey', value: 'TR'}, - {text: 'Turkmenistan', value: 'TM'}, - {text: 'Turks and Caicos Islands', value: 'TC'}, - {text: 'Tuvalu', value: 'TV'}, - {text: 'Uganda', value: 'UG'}, - {text: 'Ukraine', value: 'UA'}, - {text: 'United Arab Emirates', value: 'AE'}, - {text: 'United Kingdom', value: 'GB'}, - {text: 'United States', value: 'US'}, - {text: 'United States Minor Outlying Islands', value: 'UM'}, - {text: 'Uruguay', value: 'UY'}, - {text: 'Uzbekistan', value: 'UZ'}, - {text: 'Vanuatu', value: 'VU'}, - {text: 'Venezuela', value: 'VE'}, - {text: 'Viet Nam', value: 'VN'}, - {text: 'Virgin Islands, British', value: 'VG'}, - {text: 'Virgin Islands, U.S.', value: 'VI'}, - {text: 'Wallis and Futuna', value: 'WF'}, - {text: 'Western Sahara', value: 'EH'}, - {text: 'Yemen', value: 'YE'}, - {text: 'Zambia', value: 'ZM'}, - {text: 'Zimbabwe', value: 'ZW'} - ] + if (countryTypes) { + return countryTypes; + } + + return countryTypes = countryTypesCsv + .split('\n') + .map(parseCsv) + .filter((_, index) => index !== 0) + .map(values => ({ + value: '' + values[1], + text: '' + values[1], + })) } async getEntityTypes(): Promise { @@ -1019,11 +1048,12 @@ export class MenuOptionsMock implements MenuOptionsApi { return entityTypes = entityTypesCsv .split('\n') .map(parseCsv) + .filter((_, index) => index !== 0) .map(values => ({ - value: '' + values[0], + value: '' + values[1], text: '' + values[1], })) - .filter(val => val.value !== 'code'); + .filter(val => val.value !== 'Code'); } async getIndustries(): Promise { @@ -1034,8 +1064,9 @@ export class MenuOptionsMock implements MenuOptionsApi { return industryTypes = industryTypesCsv .split('\n') .map(parseCsv) + .filter((_, index) => index !== 0) .map(values => ({ - value: '' + values[0], + value: '' + values[2], text: '' + values[2], })) .filter(val => val.value !== 'Code'); diff --git a/src/views/KYC/KYCCaseDetail/KYCCaseOutreach/KYCCaseOutreach.tsx b/src/views/KYC/KYCCaseDetail/KYCCaseOutreach/KYCCaseOutreach.tsx index ae45b28..789229e 100644 --- a/src/views/KYC/KYCCaseDetail/KYCCaseOutreach/KYCCaseOutreach.tsx +++ b/src/views/KYC/KYCCaseDetail/KYCCaseOutreach/KYCCaseOutreach.tsx @@ -39,7 +39,7 @@ export const KYCCaseOutreach: React.FunctionComponent = (pro return (
-

Initial Review

+

Outreach

= (pro return ( -

Initial Review

+

Pending information

= (pro readOnly={true} style={{marginBottom: '20px'}} /> + +
= (pro style={{marginBottom: '20px'}} /> + + + +
)