Skip to content

Commit b9aada8

Browse files
authored
Merge pull request #35153 from kubabutkiewicz/ts-migration/ReportDetails
[No QA] [TS migration] Migrate 'ReportDetails' page to TypeScript
2 parents 6d30216 + 6475377 commit b9aada8

File tree

3 files changed

+90
-99
lines changed

3 files changed

+90
-99
lines changed

src/libs/PolicyUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function isExpensifyGuideTeam(email: string): boolean {
106106
*/
107107
const isPolicyAdmin = (policy: OnyxEntry<Policy> | EmptyObject): boolean => policy?.role === CONST.POLICY.ROLE.ADMIN;
108108

109-
const isPolicyMember = (policyID: string, policies: Record<string, Policy>): boolean => Object.values(policies).some((policy) => policy?.id === policyID);
109+
const isPolicyMember = (policyID: string, policies: OnyxCollection<Policy>): boolean => Object.values(policies ?? {}).some((policy) => policy?.id === policyID);
110110

111111
/**
112112
* Create an object mapping member emails to their accountIDs. Filter for members without errors, and get the login email from the personalDetail object using the accountID.

src/libs/ReportUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4646,7 +4646,7 @@ function shouldAutoFocusOnKeyPress(event: KeyboardEvent): boolean {
46464646
/**
46474647
* Navigates to the appropriate screen based on the presence of a private note for the current user.
46484648
*/
4649-
function navigateToPrivateNotes(report: Report, session: Session) {
4649+
function navigateToPrivateNotes(report: OnyxEntry<Report>, session: OnyxEntry<Session>) {
46504650
if (isEmpty(report) || isEmpty(session) || !session.accountID) {
46514651
return;
46524652
}

0 commit comments

Comments
 (0)