-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Feature: Add spinning loader until full list of policies is successfully download on the client #54238
Feature: Add spinning loader until full list of policies is successfully download on the client #54238
Changes from 7 commits
76062d9
7084fbd
3bff973
52b137f
ecaf750
ee69010
0d70cbf
7cf7728
bfac51d
20c1550
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
type LeavePolicyParams = { | ||
policyID: string; | ||
policyID?: string; | ||
email: string; | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7381,7 +7381,7 @@ function getWorkspaceChats(policyID: string, accountIDs: number[], reports: Onyx | |
* | ||
* @param policyID - the workspace ID to get all associated reports | ||
*/ | ||
function getAllWorkspaceReports(policyID: string): Array<OnyxEntry<Report>> { | ||
function getAllWorkspaceReports(policyID: string | undefined): Array<OnyxEntry<Report>> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove this. |
||
return Object.values(allReports ?? {}).filter((report) => (report?.policyID ?? '-1') === policyID); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -725,7 +725,7 @@ function clearWorkspaceReimbursementErrors(policyID: string) { | |
Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {errorFields: {reimbursementChoice: null}}); | ||
} | ||
|
||
function leaveWorkspace(policyID: string) { | ||
function leaveWorkspace(policyID: string | undefined) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's early return here when policyid is undefined There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure! |
||
const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`]; | ||
const workspaceChats = ReportUtils.getAllWorkspaceReports(policyID); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not change the type.