Skip to content

Commit

Permalink
Merge pull request #35153 from kubabutkiewicz/ts-migration/ReportDetails
Browse files Browse the repository at this point in the history
[No QA] [TS migration] Migrate 'ReportDetails' page to TypeScript
  • Loading branch information
cristipaval authored Feb 9, 2024
2 parents 6d30216 + 6475377 commit b9aada8
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 99 deletions.
2 changes: 1 addition & 1 deletion src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function isExpensifyGuideTeam(email: string): boolean {
*/
const isPolicyAdmin = (policy: OnyxEntry<Policy> | EmptyObject): boolean => policy?.role === CONST.POLICY.ROLE.ADMIN;

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

/**
* 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.
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4646,7 +4646,7 @@ function shouldAutoFocusOnKeyPress(event: KeyboardEvent): boolean {
/**
* Navigates to the appropriate screen based on the presence of a private note for the current user.
*/
function navigateToPrivateNotes(report: Report, session: Session) {
function navigateToPrivateNotes(report: OnyxEntry<Report>, session: OnyxEntry<Session>) {
if (isEmpty(report) || isEmpty(session) || !session.accountID) {
return;
}
Expand Down
Loading

0 comments on commit b9aada8

Please sign in to comment.