@@ -12,6 +12,7 @@ import DateInput from '../DateInput'
1212import Handle from '../Handle'
1313import styles from './ApplicationsList.module.scss'
1414import { PROFILE_URL } from '../../config/constants'
15+ import { serializeTentativeAssignmentDate } from '../../util/assignmentDates'
1516
1617const STATUS_OPTIONS = [
1718 { label : 'All' , value : 'all' } ,
@@ -99,6 +100,21 @@ const getApplicationName = (application) => {
99100 return fullName || application . name || application . email || null
100101}
101102
103+ const getApplicationMobileNumber = ( application ) => {
104+ if ( ! application ) {
105+ return null
106+ }
107+
108+ const value = [
109+ application . mobileNumber ,
110+ application . mobile_number ,
111+ application . phoneNumber ,
112+ application . phone
113+ ] . find ( ( phoneNumber ) => phoneNumber != null && `${ phoneNumber } ` . trim ( ) !== '' )
114+
115+ return value ? `${ value } ` . trim ( ) : null
116+ }
117+
102118const getApplicationRating = ( application ) => {
103119 if ( ! application ) {
104120 return undefined
@@ -303,9 +319,11 @@ const ApplicationsList = ({
303319
304320 setIsAccepting ( true )
305321 try {
322+ const startDate = serializeTentativeAssignmentDate ( parsedStart )
323+ const endDate = serializeTentativeAssignmentDate ( parsedEnd )
306324 await onUpdateStatus ( acceptApplication . id , 'SELECTED' , {
307- startDate : parsedStart . toISOString ( ) ,
308- endDate : parsedEnd . toISOString ( ) ,
325+ startDate,
326+ endDate,
309327 agreementRate : normalizedRate ,
310328 ...( normalizedOtherRemarks ? { otherRemarks : normalizedOtherRemarks } : { } )
311329 } )
@@ -500,7 +518,7 @@ const ApplicationsList = ({
500518 < th > Email</ th >
501519 < th > Applied Date</ th >
502520 < th > Years of Experience</ th >
503- < th > Availability </ th >
521+ < th > Phone Number </ th >
504522 < th > Status</ th >
505523 < th > Actions</ th >
506524 </ tr >
@@ -541,7 +559,7 @@ const ApplicationsList = ({
541559 < td > { application . email || '-' } </ td >
542560 < td > { formatDateTime ( application . createdAt ) } </ td >
543561 < td > { application . yearsOfExperience != null ? application . yearsOfExperience : '-' } </ td >
544- < td > { application . availability || '-' } </ td >
562+ < td > { getApplicationMobileNumber ( application ) || '-' } </ td >
545563 < td >
546564 < span className = { `${ styles . status } ${ statusClass } ` } >
547565 { statusLabel }
0 commit comments