TP-80536 | risk segmentation (#1105)
* TP-80536 | risk segmentation * TP-80536 | risk segmentation * TP-80536 | risk segmentation
This commit is contained in:
@@ -31,7 +31,6 @@ import { interpolatePathParams } from '@cp/utils/interpolate';
|
||||
import APP_ROUTES from '@cp/src/layout/Routes';
|
||||
import CustomerLoanTypePopper from '@cp/pages/CaseDetails/components/CustomerSummary/CustomerLoanTypePopper';
|
||||
import cx from 'classnames';
|
||||
import RiskSegmentation from '@cp/pages/CaseDetails/components/RiskSegmentation';
|
||||
import { RiskRating } from '@cp/pages/CaseDetails/components/CustomerSummary/interfaces';
|
||||
import { Roles } from '@cp/pages/auth/constants/AuthConstants';
|
||||
|
||||
@@ -72,14 +71,12 @@ const CustomerSummary = () => {
|
||||
<div
|
||||
className={cx(styles.customerDetailContainer, {
|
||||
[styles.containerWithAgentName]: !!assignedFieldAgent,
|
||||
relative: true
|
||||
'!bg-[--pale-red]': isRiskSegmentationVisible && riskSegment === RiskRating.HIGH_RISK,
|
||||
'!bg-[--orange-oldlase]':
|
||||
isRiskSegmentationVisible && riskSegment === RiskRating.MEDIUM_RISK,
|
||||
'!bg-[--green-light]': isRiskSegmentationVisible && riskSegment === RiskRating.LOW_RISK
|
||||
})}
|
||||
>
|
||||
{/* {isRiskSegmentationVisible && riskSegment ? (
|
||||
<div className="absolute top-0 left-0">
|
||||
<RiskSegmentation riskSegment={riskSegment} />
|
||||
</div>
|
||||
) : null} */}
|
||||
{assignedFieldAgent ? (
|
||||
<Typography variant="h6" className={styles.assignedAgent}>
|
||||
Assigned FE: {assignedFieldAgent}
|
||||
|
||||
@@ -13,15 +13,7 @@ export enum EMPLOYMENT_TYPE {
|
||||
}
|
||||
|
||||
export const RiskRating = {
|
||||
['LOW_RISK']: 'Rare Defaulter',
|
||||
['MEDIUM_RISK']: 'Occasional defaulter',
|
||||
['HIGH_RISK']: 'Regular Defaulter'
|
||||
};
|
||||
type RiskRatingColor = {
|
||||
[key: string]: TagColors;
|
||||
};
|
||||
export const RiskRatingColor: RiskRatingColor = {
|
||||
LOW_RISK: 'green',
|
||||
MEDIUM_RISK: 'orange',
|
||||
HIGH_RISK: 'red'
|
||||
['LOW_RISK']: 'LOW_RISK',
|
||||
['MEDIUM_RISK']: 'MEDIUM_RISK',
|
||||
['HIGH_RISK']: 'HIGH_RISK'
|
||||
};
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Tag } from '@primitives';
|
||||
import {
|
||||
RiskRating,
|
||||
RiskRatingColor
|
||||
} from '@cp/pages/CaseDetails/components/CustomerSummary/interfaces';
|
||||
|
||||
type RiskSegmentationProps = {
|
||||
riskSegment: keyof typeof RiskRating;
|
||||
};
|
||||
|
||||
function RiskSegmentation({ riskSegment }: RiskSegmentationProps) {
|
||||
return (
|
||||
<Tag
|
||||
label={RiskRating[riskSegment]}
|
||||
size={'sm'}
|
||||
color={RiskRatingColor[riskSegment]}
|
||||
containerClass="rounded-none rounded-br-md"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default RiskSegmentation;
|
||||
Reference in New Issue
Block a user