-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Update the policy creation flow to enable company cards by default #58599
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
Changes from all commits
dd237cf
abf598d
7f92518
c2c93a5
8dfcfb9
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 |
|---|---|---|
|
|
@@ -42,6 +42,7 @@ function WorkspaceCompanyCardPageEmptyState({policy}: WithPolicyAndFullscreenLoa | |
| const [isNoDelegateAccessMenuVisible, setIsNoDelegateAccessMenuVisible] = useState(false); | ||
| const [allWorkspaceCards] = useOnyx(ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST); | ||
| const shouldShowExpensifyCardPromotionBanner = !hasIssuedExpensifyCard(policy?.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID, allWorkspaceCards); | ||
| const workspaceAccountID = policy?.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID; | ||
|
Contributor
Author
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. This is not optimistically created, so to make sure we dont allow admins to run to weird bugs we would disable the button if the workspaceAccountID does not exist |
||
|
|
||
| const handleCtaPress = useCallback(() => { | ||
| if (!policy?.id) { | ||
|
|
@@ -70,6 +71,7 @@ function WorkspaceCompanyCardPageEmptyState({policy}: WithPolicyAndFullscreenLoa | |
| illustrationStyle={styles.emptyStateCardIllustration} | ||
| illustrationContainerStyle={[styles.emptyStateCardIllustrationContainer, styles.justifyContentStart]} | ||
| titleStyles={styles.textHeadlineH1} | ||
| isButtonDisabled={workspaceAccountID > CONST.DEFAULT_NUMBER_ID} | ||
|
Contributor
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. I think this should be the opposite, right? this disables it IF The comment above seems to suggest that this is backwards.
Contributor
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. #58670 if so |
||
| /> | ||
| <DelegateNoAccessModal | ||
| isNoDelegateAccessMenuVisible={isNoDelegateAccessMenuVisible} | ||
|
|
||
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.
All of these are TEAM only, you cannot create Control policy in NewDot now. Lets be explicit about the Expensify card settings too