Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ import {
NO_CALLER_ID,
NO_PHONE_NUMBER,
NO_TEAM_NAME,
NO_RONA,
ON_HOLD,
QUEUE,
PHONE_NUMBER,
CUSTOMER_NAME,
RONA,
} from '../constants';
import {withMetrics} from '@webex/cc-ui-logging';

Expand Down Expand Up @@ -68,6 +66,8 @@ const CallControlCADComponent: React.FC<CallControlComponentProps> = (props) =>

//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762
const ani = currentTask?.data?.interaction?.callAssociatedDetails?.ani;
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762
const dn = currentTask?.data?.interaction?.callAssociatedDetails?.dn;

// Create unique IDs for tooltips
const customerNameTriggerId = `customer-name-trigger-${currentTask.data.interaction.interactionId}`;
Expand Down Expand Up @@ -113,7 +113,7 @@ const CallControlCADComponent: React.FC<CallControlComponentProps> = (props) =>
};

const renderPhoneNumber = () => {
const phoneText = isSocial ? customerName || NO_CUSTOMER_NAME : ani || NO_PHONE_NUMBER;
const phoneText = isSocial ? customerName || NO_CUSTOMER_NAME : dn || NO_PHONE_NUMBER;
const labelText = isSocial ? CUSTOMER_NAME : PHONE_NUMBER;

const textComponent = (
Expand Down Expand Up @@ -264,16 +264,6 @@ const CallControlCADComponent: React.FC<CallControlComponentProps> = (props) =>
</span>
</Text>
{renderPhoneNumber()}
<Text className="rona" type="body-secondary" tagName={'small'}>
<strong>{RONA}</strong>{' '}
<span>
{
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762

currentTask?.data?.interaction?.callAssociatedDetails?.ronaTimeout || NO_RONA
}
</span>
</Text>
</div>
</div>
{controlVisibility.isConsultInitiatedOrAccepted && !controlVisibility.wrapup.isVisible && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,7 @@ exports[`CallControlCADComponent Snapshots should handle edge cases and control
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -387,18 +376,7 @@ exports[`CallControlCADComponent Snapshots should handle edge cases and control
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -661,17 +639,6 @@ exports[`CallControlCADComponent Snapshots should handle edge cases and control
No Phone Number
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
No RONA
</span>
</mdc-text>
</div>
</div>
`;
Expand Down Expand Up @@ -941,7 +908,7 @@ exports[`CallControlCADComponent Snapshots should render basic call states and m
</strong>

<span>
chat-customer@example.com
No Phone Number
</span>
</mdc-text>
<mdc-tooltip
Expand All @@ -951,20 +918,9 @@ exports[`CallControlCADComponent Snapshots should render basic call states and m
<mdc-text
class="md-text-wrapper"
>
chat-customer@example.com
No Phone Number
</mdc-text>
</mdc-tooltip>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
45
</span>
</mdc-text>
</div>
</div>
`;
Expand Down Expand Up @@ -1222,18 +1178,7 @@ exports[`CallControlCADComponent Snapshots should render basic call states and m
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -1493,18 +1438,7 @@ exports[`CallControlCADComponent Snapshots should render basic call states and m
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -1789,17 +1723,6 @@ exports[`CallControlCADComponent Snapshots should render basic call states and m
Social Customer
</mdc-text>
</mdc-tooltip>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
60
</span>
</mdc-text>
</div>
</div>
`;
Expand Down Expand Up @@ -2002,18 +1925,7 @@ exports[`CallControlCADComponent Snapshots should render consultation and wrapup
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -2307,18 +2219,7 @@ exports[`CallControlCADComponent Snapshots should render consultation and wrapup
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -2579,18 +2480,7 @@ exports[`CallControlCADComponent Snapshots should render consultation and wrapup
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down Expand Up @@ -2851,18 +2741,7 @@ exports[`CallControlCADComponent Snapshots should render consultation and wrapup
</strong>

<span>
555-123-4567
</span>
</mdc-text>
<mdc-text
class="md-text-wrapper rona"
>
<strong>
RONA:
</strong>

<span>
30
No Phone Number
</span>
</mdc-text>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ describe('CallControlCADComponent', () => {
expect(screen.getByText('Queue:')).toBeInTheDocument();
expect(screen.getByText('Support Team')).toBeInTheDocument();
expect(screen.getByText('Phone Number:')).toBeInTheDocument();
expect(screen.getByText('RONA:')).toBeInTheDocument();
expect(screen.getByText('30')).toBeInTheDocument();

// Verify media icon and timer
const mediaIcon = screen.container.querySelector('.media-icon.voice-media');
Expand Down Expand Up @@ -306,7 +304,6 @@ describe('CallControlCADComponent', () => {
expect(noDataScreen.getByText('No Caller ID')).toBeInTheDocument();
expect(noDataScreen.getByText('No Team Name')).toBeInTheDocument();
expect(noDataScreen.getByText('No Phone Number')).toBeInTheDocument();
expect(noDataScreen.getByText('No RONA')).toBeInTheDocument();
noDataScreen.unmount();

// Test controlVisibility hiding recording indicator
Expand Down
Loading