Skip to content

Commit 2e663de

Browse files
committed
add explanatory comments
1 parent c968035 commit 2e663de

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,22 @@ import {convertToDisplayString} from '@libs/CurrencyUtils';
1010
import type * as OnyxTypes from '@src/types/onyx';
1111

1212
type MoneyRequestReportTotalSpendProps = {
13+
/** Report for which the total spend is being displayed */
14+
report: OnyxTypes.Report;
15+
16+
/** Whether the report has any comments */
1317
hasComments: boolean;
18+
19+
/** Whether the report is loading report actions */
1420
isLoadingReportActions: boolean;
21+
22+
/** Whether the report has any transactions */
1523
isEmptyTransactions: boolean;
24+
25+
/** The total display spend of the report */
1626
totalDisplaySpend: number;
17-
report: OnyxTypes.Report;
27+
28+
/** Whether the report has any pending actions */
1829
hasPendingAction: boolean;
1930
};
2031

src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,34 @@ const allReportColumns = [
2929
];
3030

3131
type MoneyRequestReportTransactionItemProps = {
32+
/** The transaction that is being displayed */
3233
transaction: TransactionWithOptionalHighlight;
34+
35+
/** Whether the mobile selection mode is enabled */
3336
isSelectionModeEnabled: boolean;
37+
38+
/** Callback function triggered upon pressing a transaction checkbox. */
3439
toggleTransaction: (transactionID: string) => void;
40+
41+
/** Callback function triggered upon pressing a transaction. */
3542
handleOnPress: (transactionID: string) => void;
43+
44+
/** Callback function triggered upon long pressing a transaction. */
3645
handleLongPress: (transactionID: string) => void;
46+
47+
/** Whether the transaction is selected */
3748
isSelected: boolean;
49+
50+
/** The size of the date column */
3851
dateColumnSize: TableColumnSize;
52+
53+
/** The size of the amount column */
3954
amountColumnSize: TableColumnSize;
55+
56+
/** The size of the tax amount column */
4057
taxAmountColumnSize: TableColumnSize;
58+
59+
/** Callback function that scrolls to this transaction in case it is newly added */
4160
scrollToNewTransaction?: (offset: number) => void;
4261
};
4362

0 commit comments

Comments
 (0)