@@ -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" >
@@ -308,29 +303,34 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
308303 tabId = { TABS . DIAL_PAD }
309304 aria-controls = { TABS . DIAL_PAD }
310305 variant = "glass"
311- onClick = { handleDiapadTabClick }
306+ onClick = { handleDialpadTabClick }
312307 > </ Tab >
313308 </ TabList >
314309
315310 { selectedTab === TABS . ADDRESS_BOOK && (
316- < div
311+ < section
317312 id = { TABS . ADDRESS_BOOK }
318313 role = "tabpanel"
319314 aria-labelledby = { TABS . ADDRESS_BOOK }
320315 className = "address-book-container"
321316 >
322317 { renderAddressBook ( ) }
323- </ div >
318+ </ section >
324319 ) }
325320 { selectedTab === TABS . DIAL_PAD && (
326- < div id = { TABS . DIAL_PAD } role = "tabpanel" aria-labelledby = { TABS . DIAL_PAD } className = "keypad" >
327- { renderDiapad ( ) }
328- </ div >
321+ < section
322+ id = { TABS . DIAL_PAD }
323+ role = "tabpanel"
324+ aria-labelledby = { TABS . DIAL_PAD }
325+ className = "dialpad-tab-container"
326+ >
327+ { renderDialpad ( ) }
328+ </ section >
329329 ) }
330330 </ >
331331 ) }
332332
333- { ! isAddressBookEnabled && renderDiapad ( ) }
333+ { ! isAddressBookEnabled && renderDialpad ( ) }
334334
335335 < div className = "outdial-ani-select-container" >
336336 < Icon
@@ -371,7 +371,6 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
371371 < Button
372372 data-testid = "outdial-call-button"
373373 prefixIcon = { 'handset-regular' }
374- className = "outDialCallButton"
375374 onClick = { ( ) => {
376375 startOutdial ( destination , selectedANI ) ;
377376 // Clear input field after initiating the call
0 commit comments