Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Jul 9, 2024
1 parent 1b04a52 commit c70c702
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function TotalCell({showTooltip, isLargeScreenWidth, transactionItem}: TotalCell

function TypeCell({transactionItem, isLargeScreenWidth}: TransactionCellProps) {
const theme = useTheme();
const typeIcon = getTypeIcon(transactionItem.type);
const typeIcon = getTypeIcon(transactionItem.transactionType);

return (
<Icon
Expand Down
2 changes: 1 addition & 1 deletion src/libs/SearchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const columnNamesToSortingProperty = {
[CONST.SEARCH.TABLE_COLUMNS.MERCHANT]: 'formattedMerchant' as const,
[CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT]: 'formattedTotal' as const,
[CONST.SEARCH.TABLE_COLUMNS.CATEGORY]: 'category' as const,
[CONST.SEARCH.TABLE_COLUMNS.TYPE]: 'type' as const,
[CONST.SEARCH.TABLE_COLUMNS.TYPE]: 'transactionType' as const,
[CONST.SEARCH.TABLE_COLUMNS.ACTION]: 'action' as const,
[CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: 'comment' as const,
[CONST.SEARCH.TABLE_COLUMNS.TAX_AMOUNT]: null,
Expand Down
6 changes: 3 additions & 3 deletions src/types/onyx/SearchResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ type SearchReport = {
currency?: string;

/** The report type */
type?: ValueOf();
type?: ValueOf<typeof CONST.REPORT.TYPE>;

/** The accountID of the report manager */
managerID?: number;
Expand All @@ -117,7 +117,7 @@ type SearchReport = {
accountID?: number;

/** The policyID of the report */
policyID?: ValueOf<typeof CONST.REPORT.TYPE>;
policyID?: string;

/** The date the report was created */
created?: string;
Expand Down Expand Up @@ -180,7 +180,7 @@ type SearchTransaction = {
category: string;

/** The type of request */
type: ValueOf<typeof CONST.SEARCH.TRANSACTION_TYPE>;
transactionType: ValueOf<typeof CONST.SEARCH.TRANSACTION_TYPE>;

/** The type of report the transaction is associated with */
reportType: string;
Expand Down

0 comments on commit c70c702

Please sign in to comment.