- 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 (