@@ -9,7 +9,7 @@ import {SelectNext} from '@momentum-ui/react-collaboration';
99import { Item } from '@react-stately/collections' ;
1010
1111import { OutdialAniEntry , OutdialCallComponentProps } from '../task.types' ;
12- import { OutdialStrings , KEY_LIST } from './constants' ;
12+ import { OutdialStrings , KEY_LIST , TABS } from './constants' ;
1313import { DEFAULT_PAGE_SIZE } from '../constants' ;
1414import { createInitials , debounce } from '../CallControl/CallControlCustom/call-control-custom.utils' ;
1515import { useIntersectionObserver } from '../../../hooks' ;
@@ -37,11 +37,6 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
3737 isAddressBookEnabled = true ,
3838 } = props ;
3939
40- const TABS = {
41- DIAL_PAD : 'dial_pad' ,
42- ADDRESS_BOOK : 'address_book' ,
43- } ;
44-
4540 // State Hooks
4641 const [ selectedTab , setSelectedTab ] = useState ( TABS . DIAL_PAD ) ;
4742 const [ destination , setDestination ] = useState ( '' ) ;
@@ -140,7 +135,7 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
140135 }
141136 } ;
142137
143- const handleDiapadTabClick = ( ) => {
138+ const handleDialpadTabClick = ( ) => {
144139 setSelectedAddressBookEntry ( null ) ;
145140 // Don't clear destination - preserve selected address book entry number
146141 setSelectedTab ( TABS . DIAL_PAD ) ;
@@ -252,16 +247,16 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
252247 < Spinner variant = "button" />
253248 </ div >
254249 ) : (
255- < p > No address book entries found. </ p >
250+ < p > { OutdialStrings . ADDRESS_BOOK_NO_RESULTS } </ p >
256251 ) }
257252 </ ul >
258253 </ section >
259254 ) ;
260255 } ;
261256
262- const renderDiapad = ( ) => {
257+ const renderDialpad = ( ) => {
263258 return (
264- < section className = "keypad" data-testid = "outdial-call-container" >
259+ < >
265260 < Input
266261 className = "outdial-input"
267262 id = "outdial-number-input"
@@ -280,18 +275,18 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
280275 < ul className = "keys" data-testid = "outdial-keypad-keys" >
281276 { KEY_LIST . map ( ( key ) => (
282277 < li key = { key } >
283- < Button className = "key button " onClick = { ( ) => handleOnClick ( key ) } >
278+ < Button className = "key" onClick = { ( ) => handleOnClick ( key ) } >
284279 { key }
285280 </ Button >
286281 </ li >
287282 ) ) }
288283 </ ul >
289- </ section >
284+ </ >
290285 ) ;
291286 } ;
292287
293288 return (
294- < article className = { ` outdial-container ${ isAddressBookEnabled ? 'height-28-5rem' : '' } ` } >
289+ < article className = " outdial-container" data-testid = "outdial-call-container" >
295290 { isAddressBookEnabled && (
296291 < >
297292 < TabList activeTabId = { selectedTab } dataAriaLabel = "Outdial call tabs" className = "tab-list" >
@@ -301,36 +296,43 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
301296 aria-controls = { TABS . ADDRESS_BOOK }
302297 variant = "glass"
303298 onClick = { handleAddressBookTabClick }
299+ text = { OutdialStrings . TAB_ADDRESS_BOOK }
304300 > </ Tab >
305301
306302 < Tab
307303 iconName = "dialpad-bold"
308304 tabId = { TABS . DIAL_PAD }
309305 aria-controls = { TABS . DIAL_PAD }
310306 variant = "glass"
311- onClick = { handleDiapadTabClick }
307+ onClick = { handleDialpadTabClick }
308+ text = { OutdialStrings . TAB_DIALPAD }
312309 > </ Tab >
313310 </ TabList >
314311
315312 { selectedTab === TABS . ADDRESS_BOOK && (
316- < div
313+ < section
317314 id = { TABS . ADDRESS_BOOK }
318315 role = "tabpanel"
319316 aria-labelledby = { TABS . ADDRESS_BOOK }
320317 className = "address-book-container"
321318 >
322319 { renderAddressBook ( ) }
323- </ div >
320+ </ section >
324321 ) }
325322 { selectedTab === TABS . DIAL_PAD && (
326- < div id = { TABS . DIAL_PAD } role = "tabpanel" aria-labelledby = { TABS . DIAL_PAD } className = "keypad" >
327- { renderDiapad ( ) }
328- </ div >
323+ < section
324+ id = { TABS . DIAL_PAD }
325+ role = "tabpanel"
326+ aria-labelledby = { TABS . DIAL_PAD }
327+ className = "dialpad-tab-container"
328+ >
329+ { renderDialpad ( ) }
330+ </ section >
329331 ) }
330332 </ >
331333 ) }
332334
333- { ! isAddressBookEnabled && renderDiapad ( ) }
335+ { ! isAddressBookEnabled && renderDialpad ( ) }
334336
335337 < div className = "outdial-ani-select-container" >
336338 < Icon
@@ -371,7 +373,6 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
371373 < Button
372374 data-testid = "outdial-call-button"
373375 prefixIcon = { 'handset-regular' }
374- className = "outDialCallButton"
375376 onClick = { ( ) => {
376377 startOutdial ( destination , selectedANI ) ;
377378 // Clear input field after initiating the call
0 commit comments