Skip to content

Commit

Permalink
Merge pull request Expensify#39148 from Expensify/yuwen-memberTypes
Browse files Browse the repository at this point in the history
[No QA] Update type of employee list to indicate it's an array of PolicyMembers
  • Loading branch information
yuwenmemon authored Mar 29, 2024
2 parents 7d08f10 + 945aca2 commit f144a2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/types/onyx/Policy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';
import type * as OnyxTypes from '.';
import type * as OnyxCommon from './OnyxCommon';

type Unit = 'mi' | 'km';
Expand Down Expand Up @@ -328,7 +329,7 @@ type Policy = OnyxCommon.OnyxValueWithOfflineFeedback<
submitsTo?: number;

/** The employee list of the policy */
employeeList?: [];
employeeList?: OnyxTypes.PolicyMembers | [];

/** The reimbursement choice for policy */
reimbursementChoice?: ValueOf<typeof CONST.POLICY.REIMBURSEMENT_CHOICES>;
Expand Down
9 changes: 9 additions & 0 deletions src/types/onyx/PolicyMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ type PolicyMember = OnyxCommon.OnyxValueWithOfflineFeedback<{
/** Role of the user in the policy */
role?: string;

/** Email of the user */
email?: string;

/** Email of the user this user forwards all approved reports to */
forwardsTo?: string;

/** Email of the user this user submits all reports to */
submitsTo?: string;

/**
* Errors from api calls on the specific user
* {<timestamp>: 'error message', <timestamp2>: 'error message 2'}
Expand Down

0 comments on commit f144a2e

Please sign in to comment.