From fd68107f96c716c53c3569c8a64c2f53a399fcf1 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Tue, 18 Jun 2024 14:05:10 +0530 Subject: [PATCH] fix: Billable - Billable toggle should have a locked icon in split details view. Signed-off-by: Krishna Gupta --- src/components/MoneyRequestConfirmationList.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index 87fc207dd1fd..439c8f80d795 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -32,6 +32,7 @@ import {getDefaultWorkspaceAvatar} from '@libs/ReportUtils'; import playSound, {SOUNDS} from '@libs/Sound'; import * as TransactionUtils from '@libs/TransactionUtils'; import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot'; +import ToggleSettingOptionRow from '@pages/workspace/workflows/ToggleSettingsOptionRow'; import * as IOU from '@userActions/IOU'; import type {IOUAction, IOUType} from '@src/CONST'; import CONST from '@src/CONST'; @@ -61,7 +62,6 @@ import type {SectionListDataType} from './SelectionList/types'; import UserListItem from './SelectionList/UserListItem'; import SettlementButton from './SettlementButton'; import ShowMoreButton from './ShowMoreButton'; -import Switch from './Switch'; import Text from './Text'; type MoneyRequestConfirmationListOnyxProps = { @@ -1076,11 +1076,14 @@ function MoneyRequestConfirmationList({ { item: ( - {translate('common.billable')} - onToggleBillable?.(isOn)} + isActive={iouIsBillable} + disabled={isReadOnly} + titleStyle={!iouIsBillable && {color: theme.textSupporting}} + wrapperStyle={styles.flex1} /> ),