@@ -102,6 +102,12 @@ type MoneyRequestConfirmationListFooterProps = {
102102 /** The merchant of the IOU */
103103 iouMerchant : string | undefined ;
104104
105+ /** The hours count of the time request */
106+ iouTimeCount : number | undefined ;
107+
108+ /** The hourly rate of the time request */
109+ iouTimeRate : number | undefined ;
110+
105111 /** The type of the IOU */
106112 iouType : Exclude < IOUType , typeof CONST . IOU . TYPE . REQUEST | typeof CONST . IOU . TYPE . SEND > ;
107113
@@ -120,6 +126,9 @@ type MoneyRequestConfirmationListFooterProps = {
120126 /** Flag indicating if it is a per diem request */
121127 isPerDiemRequest : boolean ;
122128
129+ /** Flag indicating if it is a time request */
130+ isTimeRequest : boolean ;
131+
123132 /** Flag indicating if the merchant is empty */
124133 isMerchantEmpty : boolean ;
125134
@@ -231,11 +240,14 @@ function MoneyRequestConfirmationListFooter({
231240 iouIsBillable,
232241 iouMerchant,
233242 iouType,
243+ iouTimeCount,
244+ iouTimeRate,
234245 isCategoryRequired,
235246 isDistanceRequest,
236247 isManualDistanceRequest,
237248 isOdometerDistanceRequest = false ,
238249 isPerDiemRequest,
250+ isTimeRequest,
239251 isMerchantEmpty,
240252 isMerchantRequired,
241253 isPolicyExpenseChat,
@@ -441,12 +453,12 @@ function MoneyRequestConfirmationListFooter({
441453 item : (
442454 < MenuItemWithTopDescription
443455 key = { translate ( 'iou.amount' ) }
444- shouldShowRightIcon = { ! isReadOnly && ! isDistanceRequest }
456+ shouldShowRightIcon = { ! isReadOnly && ! isDistanceRequest && ! isTimeRequest }
445457 title = { formattedAmount }
446458 description = { translate ( 'iou.amount' ) }
447- interactive = { ! isReadOnly }
459+ interactive = { ! isReadOnly && ! isTimeRequest }
448460 onPress = { ( ) => {
449- if ( isDistanceRequest || ! transactionID ) {
461+ if ( isDistanceRequest || isTimeRequest || ! transactionID ) {
450462 return ;
451463 }
452464
@@ -591,6 +603,48 @@ function MoneyRequestConfirmationListFooter({
591603 ) ,
592604 shouldShow : shouldShowMerchant ,
593605 } ,
606+ {
607+ item : (
608+ < MenuItemWithTopDescription
609+ key = { translate ( 'iou.timeTracking.hours' ) }
610+ shouldShowRightIcon = { ! isReadOnly }
611+ title = { `${ iouTimeCount } ` }
612+ description = { translate ( 'iou.timeTracking.hours' ) }
613+ style = { styles . moneyRequestMenuItem }
614+ titleStyle = { styles . flex1 }
615+ onPress = { ( ) => {
616+ if ( ! transactionID ) {
617+ return ;
618+ }
619+ Navigation . navigate ( ROUTES . MONEY_REQUEST_STEP_HOURS . getRoute ( action , iouType , transactionID , reportID , reportActionID ) ) ;
620+ } }
621+ disabled = { didConfirm }
622+ interactive = { ! isReadOnly }
623+ />
624+ ) ,
625+ shouldShow : isTimeRequest ,
626+ } ,
627+ {
628+ item : (
629+ < MenuItemWithTopDescription
630+ key = { `time_${ translate ( 'common.rate' ) } ` }
631+ shouldShowRightIcon = { ! isReadOnly }
632+ title = { translate ( 'iou.timeTracking.ratePreview' , convertToDisplayString ( iouTimeRate , iouCurrencyCode ) ) }
633+ description = { translate ( 'common.rate' ) }
634+ style = { styles . moneyRequestMenuItem }
635+ titleStyle = { styles . flex1 }
636+ onPress = { ( ) => {
637+ if ( ! transactionID ) {
638+ return ;
639+ }
640+ Navigation . navigate ( ROUTES . MONEY_REQUEST_STEP_TIME_RATE . getRoute ( action , iouType , transactionID , reportID , reportActionID ) ) ;
641+ } }
642+ disabled = { didConfirm }
643+ interactive = { ! isReadOnly }
644+ />
645+ ) ,
646+ shouldShow : isTimeRequest ,
647+ } ,
594648 {
595649 item : (
596650 < MenuItemWithTopDescription
@@ -1114,5 +1168,8 @@ export default memo(
11141168 prevProps . shouldShowTax === nextProps . shouldShowTax &&
11151169 prevProps . transaction === nextProps . transaction &&
11161170 prevProps . transactionID === nextProps . transactionID &&
1117- prevProps . unit === nextProps . unit ,
1171+ prevProps . unit === nextProps . unit &&
1172+ prevProps . isTimeRequest === nextProps . isTimeRequest &&
1173+ prevProps . iouTimeCount === nextProps . iouTimeCount &&
1174+ prevProps . iouTimeRate === nextProps . iouTimeRate ,
11181175) ;
0 commit comments