NTP-21559|snooze|aman singh (#1283)
* NTP-21559|snooze|aman singh * NTP-21559|snooze|aman singh * NTP-21033|snooze fix|aman singh * NTP-25436| Start showing scrapped WhatsApp chats again on Longhorn | Aman singh * NTP-21033|snooze fix|aman singh * NTP-21033|snooze fix|aman singh * NTP-21033|snooze fix|aman singh * NTP-21033|snooze fix|aman singh
This commit is contained in:
29
src/assets/icons/AlertCircleWithBackdrop.tsx
Normal file
29
src/assets/icons/AlertCircleWithBackdrop.tsx
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const AlertCircleWithBackdrop = () => {
|
||||||
|
return (
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||||
|
<circle cx="10" cy="10" r="10" fill="#F69E9E" />
|
||||||
|
<circle cx="10" cy="10" r="6" fill="#E92C2C" />
|
||||||
|
<mask
|
||||||
|
id="mask0_4642_53990"
|
||||||
|
style={{ maskType: 'alpha' }}
|
||||||
|
maskUnits="userSpaceOnUse"
|
||||||
|
x="4"
|
||||||
|
y="4"
|
||||||
|
width="12"
|
||||||
|
height="12"
|
||||||
|
>
|
||||||
|
<rect x="4" y="4" width="12" height="12" fill="#D9D9D9" />
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask0_4642_53990)">
|
||||||
|
<path
|
||||||
|
d="M10 10.9922C9.85833 10.9922 9.73958 10.9443 9.64375 10.8484C9.54792 10.7526 9.5 10.6339 9.5 10.4922V6.99219C9.5 6.85052 9.54792 6.73177 9.64375 6.63594C9.73958 6.5401 9.85833 6.49219 10 6.49219C10.1417 6.49219 10.2604 6.5401 10.3562 6.63594C10.4521 6.73177 10.5 6.85052 10.5 6.99219V10.4922C10.5 10.6339 10.4521 10.7526 10.3562 10.8484C10.2604 10.9443 10.1417 10.9922 10 10.9922ZM10 13.4922C9.85833 13.4922 9.73958 13.4443 9.64375 13.3484C9.54792 13.2526 9.5 13.1339 9.5 12.9922C9.5 12.8505 9.54792 12.7318 9.64375 12.6359C9.73958 12.5401 9.85833 12.4922 10 12.4922C10.1417 12.4922 10.2604 12.5401 10.3562 12.6359C10.4521 12.7318 10.5 12.8505 10.5 12.9922C10.5 13.1339 10.4521 13.2526 10.3562 13.3484C10.2604 13.4443 10.1417 13.4922 10 13.4922Z"
|
||||||
|
fill="white"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AlertCircleWithBackdrop;
|
||||||
@@ -14,6 +14,7 @@ import { GenericObject } from '@cp/src/types/CommonConstans';
|
|||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import CircularLoader from '@navi/web-ui/lib/icons/CircularLoaderIcon';
|
import CircularLoader from '@navi/web-ui/lib/icons/CircularLoaderIcon';
|
||||||
import { Roles } from '@cp/pages/auth/constants/AuthConstants';
|
import { Roles } from '@cp/pages/auth/constants/AuthConstants';
|
||||||
|
import { createKey } from '@cp/src/utils/CaseDetail.utils';
|
||||||
|
|
||||||
function AllDocumentsV2() {
|
function AllDocumentsV2() {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@@ -38,7 +39,12 @@ function AllDocumentsV2() {
|
|||||||
caseReferenceId = ''
|
caseReferenceId = ''
|
||||||
} = useParams();
|
} = useParams();
|
||||||
|
|
||||||
const tabs = createDynamicTabs(documents || { documentDetails: {} }) || [];
|
const isSnoozed = useSelector(
|
||||||
|
(state: RootState) =>
|
||||||
|
state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused
|
||||||
|
);
|
||||||
|
|
||||||
|
const tabs = createDynamicTabs(documents || { documentDetails: {} }, isSnoozed) || [];
|
||||||
|
|
||||||
const { [DOCUMENTS]: queryParams } = readQueryParams();
|
const { [DOCUMENTS]: queryParams } = readQueryParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|||||||
@@ -8,11 +8,28 @@ type TabType = {
|
|||||||
component: React.ReactNode;
|
component: React.ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createDynamicTabs = (documents: Documents) => {
|
export const createDynamicTabs = (documents: Documents, isSnoozed: boolean) => {
|
||||||
if (Object.keys(documents?.documentDetails || {}).length === 0) {
|
if (Object.keys(documents?.documentDetails || {}).length === 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const tabs: TabType[] = [];
|
const tabs: TabType[] = [];
|
||||||
|
|
||||||
|
if (isSnoozed) {
|
||||||
|
if (documents?.documentDetails?.NAVI) {
|
||||||
|
tabs.push({
|
||||||
|
key: documents?.documentDetails?.NAVI?.tabKey || '',
|
||||||
|
value: documents?.documentDetails?.NAVI?.tabName || '',
|
||||||
|
component: (
|
||||||
|
<DynamicDocumentTab
|
||||||
|
documentTabKey={documents?.documentDetails?.NAVI?.tabKey || ''}
|
||||||
|
key={documents?.documentDetails?.NAVI?.tabKey}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return tabs;
|
||||||
|
}
|
||||||
|
|
||||||
Object.keys(documents?.documentDetails || {}).forEach(key => {
|
Object.keys(documents?.documentDetails || {}).forEach(key => {
|
||||||
tabs.push({
|
tabs.push({
|
||||||
key: documents?.documentDetails?.[key]?.tabKey || '',
|
key: documents?.documentDetails?.[key]?.tabKey || '',
|
||||||
|
|||||||
@@ -17,7 +17,14 @@ import {
|
|||||||
getTelephones,
|
getTelephones,
|
||||||
getTelephonesV2
|
getTelephonesV2
|
||||||
} from '../actions/casesDetailsActions';
|
} from '../actions/casesDetailsActions';
|
||||||
import { CONTACT_TYPES, CUSTOMER_TAGS, CUSTOMER_TAGS_READABLE, TABS, TAB_KEYS } from '../constants';
|
import {
|
||||||
|
CONTACT_TYPES,
|
||||||
|
CUSTOMER_TAGS,
|
||||||
|
CUSTOMER_TAGS_READABLE,
|
||||||
|
TABS,
|
||||||
|
TAB_KEYS,
|
||||||
|
TabsTORemove
|
||||||
|
} from '../constants';
|
||||||
// styles, images and icons
|
// styles, images and icons
|
||||||
import { TabItemKey, TabsChild } from '@navi/web-ui/lib/components/Tabs/types';
|
import { TabItemKey, TabsChild } from '@navi/web-ui/lib/components/Tabs/types';
|
||||||
import { TagColors } from '@navi/web-ui/lib/primitives/Tag/types';
|
import { TagColors } from '@navi/web-ui/lib/primitives/Tag/types';
|
||||||
@@ -81,12 +88,26 @@ const CaseDetail: React.FC<React.PropsWithChildren> = () => {
|
|||||||
const bankStatementStatus = useSelector(
|
const bankStatementStatus = useSelector(
|
||||||
(state: RootState) => state.bankStatementSlice.bankStatementStatus
|
(state: RootState) => state.bankStatementSlice.bankStatementStatus
|
||||||
);
|
);
|
||||||
|
const shouldNotHidePauseCasesTab = useSelector(
|
||||||
|
(state: RootState) => state.common.shouldNotHidePauseCasesTab
|
||||||
|
);
|
||||||
|
|
||||||
|
const isSnoozed = useSelector(
|
||||||
|
(state: RootState) =>
|
||||||
|
state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused
|
||||||
|
);
|
||||||
|
|
||||||
const filteredTabs = useMemo(() => {
|
const filteredTabs = useMemo(() => {
|
||||||
const tabs: TabsChild[] = [];
|
const tabs: TabsChild[] = [];
|
||||||
TABS.forEach(tab => {
|
TABS.forEach(tab => {
|
||||||
// Checking if the isVisibleKey flag key is true in featureFlags
|
// Checking if the isVisibleKey flag key is true in featureFlags
|
||||||
// or by default showing the tab
|
// or by default showing the tab
|
||||||
|
if (isSnoozed && !shouldNotHidePauseCasesTab) {
|
||||||
|
if (TabsTORemove[tab.key]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const isFeatureFlagEnabled =
|
const isFeatureFlagEnabled =
|
||||||
tab.featureFlagKey && caseDetailTabsFeatureFlag?.[tab?.featureFlagKey];
|
tab.featureFlagKey && caseDetailTabsFeatureFlag?.[tab?.featureFlagKey];
|
||||||
const isDocumentsTab = tab.key === TAB_KEYS.DOCUMENTS;
|
const isDocumentsTab = tab.key === TAB_KEYS.DOCUMENTS;
|
||||||
@@ -104,7 +125,7 @@ const CaseDetail: React.FC<React.PropsWithChildren> = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return tabs;
|
return tabs;
|
||||||
}, [caseDetailTabsFeatureFlag, bankStatementStatus]);
|
}, [caseDetailTabsFeatureFlag, bankStatementStatus, isSnoozed, shouldNotHidePauseCasesTab]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setCustomerId(customerId);
|
setCustomerId(customerId);
|
||||||
@@ -215,6 +236,7 @@ const CaseDetail: React.FC<React.PropsWithChildren> = () => {
|
|||||||
{!!filteredTabs.length && (
|
{!!filteredTabs.length && (
|
||||||
<div className={cx([styles.tabContainer, { [styles.heightAdjusting]: tags.length }])}>
|
<div className={cx([styles.tabContainer, { [styles.heightAdjusting]: tags.length }])}>
|
||||||
<Tabs
|
<Tabs
|
||||||
|
key={filteredTabs.length}
|
||||||
tabsClassName={styles.containerClass}
|
tabsClassName={styles.containerClass}
|
||||||
selectedTabKey={selectedTab}
|
selectedTabKey={selectedTab}
|
||||||
onTabChange={handleTabChange}
|
onTabChange={handleTabChange}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Button, Chip, Typography } from '@navi/web-ui/lib/primitives';
|
import { Button, Chip, Typography } from '@navi/web-ui/lib/primitives';
|
||||||
import { useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import CircularProgress from 'src/components/ProgressBars/circularProgress/CircularProgress';
|
import CircularProgress from 'src/components/ProgressBars/circularProgress/CircularProgress';
|
||||||
import { RISK_TAGS, RISK_TAG_SUBSTRING } from 'src/pages/Cases/constants/CasesConstants';
|
import { RISK_TAGS, RISK_TAG_SUBSTRING } from 'src/pages/Cases/constants/CasesConstants';
|
||||||
@@ -23,6 +23,10 @@ import { Roles } from '@cp/pages/auth/constants/AuthConstants';
|
|||||||
import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService';
|
import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService';
|
||||||
import { AgentTrackingEvents } from '@cp/src/service/clickStream.constant';
|
import { AgentTrackingEvents } from '@cp/src/service/clickStream.constant';
|
||||||
import EscalationInfo from '@cp/pages/CaseDetails/components/CustomerSummary/EscalationInfo';
|
import EscalationInfo from '@cp/pages/CaseDetails/components/CustomerSummary/EscalationInfo';
|
||||||
|
import { getPauseDate } from '../Pause/action';
|
||||||
|
|
||||||
|
import AlertCircleWithBackdrop from '@cp/src/assets/icons/AlertCircleWithBackdrop';
|
||||||
|
import { CaseStatus } from '../../interfaces/CaseDetail.type';
|
||||||
|
|
||||||
const CustomerSummary = () => {
|
const CustomerSummary = () => {
|
||||||
const {
|
const {
|
||||||
@@ -31,6 +35,7 @@ const CustomerSummary = () => {
|
|||||||
caseReferenceId = '',
|
caseReferenceId = '',
|
||||||
caseBusinessVertical = ''
|
caseBusinessVertical = ''
|
||||||
} = useParams();
|
} = useParams();
|
||||||
|
const dispatch = useDispatch();
|
||||||
const pageDetail = useSelector(
|
const pageDetail = useSelector(
|
||||||
(state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)]
|
(state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)]
|
||||||
);
|
);
|
||||||
@@ -58,6 +63,14 @@ const CustomerSummary = () => {
|
|||||||
roles?.includes(Roles.ROLE_IN_HOUSE_CSA_AGENT) || roles?.includes(Roles.ROLE_EXTERNAL_CSA),
|
roles?.includes(Roles.ROLE_IN_HOUSE_CSA_AGENT) || roles?.includes(Roles.ROLE_EXTERNAL_CSA),
|
||||||
[roles]
|
[roles]
|
||||||
);
|
);
|
||||||
|
const pauseDate = pageDetail?.pause?.data?.pauseTillDate;
|
||||||
|
const isPaused = pageDetail?.pause?.data?.isPaused;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (pageDetail?.details?.data?.status === CaseStatus.ON_HOLD) {
|
||||||
|
dispatch(getPauseDate(loanId, customerId, caseReferenceId, caseBusinessVertical));
|
||||||
|
}
|
||||||
|
}, [pageDetail?.details?.data]);
|
||||||
|
|
||||||
enum EscalationStatus {
|
enum EscalationStatus {
|
||||||
ERROR = 'ERROR',
|
ERROR = 'ERROR',
|
||||||
@@ -83,9 +96,24 @@ const CustomerSummary = () => {
|
|||||||
const escalationsDetails = pageDetail?.details?.data?.escalationDetails || null;
|
const escalationsDetails = pageDetail?.details?.data?.escalationDetails || null;
|
||||||
|
|
||||||
const escalationStatus = escalationsDetails?.status;
|
const escalationStatus = escalationsDetails?.status;
|
||||||
|
ON_HOLD;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.customerDetailSection}>
|
<div className={styles.customerDetailSection}>
|
||||||
|
{isPaused ? (
|
||||||
|
<div className="p-3">
|
||||||
|
<div className="p-3 !bg-[var(--pale-red)] rounded-lg flex gap-2 items-center">
|
||||||
|
<AlertCircleWithBackdrop />
|
||||||
|
<Typography variant="p3">
|
||||||
|
Collections is snoozed for this LAN. This will be un-snoozed on{' '}
|
||||||
|
<strong>
|
||||||
|
{dateFormat(new Date(pauseDate!), DateFormat.LONG_DATE_FORMAT_WITHOUT_TIME)}
|
||||||
|
</strong>
|
||||||
|
.
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
<div
|
<div
|
||||||
className={cx(styles.customerDetailContainer, {
|
className={cx(styles.customerDetailContainer, {
|
||||||
[styles.containerWithAgentName]: !!assignedFieldAgent,
|
[styles.containerWithAgentName]: !!assignedFieldAgent,
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ import axiosInstance, { ApiKeys, getApiUrl, logError } from '@cp/src/utils/ApiHe
|
|||||||
import { toast } from '@navi/web-ui/lib/primitives/Toast';
|
import { toast } from '@navi/web-ui/lib/primitives/Toast';
|
||||||
import { PAUSE_ACTION_MESSAGE } from './const';
|
import { PAUSE_ACTION_MESSAGE } from './const';
|
||||||
import { isFunction } from '@cp/src/utils/commonUtils';
|
import { isFunction } from '@cp/src/utils/commonUtils';
|
||||||
|
import { Dispatch } from '@reduxjs/toolkit';
|
||||||
|
import { setCaseDetail } from '../../reducers/caseDetailSlice';
|
||||||
|
import { STORE_KEYS } from '../../constants';
|
||||||
|
import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService';
|
||||||
|
import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant';
|
||||||
|
|
||||||
export const getLanPauseStatus = async (caseId: string, caseBusinessVertical: string) => {
|
export const getLanPauseStatus = async (caseId: string, caseBusinessVertical: string) => {
|
||||||
try {
|
try {
|
||||||
@@ -13,6 +18,22 @@ export const getLanPauseStatus = async (caseId: string, caseBusinessVertical: st
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getPauseDate =
|
||||||
|
(lan: string, customerID: string, caseId: string, caseBusinessVertical: string) =>
|
||||||
|
(dispatch: Dispatch) => {
|
||||||
|
const url = getApiUrl(ApiKeys.GET_PAUSE_STATUS, { caseId });
|
||||||
|
axiosInstance.get(url, { headers: { caseBusinessVertical } }).then(response => {
|
||||||
|
dispatch(
|
||||||
|
setCaseDetail({
|
||||||
|
lan,
|
||||||
|
customerRefrenceId: customerID,
|
||||||
|
key: STORE_KEYS.PAUSE_STATUS,
|
||||||
|
data: response.data
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
interface PauseActionInput {
|
interface PauseActionInput {
|
||||||
caseId: string;
|
caseId: string;
|
||||||
payload: any;
|
payload: any;
|
||||||
@@ -34,6 +55,11 @@ export const submitPauseAction = ({
|
|||||||
.post(url, payload)
|
.post(url, payload)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success(PAUSE_ACTION_MESSAGE.COLLECTIONS_PAUSED);
|
toast.success(PAUSE_ACTION_MESSAGE.COLLECTIONS_PAUSED);
|
||||||
|
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.LH_SNOOZE_EFFORTS_UPDATED, {
|
||||||
|
caseId,
|
||||||
|
reason: payload.pauseEffortsReason,
|
||||||
|
pauseEffortsTillDate: payload.pauseEffortsTillDate
|
||||||
|
});
|
||||||
successCallback();
|
successCallback();
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|||||||
@@ -32,20 +32,20 @@ export const defaultValues = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export enum PAUSE_MESSAGE {
|
export enum PAUSE_MESSAGE {
|
||||||
UPDATE_PAUSE = 'Update pause on this LAN',
|
UPDATE_PAUSE = 'Update snooze on this LAN',
|
||||||
PAUSE_COLLECTIONS = 'Pause collections for this LAN',
|
PAUSE_COLLECTIONS = 'Snooze collections for this LAN',
|
||||||
UPDATE_PAUSE_DAYS = 'Update pause days',
|
UPDATE_PAUSE_DAYS = 'Update pause days',
|
||||||
PAUSE_TILL = 'Pause till',
|
PAUSE_TILL = 'Snooze till',
|
||||||
PAUSE_IMMEDIATE_TODAY = 'The pause will be immediate from today',
|
PAUSE_IMMEDIATE_TODAY = 'The update will be effective from today',
|
||||||
DATE_ERROR = 'Please enter some other date',
|
DATE_ERROR = 'Please enter some other date',
|
||||||
REASON_UPDATE = 'Reason for update',
|
REASON_UPDATE = 'Reason for update',
|
||||||
REASON_PAUSE = 'Reason for pause',
|
REASON_PAUSE = 'Reason for snoozing',
|
||||||
OTHER_REASONS = 'Other reasons',
|
OTHER_REASONS = 'Other reasons',
|
||||||
UPDATE_PAUSE_DATE = 'Update pause date',
|
UPDATE_PAUSE_DATE = 'Update snooze date',
|
||||||
PAUSE_COLLECTIONS_EFFORTS = 'Pause collections efforts'
|
PAUSE_COLLECTIONS_EFFORTS = 'Snooze collections efforts'
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PAUSE_ACTION_MESSAGE {
|
export enum PAUSE_ACTION_MESSAGE {
|
||||||
FAILED_TO_PAUSE = 'Failed to pause collections',
|
FAILED_TO_PAUSE = 'Failed to snooze collections',
|
||||||
COLLECTIONS_PAUSED = 'Collections paused successfully'
|
COLLECTIONS_PAUSED = 'Collections snoozed successfully'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,5 +63,11 @@
|
|||||||
padding: 16px 16px;
|
padding: 16px 16px;
|
||||||
border-top: 1px solid var(--navi-color-gray-border);
|
border-top: 1px solid var(--navi-color-gray-border);
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
|
|
||||||
|
button {
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--navi-color-red-dark) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,16 +5,18 @@ import { DATE_TIME_TYPE } from '@cp/src/components/DateTimePicker/constants';
|
|||||||
import { DateFormat, getFormatDate, getFormattedDateWithFullYear } from '@cp/src/utils/DateHelper';
|
import { DateFormat, getFormatDate, getFormattedDateWithFullYear } from '@cp/src/utils/DateHelper';
|
||||||
import { defaultValues, PAUSE_MESSAGE, PAUSE_REASON_TYPES, PauseFormValues } from './const';
|
import { defaultValues, PAUSE_MESSAGE, PAUSE_REASON_TYPES, PauseFormValues } from './const';
|
||||||
import InfoFilledIcon from '@cp/src/assets/icons/InfoFilledIcon';
|
import InfoFilledIcon from '@cp/src/assets/icons/InfoFilledIcon';
|
||||||
import { getLanPauseStatus, submitPauseAction } from './action';
|
import { getPauseDate, submitPauseAction } from './action';
|
||||||
import { Controller, useForm } from 'react-hook-form';
|
import { Controller, useForm } from 'react-hook-form';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { RootState } from '@cp/src/store';
|
import { RootState } from '@cp/src/store';
|
||||||
import { createKey } from '@cp/src/utils/CaseDetail.utils';
|
import { createKey } from '@cp/src/utils/CaseDetail.utils';
|
||||||
import { logError } from '@cp/src/utils/ApiHelper';
|
import { logError } from '@cp/src/utils/ApiHelper';
|
||||||
import PauseIcon from '@cp/src/assets/icons/PauseIcon';
|
import PauseIcon from '@cp/src/assets/icons/PauseIcon';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
|
import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService';
|
||||||
|
import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant';
|
||||||
|
|
||||||
const PauseAction = () => {
|
const PauseAction = () => {
|
||||||
const todayDate = getFormatDate(new Date(), DateFormat.YYYY_MM_DD);
|
const todayDate = getFormatDate(new Date(), DateFormat.YYYY_MM_DD);
|
||||||
@@ -24,13 +26,18 @@ const PauseAction = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const [isSelectedActionUpdatePause, setIsSelectedActionUpdatePause] = useState(false);
|
const [isSelectedActionUpdatePause, setIsSelectedActionUpdatePause] = useState(false);
|
||||||
const [pausedDate, setPausedDate] = useState('');
|
|
||||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
|
|
||||||
const { loanId = '', customerId = '', caseBusinessVertical = '' } = useParams();
|
const { loanId = '', customerId = '', caseBusinessVertical = '' } = useParams();
|
||||||
const pageDetail = useSelector(
|
const pageDetail = useSelector(
|
||||||
(state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)]
|
(state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const caseSnoozeDate = pageDetail?.pause?.data?.pauseTillDate || '';
|
||||||
|
const isSnoozed = pageDetail?.pause?.data?.isPaused || '';
|
||||||
|
|
||||||
|
const dispatch = useDispatch();
|
||||||
const caseReferenceId = pageDetail?.details?.data?.caseReferenceId || '';
|
const caseReferenceId = pageDetail?.details?.data?.caseReferenceId || '';
|
||||||
|
|
||||||
const handleSubmitState = (state: boolean) => {
|
const handleSubmitState = (state: boolean) => {
|
||||||
@@ -50,9 +57,7 @@ const PauseAction = () => {
|
|||||||
|
|
||||||
const fetchPauseStatus = async () => {
|
const fetchPauseStatus = async () => {
|
||||||
try {
|
try {
|
||||||
const getPauseStatusData = await getLanPauseStatus(caseReferenceId, caseBusinessVertical);
|
dispatch(getPauseDate(loanId, customerId, caseReferenceId, caseBusinessVertical));
|
||||||
setIsSelectedActionUpdatePause(getPauseStatusData?.isPaused);
|
|
||||||
setPausedDate(getPauseStatusData?.pauseTillDate);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error, 'Error while fetching pause status');
|
logError(error, 'Error while fetching pause status');
|
||||||
}
|
}
|
||||||
@@ -70,6 +75,13 @@ const PauseAction = () => {
|
|||||||
pauseEffortsReason: reason === 'OTHERS' ? data.details : reason
|
pauseEffortsReason: reason === 'OTHERS' ? data.details : reason
|
||||||
};
|
};
|
||||||
|
|
||||||
|
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.LH_SNOOZE_EFFORTS_UPDATED, {
|
||||||
|
caseId: caseReferenceId,
|
||||||
|
reason: payload.pauseEffortsReason,
|
||||||
|
pauseEffortsTillDate: pauseDate,
|
||||||
|
loanId: loanId
|
||||||
|
});
|
||||||
|
|
||||||
submitPauseAction({
|
submitPauseAction({
|
||||||
caseId: caseReferenceId,
|
caseId: caseReferenceId,
|
||||||
payload: payload,
|
payload: payload,
|
||||||
@@ -87,35 +99,19 @@ const PauseAction = () => {
|
|||||||
(watch('reason') === 'OTHERS' && !watch('details'));
|
(watch('reason') === 'OTHERS' && !watch('details'));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container} key={isSelectedActionUpdatePause as unknown as string}>
|
<div className={styles.container} key={String(isSnoozed)}>
|
||||||
<div className={styles.feedback}>
|
<div className={styles.feedback}>
|
||||||
<div className={'mt-6 mb-4'}>
|
<div className={'mt-6 mb-4'}>
|
||||||
<Typography variant="h3">
|
<Typography variant="h3">
|
||||||
{isSelectedActionUpdatePause
|
{isSnoozed ? PAUSE_MESSAGE.UPDATE_PAUSE : PAUSE_MESSAGE.PAUSE_COLLECTIONS}
|
||||||
? PAUSE_MESSAGE.UPDATE_PAUSE
|
|
||||||
: PAUSE_MESSAGE.PAUSE_COLLECTIONS}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isSelectedActionUpdatePause ? (
|
|
||||||
<div className="flex bg-[var(--navi-color-gray-bg-secondary)] pt-3 pb-3 pr-3.5 pl-3 rounded">
|
|
||||||
<InfoFilledIcon width={20} height={20} fill={'var(--blue-base)'} />
|
|
||||||
|
|
||||||
<Typography variant="p4" className="ml-2">
|
|
||||||
Collections efforts have been paused till{' '}
|
|
||||||
<Typography as="span" variant="h5" color="var(--navi-color-gray-c1)">
|
|
||||||
{pausedDate ? getFormattedDateWithFullYear(new Date(pausedDate)) : ''}
|
|
||||||
</Typography>
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
name="pauseDate"
|
name="pauseDate"
|
||||||
rules={{
|
rules={{
|
||||||
validate: value =>
|
validate: value =>
|
||||||
!(isSelectedActionUpdatePause && value === pausedDate) || PAUSE_MESSAGE.DATE_ERROR
|
!(isSelectedActionUpdatePause && value === caseSnoozeDate) || PAUSE_MESSAGE.DATE_ERROR
|
||||||
}}
|
}}
|
||||||
render={({ field: { onChange, value } }) => (
|
render={({ field: { onChange, value } }) => (
|
||||||
<DateTimePickerComponent
|
<DateTimePickerComponent
|
||||||
@@ -195,7 +191,6 @@ const PauseAction = () => {
|
|||||||
type={'submit'}
|
type={'submit'}
|
||||||
onClick={handleSubmit(handleSubmitForm)}
|
onClick={handleSubmit(handleSubmitForm)}
|
||||||
className="bg-[var(--navi-color-red-base)]"
|
className="bg-[var(--navi-color-red-base)]"
|
||||||
startAdornment={<PauseIcon />}
|
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled}
|
||||||
>
|
>
|
||||||
{isSelectedActionUpdatePause
|
{isSelectedActionUpdatePause
|
||||||
|
|||||||
@@ -65,9 +65,22 @@ const Payments = () => {
|
|||||||
(state: RootState) =>
|
(state: RootState) =>
|
||||||
state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.details?.data?.editAccessFlag
|
state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.details?.data?.editAccessFlag
|
||||||
);
|
);
|
||||||
|
const pauseEfforts = useSelector(
|
||||||
|
(state: RootState) =>
|
||||||
|
state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused
|
||||||
|
);
|
||||||
|
|
||||||
|
const shouldDisableCTA = () => {
|
||||||
|
if (isGlobalAccessGiven) {
|
||||||
|
return !editAccessFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pauseEfforts ? true : false;
|
||||||
|
};
|
||||||
|
|
||||||
const user = useSelector((state: RootState) => state?.common?.userData);
|
const user = useSelector((state: RootState) => state?.common?.userData);
|
||||||
const isGlobalAccessGiven = user?.roles?.includes(Roles.ROLE_GLOBAL_ACCESS);
|
const isGlobalAccessGiven = user?.roles?.includes(Roles.ROLE_GLOBAL_ACCESS);
|
||||||
const disableCTAs = isGlobalAccessGiven ? !editAccessFlag : false;
|
const disableCTAs = shouldDisableCTA();
|
||||||
const [copyingLink, setCopyingLink] = useState<boolean>(false);
|
const [copyingLink, setCopyingLink] = useState<boolean>(false);
|
||||||
const [sendLink, setSendLink] = useState<boolean>(false);
|
const [sendLink, setSendLink] = useState<boolean>(false);
|
||||||
const [foreclosureAmount, setForeclosureAmount] = useState(null);
|
const [foreclosureAmount, setForeclosureAmount] = useState(null);
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ type Tabs = {
|
|||||||
featureFlagKey?: string;
|
featureFlagKey?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const TabsTORemove = {
|
||||||
|
[TAB_KEYS.ADDRESSES]: true,
|
||||||
|
[TAB_KEYS.CONTACT]: true
|
||||||
|
};
|
||||||
|
|
||||||
export const TABS: Tabs[] = [
|
export const TABS: Tabs[] = [
|
||||||
{
|
{
|
||||||
key: TAB_KEYS.OVERVIEW,
|
key: TAB_KEYS.OVERVIEW,
|
||||||
@@ -216,7 +221,8 @@ export enum STORE_KEYS {
|
|||||||
EMAILS = 'emails',
|
EMAILS = 'emails',
|
||||||
GEOLOCATIONS_ADDRESSES = 'geolocationsAndAddresses',
|
GEOLOCATIONS_ADDRESSES = 'geolocationsAndAddresses',
|
||||||
SIMILAR_GEOLOCATIONS = 'similarGeolocations',
|
SIMILAR_GEOLOCATIONS = 'similarGeolocations',
|
||||||
SECONDARY_SOURCES = 'secondarySources'
|
SECONDARY_SOURCES = 'secondarySources',
|
||||||
|
PAUSE_STATUS = 'pause'
|
||||||
}
|
}
|
||||||
|
|
||||||
const COSMOS_PATH = '/cosmos';
|
const COSMOS_PATH = '/cosmos';
|
||||||
|
|||||||
@@ -107,6 +107,11 @@ const CallBridge = (props: CallBridgeProps) => {
|
|||||||
(state: RootState) => state?.common?.blankDisposition?.disableBlankDisposition
|
(state: RootState) => state?.common?.blankDisposition?.disableBlankDisposition
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const caseSnoozed = useSelector(
|
||||||
|
(state: RootState) =>
|
||||||
|
state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused
|
||||||
|
);
|
||||||
|
|
||||||
const user = useSelector((state: RootState) => state?.common?.userData);
|
const user = useSelector((state: RootState) => state?.common?.userData);
|
||||||
const telephones = useSelector(
|
const telephones = useSelector(
|
||||||
(state: RootState) => state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.telephonesv2
|
(state: RootState) => state?.caseDetail?.pageData?.[createKey(loanId, customerId)]?.telephonesv2
|
||||||
@@ -402,6 +407,13 @@ const CallBridge = (props: CallBridgeProps) => {
|
|||||||
});
|
});
|
||||||
onStartCallClick(phone);
|
onStartCallClick(phone);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const tooltipContent = caseSnoozed
|
||||||
|
? 'Calling is disabled as collections is snoozed for this LAN'
|
||||||
|
: `You can call the customer from ${formatToStandardTimeInHours(getCallingWindowStartTime)} ${
|
||||||
|
isPostMidnight ? 'tomorrow' : 'today'
|
||||||
|
}`;
|
||||||
|
|
||||||
return inlineCallButton ? (
|
return inlineCallButton ? (
|
||||||
<CallIcon onClick={initiateCall} />
|
<CallIcon onClick={initiateCall} />
|
||||||
) : (
|
) : (
|
||||||
@@ -410,7 +422,9 @@ const CallBridge = (props: CallBridgeProps) => {
|
|||||||
<Tooltip placement="top">
|
<Tooltip placement="top">
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<Button
|
<Button
|
||||||
disabled={disableButtons || disableCallButton || isCallingWindowDisabled}
|
disabled={
|
||||||
|
disableButtons || disableCallButton || isCallingWindowDisabled || caseSnoozed
|
||||||
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (disableButtons) return;
|
if (disableButtons) return;
|
||||||
handleCallClick(feedback.telephone || '');
|
handleCallClick(feedback.telephone || '');
|
||||||
@@ -421,13 +435,9 @@ const CallBridge = (props: CallBridgeProps) => {
|
|||||||
Call
|
Call
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
{isCallingWindowDisabled && (
|
{isCallingWindowDisabled || caseSnoozed ? (
|
||||||
<TooltipContent className="tooltipWrapper">
|
<TooltipContent className="tooltipWrapper">{tooltipContent}</TooltipContent>
|
||||||
{`You can call the customer from
|
) : null}
|
||||||
${formatToStandardTimeInHours(getCallingWindowStartTime)}
|
|
||||||
${isPostMidnight ? 'tomorrow' : 'today'}`}
|
|
||||||
</TooltipContent>
|
|
||||||
)}
|
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<Typography variant="p5" className={styles.lightText}>
|
<Typography variant="p5" className={styles.lightText}>
|
||||||
|
|||||||
@@ -100,6 +100,12 @@ const FeedbackFrom = (props: FeedbackFromProps) => {
|
|||||||
const telephones = useSelector(
|
const telephones = useSelector(
|
||||||
(state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)]?.telephonesv2
|
(state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)]?.telephonesv2
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const snoozedCase = useSelector(
|
||||||
|
(state: RootState) =>
|
||||||
|
state.caseDetail.pageData?.[createKey(loanId, customerId)]?.pause?.data?.isPaused
|
||||||
|
);
|
||||||
|
|
||||||
const user = useSelector((state: RootState) => state.common.userData);
|
const user = useSelector((state: RootState) => state.common.userData);
|
||||||
const ameyoCallDetails = useSelector((state: RootState) => state.common.ameyoCallDetails);
|
const ameyoCallDetails = useSelector((state: RootState) => state.common.ameyoCallDetails);
|
||||||
const isTeamLead = useSelector((state: RootState) => state.common?.isTeamLead);
|
const isTeamLead = useSelector((state: RootState) => state.common?.isTeamLead);
|
||||||
@@ -616,6 +622,14 @@ const FeedbackFrom = (props: FeedbackFromProps) => {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const disableWhenSnoozed = (callingTypeValue: string) => {
|
||||||
|
if (snoozedCase && callingTypeValue === ECallingType.SKIP_TRACING) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
const isCallingTypeOptionDisable = (callingTypeValue: string) => {
|
const isCallingTypeOptionDisable = (callingTypeValue: string) => {
|
||||||
return (
|
return (
|
||||||
callingTypeValue === ECallingType.CALL_BRIDGE ||
|
callingTypeValue === ECallingType.CALL_BRIDGE ||
|
||||||
@@ -766,7 +780,9 @@ const FeedbackFrom = (props: FeedbackFromProps) => {
|
|||||||
disableInitialQuestions ||
|
disableInitialQuestions ||
|
||||||
disableWhenLimitIsReached(callingType.value) ||
|
disableWhenLimitIsReached(callingType.value) ||
|
||||||
disableWhenCallingWindowOver(callingType.value) ||
|
disableWhenCallingWindowOver(callingType.value) ||
|
||||||
|
disableWhenSnoozed(callingType.value) ||
|
||||||
disableSelfCall(callingType.value)
|
disableSelfCall(callingType.value)
|
||||||
|
|
||||||
}
|
}
|
||||||
labelClasses={styles.text}
|
labelClasses={styles.text}
|
||||||
onChipClick={() => {
|
onChipClick={() => {
|
||||||
|
|||||||
@@ -218,6 +218,11 @@ export interface IEscalationStatus {
|
|||||||
totalEscalations: number;
|
totalEscalations: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum CaseStatus {
|
||||||
|
ON_HOLD = 'ON_HOLD',
|
||||||
|
ACTIVE = 'ACTIVE'
|
||||||
|
}
|
||||||
|
|
||||||
export interface CustomerDetailApiResponse {
|
export interface CustomerDetailApiResponse {
|
||||||
riskSegment: keyof typeof RiskRating;
|
riskSegment: keyof typeof RiskRating;
|
||||||
caseReferenceId: string;
|
caseReferenceId: string;
|
||||||
@@ -242,7 +247,7 @@ export interface CustomerDetailApiResponse {
|
|||||||
startDate: string;
|
startDate: string;
|
||||||
activationDate: string;
|
activationDate: string;
|
||||||
closingDate?: unknown;
|
closingDate?: unknown;
|
||||||
status: string;
|
status: CaseStatus;
|
||||||
pendingEmiSchedules: PendingEmiSchedule[];
|
pendingEmiSchedules: PendingEmiSchedule[];
|
||||||
partPrePayments: PartPrePayment[];
|
partPrePayments: PartPrePayment[];
|
||||||
repaymentHistory: Repayment[];
|
repaymentHistory: Repayment[];
|
||||||
@@ -552,6 +557,7 @@ export interface CaseDetailsPageData {
|
|||||||
emails: Email[];
|
emails: Email[];
|
||||||
geolocationsAndAddresses: IAddressesGeolocations;
|
geolocationsAndAddresses: IAddressesGeolocations;
|
||||||
similarGeolocations: ISimilarGeolocations;
|
similarGeolocations: ISimilarGeolocations;
|
||||||
|
pause: IPause;
|
||||||
}
|
}
|
||||||
export interface PageData {
|
export interface PageData {
|
||||||
[id: string]: CaseDetailsPageData | null;
|
[id: string]: CaseDetailsPageData | null;
|
||||||
@@ -605,3 +611,10 @@ export interface ISimilarGeolocations extends IApiData {
|
|||||||
clusterId: string;
|
clusterId: string;
|
||||||
timestamps: number[];
|
timestamps: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IPause extends IApiData {
|
||||||
|
data: {
|
||||||
|
isPaused: boolean;
|
||||||
|
pauseTillDate: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import { setGlobalUserData } from '../constants/Global';
|
|||||||
import { Roles } from '../pages/auth/constants/AuthConstants';
|
import { Roles } from '../pages/auth/constants/AuthConstants';
|
||||||
import {
|
import {
|
||||||
checkFieldTLAndClusterAndZonalManagers,
|
checkFieldTLAndClusterAndZonalManagers,
|
||||||
isInternalTeamLead
|
isInternalTeamLead,
|
||||||
|
notHideTabsInCaseOfSnooze
|
||||||
} from 'src/utils/RoleManagementHelper';
|
} from 'src/utils/RoleManagementHelper';
|
||||||
import { getServerTime } from 'src/utils/DateHelper';
|
import { getServerTime } from 'src/utils/DateHelper';
|
||||||
import {
|
import {
|
||||||
@@ -355,6 +356,7 @@ export interface CommonState {
|
|||||||
slashCallStatusFromExtension: SlashCallStatus;
|
slashCallStatusFromExtension: SlashCallStatus;
|
||||||
agentBusinessVertical: string;
|
agentBusinessVertical: string;
|
||||||
callingWindow?: CallingWindow;
|
callingWindow?: CallingWindow;
|
||||||
|
shouldNotHidePauseCasesTab: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CHECK_LOGIN = 'CHECK_LOGIN';
|
export const CHECK_LOGIN = 'CHECK_LOGIN';
|
||||||
@@ -424,7 +426,9 @@ const initialState = {
|
|||||||
callingWindow: {
|
callingWindow: {
|
||||||
callingStartTime: '08:00:00',
|
callingStartTime: '08:00:00',
|
||||||
callingEndTime: '19:00:00'
|
callingEndTime: '19:00:00'
|
||||||
}
|
},
|
||||||
|
shouldNotHidePauseCasesTab: false,
|
||||||
|
isTeamLead: false
|
||||||
} as CommonState;
|
} as CommonState;
|
||||||
|
|
||||||
setGlobalUserData({ token: initialState.userData.token });
|
setGlobalUserData({ token: initialState.userData.token });
|
||||||
@@ -467,6 +471,7 @@ export const commonSlice = createSlice({
|
|||||||
roles,
|
roles,
|
||||||
isNaviUser
|
isNaviUser
|
||||||
);
|
);
|
||||||
|
state.shouldNotHidePauseCasesTab = notHideTabsInCaseOfSnooze(roles, isNaviUser);
|
||||||
}
|
}
|
||||||
state.extensionVersion = action.payload.ameyoExtensionVersion;
|
state.extensionVersion = action.payload.ameyoExtensionVersion;
|
||||||
state.userData = { ...state.userData, ...action.payload };
|
state.userData = { ...state.userData, ...action.payload };
|
||||||
|
|||||||
@@ -886,6 +886,18 @@ export const CLICKSTREAM_EVENT_NAMES = Object.freeze({
|
|||||||
name: 'LH_UniversalCallSDK_CLICKSTREAM_PROCESSOR',
|
name: 'LH_UniversalCallSDK_CLICKSTREAM_PROCESSOR',
|
||||||
description: 'Universal Call SDK Clickstream Processor'
|
description: 'Universal Call SDK Clickstream Processor'
|
||||||
},
|
},
|
||||||
|
LH_SNOOZE_EFFORTS_SUBMITTED: {
|
||||||
|
name: 'LH_SNOOZE_EFFORTS_SUBMITTED',
|
||||||
|
description: 'Snooze Efforts Submitted'
|
||||||
|
},
|
||||||
|
LH_SNOOZE_EFFORTS_UPDATED: {
|
||||||
|
name: 'LH_SNOOZE_EFFORTS_UPDATED',
|
||||||
|
description: 'Snooze Efforts Updated'
|
||||||
|
},
|
||||||
|
LH_SNOOZE_EFFORTS_Filter_CLICKED: {
|
||||||
|
name: 'LH_SNOOZE_EFFORTS_Filter_CLICKED',
|
||||||
|
description: 'Snooze Efforts Filter Clicked'
|
||||||
|
},
|
||||||
// Anomaly Tracker
|
// Anomaly Tracker
|
||||||
LH_ANOMALY_TRACKER_TAB_CHANGE: {
|
LH_ANOMALY_TRACKER_TAB_CHANGE: {
|
||||||
name: 'LH_ANOMALY_TRACKER_TAB_CHANGE',
|
name: 'LH_ANOMALY_TRACKER_TAB_CHANGE',
|
||||||
@@ -922,7 +934,7 @@ export const CLICKSTREAM_EVENT_NAMES = Object.freeze({
|
|||||||
LH_ANOMALY_TRACKER_ANOMALY_RESOLVED_SUBMIT_BUTTON_CLICKED: {
|
LH_ANOMALY_TRACKER_ANOMALY_RESOLVED_SUBMIT_BUTTON_CLICKED: {
|
||||||
name: 'LH_ANOMALY_TRACKER_ANOMALY_RESOLVED_SUBMIT_BUTTON_CLICKED',
|
name: 'LH_ANOMALY_TRACKER_ANOMALY_RESOLVED_SUBMIT_BUTTON_CLICKED',
|
||||||
description: 'Anomaly Tracker anomaly resolved'
|
description: 'Anomaly Tracker anomaly resolved'
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const CLICKSTREAM_EVENT_NAMES_FA = Object.freeze({
|
export const CLICKSTREAM_EVENT_NAMES_FA = Object.freeze({
|
||||||
|
|||||||
@@ -14,6 +14,13 @@ const fieldTLAndClusterAndZonalManagers = {
|
|||||||
[Roles.ROLE_NAVI_FIELD_TEAM_LEAD]: Roles.ROLE_NAVI_FIELD_TEAM_LEAD
|
[Roles.ROLE_NAVI_FIELD_TEAM_LEAD]: Roles.ROLE_NAVI_FIELD_TEAM_LEAD
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const rolesForHidePauseCasesTabCases = {
|
||||||
|
[Roles.ROLE_COLLECTION_EFFORTS_PAUSE_ACCESS]: Roles.ROLE_COLLECTION_EFFORTS_PAUSE_ACCESS,
|
||||||
|
[Roles.ROLE_GLOBAL_ACCESS]: Roles.ROLE_GLOBAL_ACCESS,
|
||||||
|
[Roles.ROLE_COLLECTION_HEAD]: Roles.ROLE_COLLECTION_HEAD,
|
||||||
|
[Roles.ROLE_USER_MANAGEMENT_ADMIN]: Roles.ROLE_USER_MANAGEMENT_ADMIN
|
||||||
|
};
|
||||||
|
|
||||||
// Check if the user is a team lead
|
// Check if the user is a team lead
|
||||||
// criteria: user has role USER_ROLE_TEAM_LEAD, USER_ROLE_INTERNAL_TEAM_LEAD and isNaviUser true
|
// criteria: user has role USER_ROLE_TEAM_LEAD, USER_ROLE_INTERNAL_TEAM_LEAD and isNaviUser true
|
||||||
export const isInternalTeamLead = (roles: Array<string>, isNaviUser: boolean): boolean => {
|
export const isInternalTeamLead = (roles: Array<string>, isNaviUser: boolean): boolean => {
|
||||||
@@ -44,3 +51,14 @@ export const checkFieldTLAndClusterAndZonalManagers = (
|
|||||||
}
|
}
|
||||||
return isInternalTeamLead;
|
return isInternalTeamLead;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const notHideTabsInCaseOfSnooze = (roles: Array<string>, isNaviUser: boolean): boolean => {
|
||||||
|
if (!roles.length) return false;
|
||||||
|
let notHideTabsInCaseOfSnooze = false;
|
||||||
|
for (let i = 0; i < roles.length; i++) {
|
||||||
|
if (rolesForHidePauseCasesTabCases[roles[i] as keyof typeof rolesForHidePauseCasesTabCases]) {
|
||||||
|
notHideTabsInCaseOfSnooze = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return notHideTabsInCaseOfSnooze;
|
||||||
|
};
|
||||||
|
|||||||
@@ -79,6 +79,9 @@ module.exports = {
|
|||||||
'green-dark-1': 'var(--green-dark-1)',
|
'green-dark-1': 'var(--green-dark-1)',
|
||||||
'green-dark-2': 'var(--green-dark-2)'
|
'green-dark-2': 'var(--green-dark-2)'
|
||||||
},
|
},
|
||||||
|
backgroundColor: {
|
||||||
|
'red-background': 'var(--pale-red)'
|
||||||
|
},
|
||||||
boxShadow: {
|
boxShadow: {
|
||||||
base: 'var(--box-shadow-4)',
|
base: 'var(--box-shadow-4)',
|
||||||
3: 'var(--box-shadow-3)',
|
3: 'var(--box-shadow-3)',
|
||||||
|
|||||||
Reference in New Issue
Block a user