@@ -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 } )
@@ -362,6 +380,7 @@ const ApplicationsList = ({
362380 value = { acceptStartDate }
363381 dateFormat = { INPUT_DATE_FORMAT }
364382 timeFormat = { INPUT_TIME_FORMAT }
383+ preventViewportOverflow
365384 minDateTime = { getMinStartDateTime }
366385 isValidDate = { isAcceptStartDateValid }
367386 onChange = { ( value ) => {
@@ -385,6 +404,7 @@ const ApplicationsList = ({
385404 value = { acceptEndDate }
386405 dateFormat = { INPUT_DATE_FORMAT }
387406 timeFormat = { INPUT_TIME_FORMAT }
407+ preventViewportOverflow
388408 minDateTime = { getMinEndDateTime }
389409 isValidDate = { isAcceptEndDateValid }
390410 onChange = { ( value ) => {
@@ -500,7 +520,7 @@ const ApplicationsList = ({
500520 < th > Email</ th >
501521 < th > Applied Date</ th >
502522 < th > Years of Experience</ th >
503- < th > Availability </ th >
523+ < th > Phone Number </ th >
504524 < th > Status</ th >
505525 < th > Actions</ th >
506526 </ tr >
@@ -541,7 +561,7 @@ const ApplicationsList = ({
541561 < td > { application . email || '-' } </ td >
542562 < td > { formatDateTime ( application . createdAt ) } </ td >
543563 < td > { application . yearsOfExperience != null ? application . yearsOfExperience : '-' } </ td >
544- < td > { application . availability || '-' } </ td >
564+ < td > { getApplicationMobileNumber ( application ) || '-' } </ td >
545565 < td >
546566 < span className = { `${ styles . status } ${ statusClass } ` } >
547567 { statusLabel }
0 commit comments