Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS Migration] Migrate 'ReportUtils.js' lib to TypeScript #29012

Merged
merged 101 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
4187fbb
ref: started migrating ReportUtils to TS
kubabutkiewicz Oct 3, 2023
29e9656
Merge branch 'main' into ts-migration/ReportUtils-lib
kubabutkiewicz Oct 3, 2023
acaa8ea
ref: continue to migrate ReportUtils to Ts
kubabutkiewicz Oct 3, 2023
18ad8ea
Merge branch 'main' into ts-migration/ReportUtils-lib
kubabutkiewicz Oct 4, 2023
73d6d6e
ref: ReportUtils continue of migration
kubabutkiewicz Oct 5, 2023
e9ddcbe
ref: keep migrating ReportUtils
kubabutkiewicz Oct 6, 2023
8eb1c13
Merge branch 'main' into ts-migration/ReportUtils-lib
kubabutkiewicz Oct 10, 2023
dfffe5f
fix: merge conflicts, few adjustments
kubabutkiewicz Oct 10, 2023
4ad36b4
fix: ts fixes for ReportUtils
kubabutkiewicz Oct 12, 2023
9e35d4b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 18, 2023
a36ff94
fix: ts errors
kubabutkiewicz Oct 19, 2023
ba218c5
fix: fixing type issues
kubabutkiewicz Oct 20, 2023
57b42e8
fix: added some return types
kubabutkiewicz Oct 23, 2023
d52f919
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 23, 2023
5aaf3a3
fix: removed usused argument from canCreateRequest and make some ts f…
kubabutkiewicz Oct 23, 2023
af55c9c
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 23, 2023
0ae6b03
fix: resolved few comments from code review
kubabutkiewicz Oct 24, 2023
84c9ae2
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 24, 2023
e894573
fix: fixed ReportUtilsTest
kubabutkiewicz Oct 24, 2023
4d10611
fix: resolving comments
kubabutkiewicz Oct 25, 2023
962b773
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 25, 2023
7f5c557
fix: resolving comments
kubabutkiewicz Oct 25, 2023
557fbc1
fix: adding return types
kubabutkiewicz Oct 26, 2023
2e416d4
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 26, 2023
27ed0e5
fix: fixed last TS issue
kubabutkiewicz Oct 26, 2023
dae2953
fix: fix ts problems
kubabutkiewicz Oct 26, 2023
1c2fcb7
fix: adjusted type comment
kubabutkiewicz Oct 26, 2023
e3eb38d
fix: fixed issue with not displaying displayName for Reports
kubabutkiewicz Oct 26, 2023
a951d65
fix: remove waitForCollectionCallback from Onyx.connect where its not…
kubabutkiewicz Oct 27, 2023
9ce8236
fix: added return types
kubabutkiewicz Oct 27, 2023
0c1af91
fix: adjusted type guard
kubabutkiewicz Oct 27, 2023
492943a
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 27, 2023
e45f401
fix: adjusted types in SidebarUtils
kubabutkiewicz Oct 30, 2023
45eae6e
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 30, 2023
c68dc77
fix: linter
kubabutkiewicz Oct 30, 2023
19a07f6
fix: linter
kubabutkiewicz Oct 30, 2023
e61b8da
fix: linter
kubabutkiewicz Oct 30, 2023
a953f81
fix: removed unnecessary comment
kubabutkiewicz Oct 30, 2023
8b081b2
fix: resolve comments
kubabutkiewicz Oct 31, 2023
acf1897
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Oct 31, 2023
f0ebbde
fix: liner
kubabutkiewicz Oct 31, 2023
859ce75
fix: resolve comments
kubabutkiewicz Oct 31, 2023
2bc2456
fix: prettier
kubabutkiewicz Oct 31, 2023
d0876ae
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 2, 2023
7d308eb
fix: types issues
kubabutkiewicz Nov 2, 2023
223e3c7
fix: last issues from review
kubabutkiewicz Nov 2, 2023
499fb36
ref: rerun test jobs
kubabutkiewicz Nov 2, 2023
257f692
fix: removed log
kubabutkiewicz Nov 2, 2023
34e1104
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 2, 2023
e86a618
fix: removed commented code
kubabutkiewicz Nov 2, 2023
4789679
fix: fixed comments
kubabutkiewicz Nov 2, 2023
e672ccd
fix: fixed types issues
kubabutkiewicz Nov 2, 2023
523cd3c
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 3, 2023
0635502
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 3, 2023
0dc1e13
fix: unit tests
kubabutkiewicz Nov 3, 2023
374a1ba
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 6, 2023
1de9b9b
fix: resolve comments
kubabutkiewicz Nov 6, 2023
e4df9cb
fix: crash when sending money request
kubabutkiewicz Nov 7, 2023
f00e382
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 7, 2023
611dd1a
fix: resolve comments, fixed type and lint issues
kubabutkiewicz Nov 7, 2023
8c0f621
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 7, 2023
2417779
fix: test and typings
kubabutkiewicz Nov 7, 2023
2869a4b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 8, 2023
74875cc
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 9, 2023
2f20a46
fix: types
kubabutkiewicz Nov 9, 2023
19adf54
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 9, 2023
c940620
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 13, 2023
dd95a3d
fix: resolved comments
kubabutkiewicz Nov 13, 2023
af54ad4
fix: resolve comments
kubabutkiewicz Nov 13, 2023
23cf6e7
fix: resolve comments
kubabutkiewicz Nov 14, 2023
2213d81
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 14, 2023
340061d
fix: resolve comments
kubabutkiewicz Nov 14, 2023
8b3d147
fix: add ts expect error to file which is using not migrated lib yet
kubabutkiewicz Nov 14, 2023
fc89e18
fix: resolved comment
kubabutkiewicz Nov 14, 2023
9e51ef0
fix: removed unecessary check
kubabutkiewicz Nov 14, 2023
c83e4d0
fix: correct type in Permissions lib
kubabutkiewicz Nov 14, 2023
98c73d2
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 15, 2023
306a871
fix: adjusted types
kubabutkiewicz Nov 15, 2023
aa7a703
fix: resolve type issue
kubabutkiewicz Nov 15, 2023
eba55d1
fix: resolve comments
kubabutkiewicz Nov 15, 2023
5477de8
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 15, 2023
0316877
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 16, 2023
b97854f
fix: types issues
kubabutkiewicz Nov 16, 2023
fc8f676
fix: lint
kubabutkiewicz Nov 16, 2023
db3a608
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 17, 2023
a43fd7f
fix: resolve comment
kubabutkiewicz Nov 17, 2023
3dddf7b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 20, 2023
03f9485
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 20, 2023
0785921
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 21, 2023
41c2d77
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 22, 2023
e7e8498
fix: type issues
kubabutkiewicz Nov 22, 2023
431111b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 22, 2023
019f9fe
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 23, 2023
f24294e
fix: avatar and footer problem when archived room
kubabutkiewicz Nov 23, 2023
09a3cb3
fix: problem with displaying report name
kubabutkiewicz Nov 23, 2023
314fa0d
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 23, 2023
48c8598
fix: resolved comment
kubabutkiewicz Nov 23, 2023
12c85ba
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 24, 2023
2701fcd
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 27, 2023
7ff0f22
fix: resolve comments
kubabutkiewicz Nov 27, 2023
aac1519
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ function isReversedTransaction(reportAction: OnyxEntry<ReportAction>) {
return (reportAction?.message?.[0].isReversedTransaction ?? false) && (reportAction?.childVisibleActionCount ?? 0) > 0;
}

function isPendingRemove(reportAction: OnyxEntry<ReportAction>): boolean {
function isPendingRemove(reportAction: OnyxEntry<ReportAction> | Record<string, never>): boolean {
if (!reportAction) {
return false;
kubabutkiewicz marked this conversation as resolved.
Show resolved Hide resolved
}
return reportAction?.message?.[0]?.moderationDecision?.decision === CONST.MODERATION.MODERATOR_DECISION_PENDING_REMOVE;
}

Expand Down Expand Up @@ -120,7 +123,7 @@ function isSentMoneyReportAction(reportAction: OnyxEntry<ReportAction>): boolean
* Returns whether the thread is a transaction thread, which is any thread with IOU parent
* report action from requesting money (type - create) or from sending money (type - pay with IOUDetails field)
*/
function isTransactionThread(parentReportAction: OnyxEntry<ReportAction>): boolean {
function isTransactionThread(parentReportAction: ReportAction): boolean {
kubabutkiewicz marked this conversation as resolved.
Show resolved Hide resolved
return (
parentReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU &&
(parentReportAction.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE ||
Expand Down
Loading
Loading