From 17154ca5a5c24cef2a064bd136c78c2a63f791bb Mon Sep 17 00:00:00 2001 From: Kunal Sharma Date: Wed, 24 Jul 2024 10:47:31 +0530 Subject: [PATCH] Revert "TP-69872|Kunal|daily-limit on ameyo and slash calls (#1042)" (#1053) This reverts commit c9c4376c068936f4811ebef15d236758e2ad6603. --- src/assets/icons/ClockIcon.tsx | 14 -- .../CallHistory/CallHistory.module.scss | 2 +- .../CallHistory/CallInteractionHistory.tsx | 11 +- src/components/Dropdown/SelectPicker.tsx | 2 - src/components/Dropdown/SelectPickerItem.tsx | 9 +- src/components/Dropdown/index.tsx | 2 - src/components/Dropdown/interfaces.ts | 6 - .../components/Overview/CallHistoryBox.tsx | 96 ++-------- .../components/Overview/index.module.scss | 3 - .../PhoneNumber/CustomerDeviceData.tsx | 100 ++++++++++- .../PhoneNumber/PhoneNumberContactCard.tsx | 170 ------------------ .../components/PhoneNumber/index.module.scss | 32 +--- .../CaseDetails/components/PocTag/Index.tsx | 80 +++------ .../constants/Overview.constant.ts | 2 - .../component/CallBridge/CallBridge.tsx | 6 +- .../component/Contacts/DefaultContacts.tsx | 141 ++++----------- .../component/Contacts/index.module.scss | 3 - src/pages/CaseDetails/feedbackForm/index.tsx | 11 +- .../CaseDetails/interfaces/CaseDetail.type.ts | 15 -- 19 files changed, 184 insertions(+), 521 deletions(-) delete mode 100644 src/assets/icons/ClockIcon.tsx delete mode 100644 src/pages/CaseDetails/components/PhoneNumber/PhoneNumberContactCard.tsx diff --git a/src/assets/icons/ClockIcon.tsx b/src/assets/icons/ClockIcon.tsx deleted file mode 100644 index bfb31f37..00000000 --- a/src/assets/icons/ClockIcon.tsx +++ /dev/null @@ -1,14 +0,0 @@ -const ClockIcon = () => ( - - - - - - - - -); -export default ClockIcon; diff --git a/src/components/CallHistory/CallHistory.module.scss b/src/components/CallHistory/CallHistory.module.scss index 888d8874..ca641d53 100644 --- a/src/components/CallHistory/CallHistory.module.scss +++ b/src/components/CallHistory/CallHistory.module.scss @@ -12,5 +12,5 @@ letter-spacing: -0.12px; } .toolTipStyle { - max-width: 270px !important; + max-width: 212px !important; } diff --git a/src/components/CallHistory/CallInteractionHistory.tsx b/src/components/CallHistory/CallInteractionHistory.tsx index 84f24049..68aa2912 100644 --- a/src/components/CallHistory/CallInteractionHistory.tsx +++ b/src/components/CallHistory/CallInteractionHistory.tsx @@ -3,7 +3,7 @@ import RedCrossIcon from '../../assets/images/icons/RedCrossIcon'; import GreyCircleIcon from '../../assets/images/icons/GreyCircleIcon'; import styles from './CallHistory.module.scss'; import { CallBasedInteractions } from 'src/pages/CaseDetails/interfaces/CaseDetail.type'; -import { DateFormat, dateFormat } from 'src/utils/DateHelper'; +import { dateFormat } from 'src/utils/DateHelper'; import { FeedbackTypesCodeMap } from 'src/pages/Cases/constants/CasesConstants'; import { Tooltip, TooltipContent, TooltipTrigger } from '../TooltipV2/TooltipV2'; import cx from 'classnames'; @@ -65,18 +65,11 @@ const CallStatusList = ({ showTooltip ? (
- Call Date and Time:{' '} - {dateFormat( - new Date(callRecord.interactionTimestamp), - DateFormat.LONG_DATE_FORMAT_WITH_TIME - )}{' '} + Call Date: {dateFormat(new Date(callRecord.interactionTimestamp), 'DD MMM, YYYY')}{' '} Disposition: {FeedbackTypesCodeMap[callRecord?.tag]?.label || callRecord?.tag} - - Phone Number: {callRecord?.recipientNumber} -
) : ( '' diff --git a/src/components/Dropdown/SelectPicker.tsx b/src/components/Dropdown/SelectPicker.tsx index 18add8d9..3648e62e 100644 --- a/src/components/Dropdown/SelectPicker.tsx +++ b/src/components/Dropdown/SelectPicker.tsx @@ -15,7 +15,6 @@ const SelectPicker: React.FC = ({ showSourceAtBottom = false, optionPosition = OptionPosition.bottom, customOptionTemplate, - selectPickerItemClass, ...restProps }) => { const renderOptions = useMemo(() => { @@ -35,7 +34,6 @@ const SelectPicker: React.FC = ({ multiSelect={multiSelect} showSourceAtBottom={showSourceAtBottom} customOptionTemplate={customOptionTemplate} - selectPickerItemClass={selectPickerItemClass} /> )); }, [options, selectedValue, showSourceAtBottom]); diff --git a/src/components/Dropdown/SelectPickerItem.tsx b/src/components/Dropdown/SelectPickerItem.tsx index 93b4d071..d5fbd911 100644 --- a/src/components/Dropdown/SelectPickerItem.tsx +++ b/src/components/Dropdown/SelectPickerItem.tsx @@ -10,10 +10,9 @@ const SelectPickerItem = ({ onOptionClick, multiSelect, showSourceAtBottom = false, - customOptionTemplate, - selectPickerItemClass + customOptionTemplate }: SelectPickerItemProps) => { - const { label, source, isDisabled, rightAdornment, dailyLimit, hourlyLimit } = optionInfo; + const { label, source, isDisabled, rightAdornment } = optionInfo; const handleClick = () => { onOptionClick(optionInfo); @@ -26,9 +25,7 @@ const SelectPickerItem = ({
diff --git a/src/components/Dropdown/index.tsx b/src/components/Dropdown/index.tsx index 6b15717c..e2943fa6 100644 --- a/src/components/Dropdown/index.tsx +++ b/src/components/Dropdown/index.tsx @@ -60,7 +60,6 @@ const Dropdown: React.FC = ({ pickerContainerClasses, showTextCursorOnDisabled = false, tabIndexEnabled = false, - selectPickerItemClass = '', ...restProps }) => { const [showPicker, setShowPicker] = useState(false); @@ -266,7 +265,6 @@ const Dropdown: React.FC = ({ showSourceAtBottom={showSourceAtBottom} optionPosition={optionPosition} customOptionTemplate={customOptionTemplate} - selectPickerItemClass={selectPickerItemClass} {...restProps} /> )} diff --git a/src/components/Dropdown/interfaces.ts b/src/components/Dropdown/interfaces.ts index 907eb3df..6780799a 100644 --- a/src/components/Dropdown/interfaces.ts +++ b/src/components/Dropdown/interfaces.ts @@ -1,6 +1,5 @@ import { GenericObject } from '@cp/src/types/CommonConstans'; import { ReactNode } from 'react'; -import { IPhoneNumberLimit } from '@cp/pages/CaseDetails/interfaces/CaseDetail.type'; export interface DropdownProps { /** Dropdown Options */ @@ -28,7 +27,6 @@ export interface DropdownProps { pickerContainerClasses?: string; showTextCursorOnDisabled?: boolean; tabIndexEnabled?: boolean; - selectPickerItemClass?: string; } export enum OptionPosition { @@ -42,8 +40,6 @@ export interface SelectPickerOptionProps { source?: string | ReactNode; isDisabled?: boolean; rightAdornment?: ReactNode; - dailyLimit?: IPhoneNumberLimit; - hourlyLimit?: IPhoneNumberLimit; } export interface SelectPickerProps extends React.ComponentPropsWithoutRef<'div'> { @@ -64,7 +60,6 @@ export interface SelectPickerProps extends React.ComponentPropsWithoutRef<'div'> showSourceAtBottom?: boolean; optionPosition?: OptionPosition; customOptionTemplate?: (option: string) => ReactNode; - selectPickerItemClass?: string; } export type SelectPickerValue = string | number; @@ -76,7 +71,6 @@ export interface SelectPickerItemProps { multiSelect: boolean; showSourceAtBottom?: boolean; customOptionTemplate?: (option: string, optionInfo?: GenericObject) => ReactNode; - selectPickerItemClass?: string; } export type SelectionChangeType = ( diff --git a/src/pages/CaseDetails/components/Overview/CallHistoryBox.tsx b/src/pages/CaseDetails/components/Overview/CallHistoryBox.tsx index f298abed..a86c7c3f 100644 --- a/src/pages/CaseDetails/components/Overview/CallHistoryBox.tsx +++ b/src/pages/CaseDetails/components/Overview/CallHistoryBox.tsx @@ -9,14 +9,11 @@ import { DateFormat, UnitsEnum, dateDiff, dateFormat, utcToIST } from 'src/utils import GridContainer from '@navi/web-ui/lib/layouts/Grid/GridContainer/GridContainer'; import GridRow from '@navi/web-ui/lib/layouts/Grid/GridRow/GridRow'; import GridColumn from '@navi/web-ui/lib/layouts/Grid/GridColumn/GridColumn'; -import { CallBasedInteractions, LIMIT_TYPE, PtpStatus } from '../../interfaces/CaseDetail.type'; +import { CallBasedInteractions, PtpStatus } from '../../interfaces/CaseDetail.type'; import { PreviousPTPs } from './PreviousPTPs'; import cx from 'classnames'; import CallInteractionHistory from 'src/components/CallHistory/CallInteractionHistory'; import { IconProps } from '@navi/web-ui/lib/icons/types'; -import CircularProgress from '@cp/components/ProgressBars/circularProgress/CircularProgress'; -import { useMemo } from 'react'; -import dayjs from 'dayjs'; const NO_OF_RECORDS = 5; @@ -31,7 +28,6 @@ const CallHistoryBox = () => { const pageData = useSelector( (state: RootState) => state.caseDetail.pageData?.[createKey(loanId, customerId)] ); - const { data: telephones } = pageData?.telephonesv2 || {}; const { data: caseDetails } = pageData?.details || {}; const { callBasedInteractions = [], ptpStatuses = [] } = caseDetails || {}; @@ -40,6 +36,7 @@ const CallHistoryBox = () => { return new Date(a.interactionTimestamp) > new Date(b.interactionTimestamp) ? 1 : -1; }) .pop()?.interactionTimestamp; + const currentDate = dateFormat(new Date(), DateFormat.ISO_DATE_FORMAT); const previousDayDate = dateFormat(getPreviousDate(), DateFormat.ISO_DATE_FORMAT); const difference = lastCalledTime @@ -47,34 +44,29 @@ const CallHistoryBox = () => { : undefined; const iconProps: IconProps = { width: 24, height: 24 }; const LastCalled = () => { - const dateInIST = new Date(utcToIST(lastCalledTime)); - const lastCalledDate = dateFormat(dateInIST, DateFormat.ISO_DATE_FORMAT); - const lastCalledDateLong = dateFormat(dateInIST, DateFormat.LONG_DATE_FORMAT_WITHOUT_TIME); - const lastCalledTimeHHMM = dateFormat(dateInIST, DateFormat.HH_mm_ampm); + const lastCalledDate = dateFormat( + new Date(utcToIST(lastCalledTime)), + DateFormat.ISO_DATE_FORMAT + ); if (lastCalledTime) { switch (lastCalledDate) { case currentDate: return ( - Today at {lastCalledTimeHHMM} + Today ); case previousDayDate: return ( - Yesterday at {lastCalledTimeHHMM} + Yesterday ); default: return ( - <> - - Not called since last {difference} days{' '} - - - (Last call attempt: {lastCalledDateLong}) - - + + Not called since last {difference} days + ); } } else { @@ -85,35 +77,6 @@ const CallHistoryBox = () => { ); } }; - const { totalCallsRemaining, nextCallTime, callRemainingPercentage } = useMemo(() => { - let newTotalCallsRemaining = 0; - let newLastCallTime: dayjs.Dayjs | null = null; - let nextCallTime; - let totalMaxCalls = 0; - telephones?.forEach(telephone => { - telephone?.limit.forEach(limitRecord => { - if (limitRecord?.type === LIMIT_TYPE.DAILY) { - newTotalCallsRemaining += limitRecord?.callRemaining || 0; - totalMaxCalls += limitRecord?.maxCalls || 0; - } - if (limitRecord?.callRemaining === 0 && limitRecord.nextCallingTime) { - const nextCallAvailableTime = dayjs(limitRecord.nextCallingTime); - newLastCallTime = - newLastCallTime && nextCallAvailableTime.isBefore(newLastCallTime) - ? nextCallAvailableTime - : newLastCallTime; - nextCallTime = newLastCallTime?.format('HH:mm A'); - } - }); - }); - const callRemainingPercentage = Math.round((newTotalCallsRemaining / totalMaxCalls) * 100); - return { - totalCallsRemaining: newTotalCallsRemaining, - nextCallTime, - callRemainingPercentage: - callRemainingPercentage > 90 && callRemainingPercentage < 100 ? 90 : callRemainingPercentage - }; - }, [telephones]); return ( @@ -124,7 +87,7 @@ const CallHistoryBox = () => { padding: '0 8px' }} > - +
Last Called : @@ -138,43 +101,16 @@ const CallHistoryBox = () => {
-
- - - {totalCallsRemaining} calls remaining - - {nextCallTime ? ( - <> - - | - - - Next call attempt available - - {totalCallsRemaining === 0 ? 'tommorow' : ` at ${nextCallTime}`} - - - - ) : null} -
+ + Total Call Attempts +
Last {NO_OF_RECORDS} calls Status
- - +
{!ptpStatuses?.length ? (
diff --git a/src/pages/CaseDetails/components/Overview/index.module.scss b/src/pages/CaseDetails/components/Overview/index.module.scss index 3d078fd2..7e27fc0a 100644 --- a/src/pages/CaseDetails/components/Overview/index.module.scss +++ b/src/pages/CaseDetails/components/Overview/index.module.scss @@ -76,9 +76,6 @@ align-items: center; padding: 8px 16px; flex-basis: 100%; - .progress { - stroke: var(--blue-base); - } } } diff --git a/src/pages/CaseDetails/components/PhoneNumber/CustomerDeviceData.tsx b/src/pages/CaseDetails/components/PhoneNumber/CustomerDeviceData.tsx index d2f220ad..3a6c4a32 100644 --- a/src/pages/CaseDetails/components/PhoneNumber/CustomerDeviceData.tsx +++ b/src/pages/CaseDetails/components/PhoneNumber/CustomerDeviceData.tsx @@ -1,15 +1,107 @@ import React from 'react'; + +import Typography from '@navi/web-ui/lib/primitives/Typography'; import styles from './index.module.scss'; +import CallHistory from 'src/components/CallHistory/CallHistory'; import { ITelephones } from '../../interfaces/CaseDetail.type'; -import PhoneNumberContactCard from '@cp/pages/CaseDetails/components/PhoneNumber/PhoneNumberContactCard'; +import { DateFormat, getFormatDate, utcToIST } from 'src/utils/DateHelper'; +import OpenInNewTabIcon from 'src/assets/icons/OpenInNewTabIcon'; +import { Tooltip, TooltipContent, TooltipTrigger } from 'src/components/TooltipV2/TooltipV2'; +import { PhoneNumberSourceText } from '@cp/src/components/Ameyo/interfaces'; +import cx from 'classnames'; +import PocNumbersTag from '../PocTag/Index'; +import { POC_TAG_SOURCES } from '@cp/src/pages/CaseDetails/components/PocTag/constants'; + +const NO_OF_RECORDS = 5; const CustomerDeviceData: React.FC = props => { const { data = [] } = props; + + const openTrueCallerTab = (number: string) => { + window.open(`tel:${number}`, '_blank'); + }; return (
- {data?.map(callData => ( - - ))} + {data?.map(callData => { + return callData?.number ? ( +
+
+
+ {getFormatDate( + utcToIST(callData?.createdAt as unknown as Date), + DateFormat.DD_MMM_YYYY + )} +
+
+
+ {callData?.isPoc ? ( + + ) : ( +
{callData?.number}
+ )} + {callData?.new && ( +
New
+ )} +
+
+ + + +
openTrueCallerTab(callData?.number)} + > + +
Truecaller ID
+
+
+ + + Open Truecaller + +
+
+
+ + {callData?.sources.slice(0, 2).map((source, index) => ( + <> + + {PhoneNumberSourceText[source] ?? source} + {index == 0 && callData?.sources?.length > 1 ? ', ' : ''} + + + ))} + + {callData?.sources?.length > 2 && ( + <> + + + + {' +' + (callData?.sources?.length - 2) + ' more'} + + + + + {callData?.sources + ?.slice(2, callData?.sources?.length) + .map((source, index) => ( + + {PhoneNumberSourceText[source] ?? source}{' '} + {index < callData.sources.length - 3 ? ', ' : ''} + + ))} + + + + )} +
+
+ ) : null; + })}
); }; diff --git a/src/pages/CaseDetails/components/PhoneNumber/PhoneNumberContactCard.tsx b/src/pages/CaseDetails/components/PhoneNumber/PhoneNumberContactCard.tsx deleted file mode 100644 index 89f01383..00000000 --- a/src/pages/CaseDetails/components/PhoneNumber/PhoneNumberContactCard.tsx +++ /dev/null @@ -1,170 +0,0 @@ -import styles from '@cp/pages/CaseDetails/components/PhoneNumber/index.module.scss'; -import { DateFormat, getFormatDate, utcToIST } from '@cp/utils/DateHelper'; -import { POC_TAG_SOURCES } from '@cp/pages/CaseDetails/components/PocTag/constants'; -import cx from 'classnames'; -import CircularProgress from '@cp/components/ProgressBars/circularProgress/CircularProgress'; -import Typography from '@primitives/Typography'; -import CallHistory from '@cp/components/CallHistory/CallHistory'; -import { Tooltip, TooltipContent, TooltipTrigger } from '@cp/components/TooltipV2/TooltipV2'; -import OpenInNewTabIcon from '@cp/assets/icons/OpenInNewTabIcon'; -import { PhoneNumberSourceText } from '@cp/components/Ameyo/interfaces'; -import React, { useMemo } from 'react'; -import { ITelePhoneData, LIMIT_TYPE } from '@cp/pages/CaseDetails/interfaces/CaseDetail.type'; -import PocNumbersTag from '../PocTag/Index'; -import dayjs from 'dayjs'; -import InfoIconOutlined from '@cp/assets/images/icons/InfoIconOutlined'; - -const NO_OF_RECORDS = 5; - -const PhoneNumberContactCard = ({ callData }: { callData: ITelePhoneData }) => { - const openTrueCallerTab = (number: string) => { - window.open(`tel:${number}`, '_blank'); - }; - const { dailyLimit, hourlyLimit, callRemainingPercentage } = useMemo(() => { - const dailyLimit = callData?.limit?.find(limitRecord => limitRecord.type === LIMIT_TYPE.DAILY); - const hourlyLimit = callData?.limit?.find( - limitRecord => limitRecord.type === LIMIT_TYPE.HOURLY - ); - return { - dailyLimit, - hourlyLimit, - callRemainingPercentage: dailyLimit - ? Math.floor((dailyLimit?.callRemaining / dailyLimit?.maxCalls) * 100) - : 0 - }; - }, [callData]); - - return callData?.number ? ( -
-
-
- {getFormatDate(utcToIST(callData?.createdAt as unknown as Date), DateFormat.DD_MMM_YYYY)} -
-
-
- {callData?.isPoc ? ( - - ) : ( -
{callData?.number}
- )} - {callData?.new && ( -
New
- )} -
-
-
-
- 90 && callRemainingPercentage < 100 - ? 90 - : callRemainingPercentage - } - strokeWidth={3} - withAnimation - /> - - - {dailyLimit?.callRemaining} - - calls remaining - {dailyLimit?.remarks ? ( - - - - - - {dailyLimit?.remarks} - - - ) : null} - -
- {dailyLimit?.callRemaining === 0 ? ( -
- - Next call attempt:{' '} - - tomorrow - - -
- ) : hourlyLimit?.nextCallingTime ? ( - - Next call attempt available at - - {dayjs(hourlyLimit?.nextCallingTime).format('HH:mm A')} - - - ) : null} -
-
- - - -
openTrueCallerTab(callData?.number)} - > - -
Truecaller ID
-
-
- - Open Truecaller -
-
-
-
- - {callData?.sources.slice(0, 2).map((source, index) => ( - <> - - {PhoneNumberSourceText[source] ?? source} - {index == 0 && callData?.sources?.length > 1 ? ', ' : ''} - - - ))} - - {callData?.sources?.length > 2 && ( - <> - - - - {' +' + (callData?.sources?.length - 2) + ' more'} - - - - - {callData?.sources?.slice(2, callData?.sources?.length).map((source, index) => ( - - {PhoneNumberSourceText[source] ?? source}{' '} - {index < callData.sources.length - 3 ? ', ' : ''} - - ))} - - - - )} -
-
- ) : null; -}; - -export default PhoneNumberContactCard; diff --git a/src/pages/CaseDetails/components/PhoneNumber/index.module.scss b/src/pages/CaseDetails/components/PhoneNumber/index.module.scss index 8527269a..1402598f 100644 --- a/src/pages/CaseDetails/components/PhoneNumber/index.module.scss +++ b/src/pages/CaseDetails/components/PhoneNumber/index.module.scss @@ -2,7 +2,7 @@ padding: 0px 6px 20px 0px; display: flex; flex-wrap: wrap; - margin: 0px 16px; + margin: 0px 24px; } .header { display: flex; @@ -54,7 +54,6 @@ top: 0px; border-bottom-left-radius: 11px; background: var(--bg-secondary); - z-index: 1; .dateText { color: var(--grayscale-2); font-weight: 400; @@ -65,7 +64,7 @@ } .sourcesWrapper { - background: transparent; + background: var(--bg-secondary); padding: 9px 16px; font-weight: 500; font-size: 12px; @@ -84,24 +83,7 @@ display: flex; justify-content: space-between; align-items: center; - padding: 12px 16px; - background-color: var(--blue-light-bg); - gap: 8px 4px; - } - .limitsContainer { - .limitsProgress { - display: flex; - align-items: center; - gap: 4px; - flex-basis: 50%; - } - .limitswrapper { - margin-top: 8px; - display: flex; - align-items: center; - background-color: var(--blue-light-bg); - gap: 4px; - } + padding: 0 12px 16px 12px; } .trueCallerWrapper { background: var(--bg-blue); @@ -110,9 +92,6 @@ align-items: center; padding: 4px; cursor: pointer; - width: fit-content; - margin-top: 6px; - margin-left: auto; .truecallerText { font-weight: 500; font-size: 12px; @@ -124,10 +103,9 @@ .phoneNumberWrapperStyles { display: flex; align-items: center; - padding: 12px 16px; + padding: 12px 12px 12px 12px; position: relative; - width: 100%; - background-color: transparent; + width: 68%; } .heading { diff --git a/src/pages/CaseDetails/components/PocTag/Index.tsx b/src/pages/CaseDetails/components/PocTag/Index.tsx index 46d851a7..dd74147d 100644 --- a/src/pages/CaseDetails/components/PocTag/Index.tsx +++ b/src/pages/CaseDetails/components/PocTag/Index.tsx @@ -3,31 +3,19 @@ import Typography from '@navi/web-ui/lib/primitives/Typography/Typography'; import styles from './styles.module.scss'; import cx from 'classnames'; import { POC_TAG_SOURCES } from './constants'; -import ClockIcon from '@cp/assets/icons/ClockIcon'; -import React from 'react'; -import { ICallHistory } from '@cp/components/CallHistory/interfaces'; -import CallHistory from '@cp/components/CallHistory/CallHistory'; -import { IPhoneNumberLimit } from '@cp/pages/CaseDetails/interfaces/CaseDetail.type'; -import dayjs from 'dayjs'; const PocNumbersTag = ({ source, number, - option, - callHistory, - dailyLimit, - hourlyLimit + option }: { source: POC_TAG_SOURCES; number?: string; option?: string; - callHistory?: ICallHistory[]; - dailyLimit?: IPhoneNumberLimit; - hourlyLimit?: IPhoneNumberLimit; }) => { if (source === POC_TAG_SOURCES.CONTACT_TAB) { return ( -
+
@@ -51,52 +39,26 @@ const PocNumbersTag = ({ ); } else if (source === POC_TAG_SOURCES.FEEDBACK_FORM) { return ( -
-
-
- - -
-
-
{option}
-
-
- - Try - -
- - - New number added. Try calling on them - - -
- {callHistory && } -
- {dailyLimit?.callRemaining === 0 ? ( -
- - - Next call attempt available{' '} - - tomorrow +
+ + +
+
+
{option}
+
+
+ + Try - -
- ) : hourlyLimit?.nextCallingTime ? ( -
- - - Next call attempt available - - {dayjs(hourlyLimit?.nextCallingTime).format('HH:mm A')} - - -
- ) : null} +
+
+ + New number added. Try calling on them + +
); } else { diff --git a/src/pages/CaseDetails/constants/Overview.constant.ts b/src/pages/CaseDetails/constants/Overview.constant.ts index 6b8d8def..7e9fb84e 100644 --- a/src/pages/CaseDetails/constants/Overview.constant.ts +++ b/src/pages/CaseDetails/constants/Overview.constant.ts @@ -19,5 +19,3 @@ export const DUE_PAID_STATUS = { ON_TIME: 'On-time', LATE: 'Late' } as { [key: string]: string }; - -export const CALL_SOURCE_LIMIT = 2; diff --git a/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx b/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx index f354aced..eb7d5d60 100644 --- a/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx +++ b/src/pages/CaseDetails/feedbackForm/component/CallBridge/CallBridge.tsx @@ -54,7 +54,6 @@ interface CallBridgeProps { telephoneSource?: string; telephoneRefId?: string; currentCallType?: ECallingType; - disableCallButton?: boolean; } const buildCreateCallBridgeRequestBody = ( @@ -84,8 +83,7 @@ const CallBridge = (props: CallBridgeProps) => { interactionType, telephoneSource, telephoneRefId, - currentCallType, - disableCallButton + currentCallType } = props; const dispatch = useDispatch(); const navigate = useNavigate(); @@ -357,7 +355,7 @@ const CallBridge = (props: CallBridgeProps) => { <>
); diff --git a/src/pages/CaseDetails/feedbackForm/component/Contacts/index.module.scss b/src/pages/CaseDetails/feedbackForm/component/Contacts/index.module.scss index 583ae778..d70a97b1 100644 --- a/src/pages/CaseDetails/feedbackForm/component/Contacts/index.module.scss +++ b/src/pages/CaseDetails/feedbackForm/component/Contacts/index.module.scss @@ -47,9 +47,6 @@ } } -.selectedPickerItemLimits { - background-color: rgba(246, 247, 249, 0.8); -} .defaultContacts { .phoneNumberSelectContainer { margin-bottom: 15px; diff --git a/src/pages/CaseDetails/feedbackForm/index.tsx b/src/pages/CaseDetails/feedbackForm/index.tsx index e509c0c5..3c01b082 100644 --- a/src/pages/CaseDetails/feedbackForm/index.tsx +++ b/src/pages/CaseDetails/feedbackForm/index.tsx @@ -38,7 +38,7 @@ import { import Loader from '../../../components/Loader/Loader'; import CancelCircleFilled from '../../../assets/icons/CancelCircledFilled'; import { fetchFeedbackHistory } from '../actions/overviewActions'; -import { LOCAL_STORAGE_KEYS, SESSION_STORAGE_KEYS } from '@cp/constants/StorageKeys'; +import { LOCAL_STORAGE_KEYS, SESSION_STORAGE_KEYS } from '../../../constants/StorageKeys'; import { FeedbackTabsEnum } from './component/FeedbackTabs/FeedbackTabs'; import SkipTracing from './component/Contacts/SkipTracing'; import Spade from './component/Contacts/Spade'; @@ -46,9 +46,9 @@ import DefaultContacts from './component/Contacts/DefaultContacts'; import NextPreviousCaseActions from './component/NextPreviousCaseActions'; import { toast } from '@navi/web-ui/lib/primitives/Toast'; import { setAmeyoCallDetails, setBlankDisposition } from 'src/reducers/commonSlice'; -import { createQueryParams, readQueryParams } from '@cp/utils/QueryParamsHelper'; -import { addClickstreamEvent } from '@cp/src/service/clickStreamEventService'; -import { CLICKSTREAM_EVENT_NAMES } from '@cp/src/service/clickStream.constant'; +import { createQueryParams, readQueryParams } from '../../../utils/QueryParamsHelper'; +import { addClickstreamEvent } from '../../../service/clickStreamEventService'; +import { CLICKSTREAM_EVENT_NAMES } from '../../../service/clickStream.constant'; import RadioGroup from '@navi/web-ui/lib/components/RadioGroup'; import { OLD_CALLING_TYPES, REVAMPED_CALLING_TYPES } from '../constants'; import { @@ -65,7 +65,6 @@ import { import isLitmusExperimentEnabled from '@cp/utils/isLitmusExperimentEnabled'; import { LITMUS_EXPERIMENT_NAMES } from '@cp/constants/litmusExperimentNames'; import { Roles } from '@cp/pages/auth/constants/AuthConstants'; -import { getTelephonesV2 } from '@cp/pages/CaseDetails/actions/casesDetailsActions'; interface FeedbackFromProps { isDisableNextPreviousCaseAction?: boolean; @@ -603,11 +602,11 @@ const FeedbackFrom = (props: FeedbackFromProps) => { dispatch(fetchFeedbackHistory(loanId, customerId, payload)); dispatch(resetFeedbackQuestionTypes()); dispatch(setSkipTracingInitialQuestions([])); - dispatch(getTelephonesV2(loanId, customerId)); setSkipTracingType(null); localStorage.removeItem(LOCAL_STORAGE_KEYS.AMEYO_INTERACTION_ID); sessionStorage.removeItem(SESSION_STORAGE_KEYS.INTERACTION_ID); setAmeyoCallDetails({ interactionId: '', recipientNumber: '', crtObjectId: '' }); + toggleLoading(); reset(); if (ameyoQueryParams) { diff --git a/src/pages/CaseDetails/interfaces/CaseDetail.type.ts b/src/pages/CaseDetails/interfaces/CaseDetail.type.ts index d85098c5..7b02d09b 100644 --- a/src/pages/CaseDetails/interfaces/CaseDetail.type.ts +++ b/src/pages/CaseDetails/interfaces/CaseDetail.type.ts @@ -341,20 +341,6 @@ export interface ILegalDocument extends IApiData { loading: boolean; } -export enum LIMIT_TYPE { - DAILY = 'DAILY', - HOURLY = 'HOURLY' -} - -export interface IPhoneNumberLimit { - type: LIMIT_TYPE; - callsMade: number; - callRemaining: number; - maxCalls: number; - nextCallingTime: string; - remarks: string; -} - export interface ITelePhoneData { type: string; source: string; @@ -369,7 +355,6 @@ export interface ITelePhoneData { oldestSource: string; createdAt: string; isPoc: boolean; - limit: IPhoneNumberLimit[]; } interface IAddresses extends IApiData {