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 @@ -150,22 +150,6 @@ function CallControlComponent(props: CallControlComponentProps) {
}
};

const handlePopoverOpen = (menuType: CallControlMenuType) => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer need these, have moved the handling to tippy state management.
Also, we were anyways calling the logic in the if block in the onHide, so removed that flow also as it was dead code.

logger.info('CC-Widgets: CallControl: opening call control popover', {
module: 'call-control.tsx',
method: 'handlePopoverOpen',
});
if (showAgentMenu && agentMenuType === menuType) {
setShowAgentMenu(false);
setAgentMenuType(null);
} else {
setAgentMenuType(menuType);
setShowAgentMenu(true);
loadBuddyAgents();
loadQueues();
}
};

const currentMediaType = getMediaTypeInfo(
currentTask.data.interaction.mediaType as MediaChannelType,
currentTask.data.interaction.mediaChannel as MediaChannelType
Expand Down Expand Up @@ -262,6 +246,16 @@ function CallControlComponent(props: CallControlComponentProps) {
return (
<PopoverNext
key={index}
onShow={() => {
logger.info(`CC-Widgets: CallControl: showing consult-transfer popover`, {
module: 'call-control.tsx',
method: 'onShowPopover',
});
setShowAgentMenu(true);
setAgentMenuType(button.menuType as CallControlMenuType);
loadBuddyAgents();
loadQueues();
}}
onHide={() => {
setShowAgentMenu(false);
setAgentMenuType(null);
Expand Down Expand Up @@ -293,7 +287,6 @@ function CallControlComponent(props: CallControlComponentProps) {
aria-label={button.tooltip}
disabled={button.disabled || (consultInitiated && isTelephony)}
data-testid={button.dataTestId}
onPress={() => handlePopoverOpen(button.menuType as CallControlMenuType)}
>
<Icon className={button.className + '-icon'} name={button.icon} />
</ButtonCircle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const TaskListComponent: React.FunctionComponent<TaskListComponentProps> = (prop
return (
<ul className="task-list" data-testid="task-list">
{Object.values(taskList)?.map((task, index) => {
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762IT
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Made this change while I was resolving merge conflicts.

const callAssociationDetails = task?.data?.interaction?.callAssociatedDetails;
const ani = callAssociationDetails?.ani;
const customerName = callAssociationDetails?.customerName;
Expand Down
Loading