Skip to content

Commit ae646bd

Browse files
authored
fix(widgets): fixed-consult-transfer-popover-transient-issue (#506)
1 parent 44c1082 commit ae646bd

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

packages/contact-center/cc-components/src/components/task/CallControl/call-control.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,6 @@ function CallControlComponent(props: CallControlComponentProps) {
150150
}
151151
};
152152

153-
const handlePopoverOpen = (menuType: CallControlMenuType) => {
154-
logger.info('CC-Widgets: CallControl: opening call control popover', {
155-
module: 'call-control.tsx',
156-
method: 'handlePopoverOpen',
157-
});
158-
if (showAgentMenu && agentMenuType === menuType) {
159-
setShowAgentMenu(false);
160-
setAgentMenuType(null);
161-
} else {
162-
setAgentMenuType(menuType);
163-
setShowAgentMenu(true);
164-
loadBuddyAgents();
165-
loadQueues();
166-
}
167-
};
168-
169153
const currentMediaType = getMediaTypeInfo(
170154
currentTask.data.interaction.mediaType as MediaChannelType,
171155
currentTask.data.interaction.mediaChannel as MediaChannelType
@@ -262,6 +246,16 @@ function CallControlComponent(props: CallControlComponentProps) {
262246
return (
263247
<PopoverNext
264248
key={index}
249+
onShow={() => {
250+
logger.info(`CC-Widgets: CallControl: showing consult-transfer popover`, {
251+
module: 'call-control.tsx',
252+
method: 'onShowPopover',
253+
});
254+
setShowAgentMenu(true);
255+
setAgentMenuType(button.menuType as CallControlMenuType);
256+
loadBuddyAgents();
257+
loadQueues();
258+
}}
265259
onHide={() => {
266260
setShowAgentMenu(false);
267261
setAgentMenuType(null);
@@ -293,7 +287,6 @@ function CallControlComponent(props: CallControlComponentProps) {
293287
aria-label={button.tooltip}
294288
disabled={button.disabled || (consultInitiated && isTelephony)}
295289
data-testid={button.dataTestId}
296-
onPress={() => handlePopoverOpen(button.menuType as CallControlMenuType)}
297290
>
298291
<Icon className={button.className + '-icon'} name={button.icon} />
299292
</ButtonCircle>

packages/contact-center/cc-components/src/components/task/TaskList/task-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const TaskListComponent: React.FunctionComponent<TaskListComponentProps> = (prop
1212
return (
1313
<ul className="task-list" data-testid="task-list">
1414
{Object.values(taskList)?.map((task, index) => {
15-
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762IT
15+
//@ts-expect-error To be fixed in SDK - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6762
1616
const callAssociationDetails = task?.data?.interaction?.callAssociatedDetails;
1717
const ani = callAssociationDetails?.ani;
1818
const customerName = callAssociationDetails?.customerName;

0 commit comments

Comments
 (0)