-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39489 from ZhenjaHorbach/deprecate_policy_members
Deprecate POLICY_MEMBERS
- Loading branch information
Showing
38 changed files
with
369 additions
and
538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type {OnyxCollection} from 'react-native-onyx'; | ||
import Onyx from 'react-native-onyx'; | ||
import ONYXKEYS from '@src/ONYXKEYS'; | ||
import type {Policy} from '@src/types/onyx'; | ||
import {getCurrentUserAccountID} from './actions/Report'; | ||
import {getPolicyEmployeeListByIdWithoutCurrentUser} from './PolicyUtils'; | ||
|
||
let allPolicies: OnyxCollection<Policy> = {}; | ||
Onyx.connect({ | ||
key: ONYXKEYS.COLLECTION.POLICY, | ||
waitForCollectionCallback: true, | ||
callback: (value) => (allPolicies = value), | ||
}); | ||
|
||
function getPolicyEmployeeAccountIDs(policyID?: string) { | ||
if (!policyID) { | ||
return []; | ||
} | ||
|
||
const currentUserAccountID = getCurrentUserAccountID(); | ||
|
||
return getPolicyEmployeeListByIdWithoutCurrentUser(allPolicies, policyID, currentUserAccountID); | ||
} | ||
|
||
export default getPolicyEmployeeAccountIDs; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.