-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sean Sundberg <[email protected]>
- Loading branch information
Showing
17 changed files
with
497 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.craTitle { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<CustomerRiskProps> = (props: CustomerRiskProps) => { | ||
|
||
const getContent = (): string => { | ||
if (!props.customerRisk) { | ||
return 'Pending' | ||
} | ||
|
||
if (props.customerRisk.error) { | ||
return 'Error' | ||
} | ||
|
||
return `${props.customerRisk.rating} - ${props.customerRisk.score}` | ||
} | ||
|
||
return ( | ||
<div style={{width: '100%', textAlign: 'left'}}> | ||
<div className="craTitle">Customer risk</div> | ||
<div>{getContent()}</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './CustomerRisk'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
.kycSummaryTitle { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<KycSummaryProps> = (props: KycSummaryProps) => { | ||
|
||
const getContent = (): string => { | ||
if (!props.kycSummary) { | ||
return 'Pending' | ||
} | ||
|
||
if (props.kycSummary.error) { | ||
return 'Error' | ||
} | ||
|
||
return props.kycSummary.summary || '--' | ||
} | ||
|
||
return ( | ||
<div style={{width: '100%', textAlign: 'left'}}> | ||
<div className="kycSummaryTitle">KYC Summary</div> | ||
<div>{getContent()}</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
export * from './KycSummary'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
.negNewsTitle { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<NegativeNewsProps> = (props: NegativeNewsProps) => { | ||
|
||
const getContent = (): string => { | ||
if (!props.news) { | ||
return 'Pending' | ||
} | ||
|
||
if (props.news.error) { | ||
return 'Error' | ||
} | ||
|
||
return props.news.result || '--' | ||
} | ||
|
||
return ( | ||
<div style={{width: '100%', textAlign: 'left'}}> | ||
<div className="negNewsTitle">Negative news - {props.type}</div> | ||
<div>{getContent()}</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
export * from './NegativeNews'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<unknown>; | ||
|
||
constructor() { | ||
this.client = getApolloClient(); | ||
} | ||
|
||
getCountryList(): Promise<FormOptionModel[]> { | ||
return this.client | ||
.query<{listCountries: FormOptionModel[]}>({ | ||
query: LIST_COUNTRIES, | ||
}) | ||
.then(result => result.data.listCountries) | ||
} | ||
|
||
getEntityTypes(): Promise<FormOptionModel[]> { | ||
return this.client | ||
.query<{listEntityTypes: FormOptionModel[]}>({ | ||
query: LIST_ENTITY_TYPES, | ||
}) | ||
.then(result => result.data.listEntityTypes) | ||
} | ||
|
||
getIndustries(): Promise<FormOptionModel[]> { | ||
return this.client | ||
.query<{listIndustryTypes: FormOptionModel[]}>({ | ||
query: LIST_INDUSTRY_TYPES, | ||
}) | ||
.then(result => result.data.listIndustryTypes) | ||
} | ||
|
||
} |
Oops, something went wrong.