diff --git a/src/components/Notifications/constants.tsx b/src/components/Notifications/constants.tsx index 818434c1..ada42ea8 100644 --- a/src/components/Notifications/constants.tsx +++ b/src/components/Notifications/constants.tsx @@ -66,7 +66,8 @@ export const TemplateTypes = { MESSAGE_WAIVE_UNHOLD_NOTIFICATION_TEMPLATE: 'MESSAGE_WAIVE_UNHOLD_NOTIFICATION_TEMPLATE', COLLECTION_PAUSE_EFFORTS_CASE_DEALLOCATED: 'COLLECTION_PAUSE_EFFORTS_CASE_DEALLOCATED', ANOMALY_TRACKER_DETECTION: 'ANOMALY_TRACKER_DETECTION_V2', - ANOMALY_TRACKER_RESOLUTION: 'ANOMALY_TRACKER_RESOLUTION' + ANOMALY_TRACKER_RESOLUTION: 'ANOMALY_TRACKER_RESOLUTION', + COLLECTION_PAUSE_EFFORTS_CASE_PAUSED: 'COLLECTION_PAUSE_EFFORTS_CASE_PAUSED' }; export const PaymentSuccessTemplateTypes = [ @@ -119,7 +120,8 @@ export const NotificationTabTemplateMap = { TemplateTypes.BUSY_SCHEDULED_NOTIFICATION_TEMPLATE, TemplateTypes.REVISIT_SCHEDULED_NOTIFICATION_TEMPLATE, TemplateTypes.FIELD_BOT_REVISIT_SCHEDULED_NOTIFICATION_TEMPLATE, - TemplateTypes.MESSAGE_WAIVE_UNHOLD_NOTIFICATION_TEMPLATE + TemplateTypes.MESSAGE_WAIVE_UNHOLD_NOTIFICATION_TEMPLATE, + TemplateTypes.COLLECTION_PAUSE_EFFORTS_CASE_PAUSED ], [NotificationTabTypes.All]: [ TemplateTypes.PAYMENT_MADE_TEMPLATE, @@ -150,7 +152,8 @@ export const NotificationTabTemplateMap = { TemplateTypes.SUPPORT_REQUEST_RESOLVED, TemplateTypes.MESSAGE_WAIVE_UNHOLD_NOTIFICATION_TEMPLATE, TemplateTypes.ANOMALY_TRACKER_DETECTION, - TemplateTypes.ANOMALY_TRACKER_RESOLUTION + TemplateTypes.ANOMALY_TRACKER_RESOLUTION, + TemplateTypes.COLLECTION_PAUSE_EFFORTS_CASE_PAUSED ], [NotificationTabTypes.Tasks]: [ TemplateTypes.SUPPORT_REQUEST_RECEIVED, @@ -257,6 +260,10 @@ export const TemplateInfoMap = { label: 'Case De-allocated', icon: }, + [TemplateTypes.COLLECTION_PAUSE_EFFORTS_CASE_PAUSED]: { + label: 'Case Paused', + icon: + }, [TemplateTypes.AMEYO_CALL_DROP]: { label: 'Ameyo Call Drop', icon: diff --git a/src/constants/Common.constants.ts b/src/constants/Common.constants.ts index d5fcd800..160c672c 100644 --- a/src/constants/Common.constants.ts +++ b/src/constants/Common.constants.ts @@ -1,3 +1,5 @@ +import { Roles } from '../pages/auth/constants/AuthConstants'; + export const fullMonthNames = [ 'January', 'February', @@ -70,3 +72,10 @@ export const ameyo_errorenous_message = 'You are marked as offline on Ameyo. please set yourself online again'; export const errorenous_break_reason = 'erroneous.channel.system.initiated.break'; + +export const PAUSE_CASE_LH_VISIBILITY_ROLES = [ + Roles.ROLE_COLLECTION_EFFORTS_PAUSE_ACCESS, + Roles.ROLE_GLOBAL_ACCESS, + Roles.ROLE_COLLECTION_HEAD, + Roles.ROLE_USER_MANAGEMENT_ADMIN +]; diff --git a/src/pages/CaseDetails/actions/interactionsActions.ts b/src/pages/CaseDetails/actions/interactionsActions.ts index 83aea286..105de7c2 100644 --- a/src/pages/CaseDetails/actions/interactionsActions.ts +++ b/src/pages/CaseDetails/actions/interactionsActions.ts @@ -26,7 +26,8 @@ export const getWAInteractions = customerReferenceId: customerRefrenceId, size: 10, page: 0 - } + }, + caseReferenceId: string ) => (dispatch: Dispatch) => { dispatch( @@ -38,7 +39,10 @@ export const getWAInteractions = }) ); axiosInstance - .get(getApiUrl(ApiKeys.WA_INTERACTIONS), { params: waInteractionsPayload }) + .get(getApiUrl(ApiKeys.WA_INTERACTIONS), { + headers: { caseReferenceId }, + params: waInteractionsPayload + }) .then(res => { dispatch( setCaseDetail({ diff --git a/src/pages/CaseDetails/components/AllDocuments/actions.ts b/src/pages/CaseDetails/components/AllDocuments/actions.ts index f7e37a38..32a1e69b 100644 --- a/src/pages/CaseDetails/components/AllDocuments/actions.ts +++ b/src/pages/CaseDetails/components/AllDocuments/actions.ts @@ -8,6 +8,7 @@ import { Roles } from '@cp/src/pages/auth/constants/AuthConstants'; export const getBankStatementResponse = async ( lan: string, customerId: string, + caseReferenceId: string, bankStatementErrorCallback?: () => void ) => { try { @@ -16,7 +17,8 @@ export const getBankStatementResponse = async ( headers: { customerreferenceid: customerId, loanaccountnumber: lan, - donotHandleError: true + donotHandleError: true, + caseReferenceId: caseReferenceId } }); return response?.data?.data; diff --git a/src/pages/CaseDetails/components/AllDocuments/bankStatement/BankStatement.tsx b/src/pages/CaseDetails/components/AllDocuments/bankStatement/BankStatement.tsx index c34ea345..d97507ed 100644 --- a/src/pages/CaseDetails/components/AllDocuments/bankStatement/BankStatement.tsx +++ b/src/pages/CaseDetails/components/AllDocuments/bankStatement/BankStatement.tsx @@ -32,6 +32,8 @@ import { import { RootState } from '@cp/src/store'; import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService'; import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant'; +import { createKey } from '@cp/src/utils/CaseDetail.utils'; +import { PAUSE_CASE_LH_VISIBILITY_ROLES } from '@cp/src/constants/Common.constants'; const BankStatement = ({ isOnModal, @@ -40,7 +42,7 @@ const BankStatement = ({ isOnModal: boolean; setIsExpandedView: React.Dispatch>; }) => { - const { loanId = '', customerId = '' } = useParams(); + const { loanId = '', customerId = '', caseReferenceId = '' } = useParams(); const dispatch = useDispatch(); const navigate = useNavigate(); @@ -79,10 +81,24 @@ const BankStatement = ({ updateAndNavigate(queryParams); }; + const isSnoozed = useSelector( + (state: RootState) => + state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused + ); + const userRole = useSelector((state: RootState) => state.common?.userData?.roles); + const hasVisibilityRole = userRole?.some(role => PAUSE_CASE_LH_VISIBILITY_ROLES.includes(role)); + useEffect(() => { - getBankStatementResponse(loanId, customerId, bankStatementErrorCallback).then(response => { - getBankStatement(response); - }); + if (!isSnoozed || (isSnoozed && !hasVisibilityRole)) { + getBankStatementResponse( + loanId, + customerId, + caseReferenceId, + bankStatementErrorCallback + ).then(response => { + getBankStatement(response); + }); + } setInitialQueryParams(queryParams); return () => { bankStatementInstance.current?.resetData(); diff --git a/src/pages/CaseDetails/components/AllDocumentsV2/index.tsx b/src/pages/CaseDetails/components/AllDocumentsV2/index.tsx index 7dea2253..32a75580 100644 --- a/src/pages/CaseDetails/components/AllDocumentsV2/index.tsx +++ b/src/pages/CaseDetails/components/AllDocumentsV2/index.tsx @@ -15,6 +15,7 @@ import { useNavigate, useParams } from 'react-router-dom'; import CircularLoader from '@navi/web-ui/lib/icons/CircularLoaderIcon'; import { Roles } from '@cp/pages/auth/constants/AuthConstants'; import { createKey } from '@cp/src/utils/CaseDetail.utils'; +import { PAUSE_CASE_LH_VISIBILITY_ROLES } from '@cp/src/constants/Common.constants'; function AllDocumentsV2() { const dispatch = useDispatch(); @@ -44,6 +45,10 @@ function AllDocumentsV2() { state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused ); + const hasVisibilityRole = user?.roles?.some(role => + PAUSE_CASE_LH_VISIBILITY_ROLES.includes(role) + ); + const tabs = createDynamicTabs(documents || { documentDetails: {} }, isSnoozed) || []; const { [DOCUMENTS]: queryParams } = readQueryParams(); @@ -73,7 +78,7 @@ function AllDocumentsV2() { const mergedTabs = [...tabs]; - if (isBankStatementAccessible) { + if (isBankStatementAccessible && !(isSnoozed && !hasVisibilityRole)) { mergedTabs.push(...staticTabs); } useEffect(() => { diff --git a/src/pages/CaseDetails/components/AllDocumentsV2/utils.tsx b/src/pages/CaseDetails/components/AllDocumentsV2/utils.tsx index 8cf3b5b4..4bb8473b 100644 --- a/src/pages/CaseDetails/components/AllDocumentsV2/utils.tsx +++ b/src/pages/CaseDetails/components/AllDocumentsV2/utils.tsx @@ -8,7 +8,7 @@ type TabType = { component: React.ReactNode; }; -export const createDynamicTabs = (documents: Documents, isSnoozed: boolean) => { +export const createDynamicTabs = (documents: Documents, isSnoozed: boolean | undefined) => { if (Object.keys(documents?.documentDetails || {}).length === 0) { return []; } diff --git a/src/pages/CaseDetails/components/CommunicationHistory/index.tsx b/src/pages/CaseDetails/components/CommunicationHistory/index.tsx index 7e658fd6..9b2fb4c2 100644 --- a/src/pages/CaseDetails/components/CommunicationHistory/index.tsx +++ b/src/pages/CaseDetails/components/CommunicationHistory/index.tsx @@ -2,7 +2,7 @@ import TabItem from '@navi/web-ui/lib/components/Tabs/TabItem'; import Tabs from '@navi/web-ui/lib/components/Tabs/Tabs'; import React, { useCallback, useEffect } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; -import { COMMUNICATION_TABS } from '../../constants'; +import { COMMUNICATION_TAB_KEYS, COMMUNICATION_TABS } from '../../constants'; import styles from './index.module.scss'; import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService'; import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant'; @@ -14,6 +14,7 @@ import { RootState } from '@cp/src/store'; import { DPD_BUCKET_30 } from './constants'; import { GenericObject } from '@cp/src/types/CommonConstans'; import { createQueryParams, readQueryParams } from '@cp/utils/QueryParamsHelper'; +import { PAUSE_CASE_LH_VISIBILITY_ROLES } from '@cp/src/constants/Common.constants'; function CommunicationHistory() { const { loanId = '', customerId = '' } = useParams(); @@ -52,6 +53,15 @@ function CommunicationHistory() { updateAndNavigate(updatedParams); }, []); + const isSnoozed = useSelector( + (state: RootState) => + state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused + ); + + const userRole = useSelector((state: RootState) => state.common.userData?.roles); + const hasVisibilityRole = userRole?.some(role => PAUSE_CASE_LH_VISIBILITY_ROLES.includes(role)); + const hideTab = isSnoozed && !hasVisibilityRole; + return (
handleTabChange(event as string)} > - {COMMUNICATION_TABS.map(tab => ( + {COMMUNICATION_TABS.filter( + tab => !(hideTab && tab.key === COMMUNICATION_TAB_KEYS.NAVI_WHATSAPP) + ).map(tab => ( {tab.component} diff --git a/src/pages/CaseDetails/components/CustomerSummary/index.tsx b/src/pages/CaseDetails/components/CustomerSummary/index.tsx index b8420833..428e6ec4 100644 --- a/src/pages/CaseDetails/components/CustomerSummary/index.tsx +++ b/src/pages/CaseDetails/components/CustomerSummary/index.tsx @@ -27,6 +27,7 @@ import { getPauseDate } from '../Pause/action'; import AlertCircleWithBackdrop from '@cp/src/assets/icons/AlertCircleWithBackdrop'; import { CaseStatus } from '../../interfaces/CaseDetail.type'; +import { PAUSE_CASE_LH_VISIBILITY_ROLES } from '@cp/src/constants/Common.constants'; const CustomerSummary = () => { const { @@ -97,6 +98,28 @@ const CustomerSummary = () => { const escalationStatus = escalationsDetails?.status; + const isCasePaused = useSelector( + (state: RootState) => + state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused + ); + const userRole = useSelector((state: RootState) => state.common.userData?.roles); + const hasVisibilityRole = userRole?.some(role => PAUSE_CASE_LH_VISIBILITY_ROLES.includes(role)); + const isRiskSegmentationVisibleOnPause = isCasePaused && !hasVisibilityRole; + + const showRedRiskSegmentation = + !isRiskSegmentationVisibleOnPause && + isRiskSegmentationVisible && + riskSegment === RiskRating.HIGH_RISK; + + const showYellowRiskSegmentation = + !isRiskSegmentationVisibleOnPause && + isRiskSegmentationVisible && + riskSegment === RiskRating.MEDIUM_RISK; + + const showGreenRiskSegmentation = + !isRiskSegmentationVisibleOnPause && + isRiskSegmentationVisible && + riskSegment === RiskRating.LOW_RISK; return (
{isPaused ? ( @@ -104,7 +127,7 @@ const CustomerSummary = () => {
- Collections is snoozed for this LAN. This will be un-snoozed on{' '} + Collections is paused for this LAN. This will be un-paused after{' '} {dateFormat(new Date(pauseDate!), DateFormat.LONG_DATE_FORMAT_WITHOUT_TIME)} @@ -116,10 +139,9 @@ const CustomerSummary = () => {
{assignedFieldAgent ? ( diff --git a/src/pages/CaseDetails/components/Interactions/index.tsx b/src/pages/CaseDetails/components/Interactions/index.tsx index 474bd1f4..a35ba5c2 100644 --- a/src/pages/CaseDetails/components/Interactions/index.tsx +++ b/src/pages/CaseDetails/components/Interactions/index.tsx @@ -70,7 +70,7 @@ const WAINTERACTIONS_COL_DEFS = [ ]; const Interactions = () => { - const { loanId = '', customerId = '' } = useParams(); + const { loanId = '', customerId = '', caseReferenceId = '' } = useParams(); const pageData = useSelector( (state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)] ); @@ -92,7 +92,7 @@ const Interactions = () => { const getWAInteractionsData = () => { const payload = createPayloadForWAInteractions(); - dispatch(fetchWAInteractions(loanId, customerId, payload)); + dispatch(fetchWAInteractions(loanId, customerId, payload, caseReferenceId)); }; useEffect(() => { diff --git a/src/pages/CaseDetails/components/Pause/const.ts b/src/pages/CaseDetails/components/Pause/const.ts index 53c48590..3ec5496c 100644 --- a/src/pages/CaseDetails/components/Pause/const.ts +++ b/src/pages/CaseDetails/components/Pause/const.ts @@ -32,20 +32,20 @@ export const defaultValues = { }; export enum PAUSE_MESSAGE { - UPDATE_PAUSE = 'Update snooze on this LAN', - PAUSE_COLLECTIONS = 'Snooze collections for this LAN', + UPDATE_PAUSE = 'Update pause on this LAN', + PAUSE_COLLECTIONS = 'Pause collections for this LAN', UPDATE_PAUSE_DAYS = 'Update pause days', - PAUSE_TILL = 'Snooze till', - PAUSE_IMMEDIATE_TODAY = 'The update will be effective from today', + PAUSE_TILL = 'Pause till', + PAUSE_IMMEDIATE_TODAY = 'The update will be effective from now onwards', DATE_ERROR = 'Please enter some other date', REASON_UPDATE = 'Reason for update', - REASON_PAUSE = 'Reason for snoozing', + REASON_PAUSE = 'Reason for pausing', OTHER_REASONS = 'Other reasons', - UPDATE_PAUSE_DATE = 'Update snooze date', - PAUSE_COLLECTIONS_EFFORTS = 'Snooze collections efforts' + UPDATE_PAUSE_DATE = 'Update pause date', + PAUSE_COLLECTIONS_EFFORTS = 'Pause collections efforts' } export enum PAUSE_ACTION_MESSAGE { - FAILED_TO_PAUSE = 'Failed to snooze collections', - COLLECTIONS_PAUSED = 'Collections snoozed successfully' + FAILED_TO_PAUSE = 'Failed to pause collections', + COLLECTIONS_PAUSED = 'Collections paused successfully' } diff --git a/src/pages/CaseDetails/components/Pause/index.tsx b/src/pages/CaseDetails/components/Pause/index.tsx index d9057ad7..eec64800 100644 --- a/src/pages/CaseDetails/components/Pause/index.tsx +++ b/src/pages/CaseDetails/components/Pause/index.tsx @@ -17,11 +17,12 @@ import styles from './index.module.scss'; import cx from 'classnames'; import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService'; import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant'; +import { getDateAfterCertainMonths } from '@cp/src/utils/commonUtils'; const PauseAction = () => { const todayDate = getFormatDate(new Date(), DateFormat.YYYY_MM_DD); const threeMonthsLaterDate = getFormatDate( - new Date(new Date().setMonth(new Date().getMonth() + 3)), + getDateAfterCertainMonths(new Date(), 12), DateFormat.YYYY_MM_DD ); diff --git a/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx b/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx index f321366b..33b642ad 100644 --- a/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx +++ b/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx @@ -409,7 +409,7 @@ const CallBridge = (props: CallBridgeProps) => { }; const tooltipContent = caseSnoozed - ? 'Calling is disabled as collections is snoozed for this LAN' + ? 'Calling is disabled as collections is paused for this LAN' : `You can call the customer from ${formatToStandardTimeInHours(getCallingWindowStartTime)} ${ isPostMidnight ? 'tomorrow' : 'today' }`; diff --git a/src/pages/CaseDetails/feedbackForm/component/Contacts/DefaultContacts.tsx b/src/pages/CaseDetails/feedbackForm/component/Contacts/DefaultContacts.tsx index cdeaa036..af55a478 100644 --- a/src/pages/CaseDetails/feedbackForm/component/Contacts/DefaultContacts.tsx +++ b/src/pages/CaseDetails/feedbackForm/component/Contacts/DefaultContacts.tsx @@ -20,7 +20,7 @@ import styles from './index.module.scss'; import { readQueryParams } from '@cp/utils/QueryParamsHelper'; import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService'; import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant'; -import { IPhoneNumberLimit, LIMIT_TYPE } from '../../../interfaces/CaseDetail.type'; +import { CaseStatus, IPhoneNumberLimit, LIMIT_TYPE } from '../../../interfaces/CaseDetail.type'; import { Tooltip, TooltipContent, TooltipTrigger } from 'src/components/TooltipV2/TooltipV2'; import cx from 'classnames'; import { setIsFeedbackFormDirty } from '../../reducer/feedbackSlice'; @@ -33,7 +33,7 @@ import { Roles } from '@cp/pages/auth/constants/AuthConstants'; import ClockIcon from '@cp/assets/icons/ClockIcon'; import dayjs from 'dayjs'; import { CALL_SOURCE_LIMIT } from '@cp/pages/CaseDetails/constants/Overview.constant'; -import { LIMIT_CALLS } from '@cp/src/constants/Common.constants'; +import { LIMIT_CALLS, PAUSE_CASE_LH_VISIBILITY_ROLES } from '@cp/src/constants/Common.constants'; interface DefaultContactsProps { feedback: IFeedbackForm; @@ -70,6 +70,14 @@ const DefaultContacts: React.FC = props => { const addedIdentifier = useSelector((state: RootState) => state.feedBack.addedIdentifier); const [isOptionDisabled, setIsOptionDisabled] = React.useState(false); const isGlobalAccessGiven = user?.roles?.includes(Roles.ROLE_GLOBAL_ACCESS); + const isCasePaused = useSelector( + (state: RootState) => + state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused + ); + const hasVisibilityRole = user?.roles?.some(role => + PAUSE_CASE_LH_VISIBILITY_ROLES.includes(role) + ); + const disableCTAs = isGlobalAccessGiven ? !editAccessFlag : false; const toSlashUserPage = () => { @@ -263,6 +271,8 @@ const DefaultContacts: React.FC = props => { const disableGoogleSearchButton = !feedback.telephone; + const disableCTAsForSlash = disableCTAs || (isCasePaused && !hasVisibilityRole); + return (
= props => { Select number -
diff --git a/src/pages/Cases/components/CasesCustomerName.tsx b/src/pages/Cases/components/CasesCustomerName.tsx index 26334c36..b84faebc 100644 --- a/src/pages/Cases/components/CasesCustomerName.tsx +++ b/src/pages/Cases/components/CasesCustomerName.tsx @@ -3,11 +3,22 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@cp/src/components/Tool import { getRiskBarColor } from '@cp/src/utils/commonUtils'; import EllipsisText from '@cp/src/components/EllipsisText'; import styles from './Cases.module.scss'; +import { useSelector } from 'react-redux'; +import { RootState } from '@cp/src/store'; +import { createKey } from '@cp/src/utils/CaseDetail.utils'; +import { useParams } from 'react-router-dom'; +import { CaseStatus } from '../../CaseDetails/interfaces/CaseDetail.type'; +import { PAUSE_CASE_LH_VISIBILITY_ROLES } from '@cp/src/constants/Common.constants'; const CasesCustomerName = (props: { data: AllCasesSummary }) => { const customerName = props?.data?.customerName; const riskSegment = props?.data?.riskSegment; - const barColor = getRiskBarColor(riskSegment || ''); + const isSnoozed = props?.data?.status === CaseStatus.ON_HOLD; + const userRole = useSelector((state: RootState) => state.common.userData?.roles); + const hasVisibilityRole = userRole?.some(role => PAUSE_CASE_LH_VISIBILITY_ROLES.includes(role)); + const isRiskSegmentationVisibleOnPause = isSnoozed && !hasVisibilityRole; + + const barColor = isRiskSegmentationVisibleOnPause ? getRiskBarColor(riskSegment || '') : ''; return (
diff --git a/src/pages/Cases/constants/CasesInterfaces.tsx b/src/pages/Cases/constants/CasesInterfaces.tsx index 1c10e77b..7efc1077 100644 --- a/src/pages/Cases/constants/CasesInterfaces.tsx +++ b/src/pages/Cases/constants/CasesInterfaces.tsx @@ -54,6 +54,7 @@ export interface AllCasesSummary { riskSegment?: string; businessVertical?: string; caseReferenceId?: string; + status?: string; } export type AggregationType = 'SUM' | 'MAX' | 'MIN' | 'COUNT'; diff --git a/src/pages/TeamLeadDashboard/TableContent.tsx b/src/pages/TeamLeadDashboard/TableContent.tsx index 822f4ad3..82a5ef6d 100644 --- a/src/pages/TeamLeadDashboard/TableContent.tsx +++ b/src/pages/TeamLeadDashboard/TableContent.tsx @@ -4,6 +4,7 @@ import { formatAmount, getRiskBarColor } from 'src/utils/commonUtils'; import { AgentTypes } from './interface'; import styles from './TeamLead.module.scss'; import { NaviTableColumnDef } from '@cp/src/components/NaviTable/interfaces'; +import { CaseStatus } from '../CaseDetails/interfaces/CaseDetail.type'; export const TEAM_LEAD_COLUMN_DEFS_NAVI_TABLE: NaviTableColumnDef[] = [ { @@ -11,7 +12,10 @@ export const TEAM_LEAD_COLUMN_DEFS_NAVI_TABLE: NaviTableColumnDef[] = header: '', cell: info => { const barColor = getRiskBarColor(info?.row?.original?.riskSegment); - return
; + const isSnoozed = info?.row?.original?.status === CaseStatus.ON_HOLD; + return ( +
+ ); }, cellStyle: { padding: 0 diff --git a/src/utils/commonUtils.ts b/src/utils/commonUtils.ts index 6897059f..0dbb7d7b 100644 --- a/src/utils/commonUtils.ts +++ b/src/utils/commonUtils.ts @@ -594,3 +594,9 @@ export const getRiskBarColor = (riskSegment: string): string => { return riskSegmentColors[riskSegment] || ''; }; + +export const getDateAfterCertainMonths = (date: Date, months: number) => { + const newDate = new Date(date); + newDate.setMonth(date.getMonth() + months); + return newDate; +};