File tree 3 files changed +1
-18
lines changed
3 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,6 @@ const CONST = {
363
363
} ,
364
364
BETAS : {
365
365
ALL : 'all' ,
366
- CHRONOS_IN_CASH : 'chronosInCash' ,
367
366
DEFAULT_ROOMS : 'defaultRooms' ,
368
367
VIOLATIONS : 'violations' ,
369
368
DUPE_DETECTION : 'dupeDetection' ,
Original file line number Diff line number Diff line change @@ -1713,14 +1713,12 @@ function canCreateOptimisticPersonalDetailOption({
1713
1713
* - There's no matching recent report and personal detail option
1714
1714
* - The searchValue is a valid email or phone number
1715
1715
* - The searchValue isn't the current personal detail login
1716
- * - We can use chronos or the search value is not the chronos email
1717
1716
*/
1718
1717
function getUserToInviteOption ( {
1719
1718
searchValue,
1720
1719
excludeUnknownUsers = false ,
1721
1720
optionsToExclude = [ ] ,
1722
1721
selectedOptions = [ ] ,
1723
- betas,
1724
1722
reportActions = { } ,
1725
1723
showChatPreviewLine = false ,
1726
1724
} : GetUserToInviteConfig ) : ReportUtils . OptionData | null {
@@ -1731,17 +1729,8 @@ function getUserToInviteOption({
1731
1729
const isValidPhoneNumber = parsedPhoneNumber . possible && Str . isValidE164Phone ( LoginUtils . getPhoneNumberWithoutSpecialChars ( parsedPhoneNumber . number ?. input ?? '' ) ) ;
1732
1730
const isInOptionToExclude =
1733
1731
optionsToExclude . findIndex ( ( optionToExclude ) => 'login' in optionToExclude && optionToExclude . login === PhoneNumber . addSMSDomainIfPhoneNumber ( searchValue ) . toLowerCase ( ) ) !== - 1 ;
1734
- const isChronosEmail = searchValue === CONST . EMAIL . CHRONOS ;
1735
1732
1736
- if (
1737
- ! searchValue ||
1738
- isCurrentUserLogin ||
1739
- isInSelectedOption ||
1740
- ( ! isValidEmail && ! isValidPhoneNumber ) ||
1741
- isInOptionToExclude ||
1742
- ( isChronosEmail && ! Permissions . canUseChronos ( betas ) ) ||
1743
- excludeUnknownUsers
1744
- ) {
1733
+ if ( ! searchValue || isCurrentUserLogin || isInSelectedOption || ( ! isValidEmail && ! isValidPhoneNumber ) || isInOptionToExclude || excludeUnknownUsers ) {
1745
1734
return null ;
1746
1735
}
1747
1736
Original file line number Diff line number Diff line change @@ -7,10 +7,6 @@ function canUseAllBetas(betas: OnyxEntry<Beta[]>): boolean {
7
7
return ! ! betas ?. includes ( CONST . BETAS . ALL ) ;
8
8
}
9
9
10
- function canUseChronos ( betas : OnyxEntry < Beta [ ] > ) : boolean {
11
- return ! ! betas ?. includes ( CONST . BETAS . CHRONOS_IN_CASH ) || canUseAllBetas ( betas ) ;
12
- }
13
-
14
10
function canUseDefaultRooms ( betas : OnyxEntry < Beta [ ] > ) : boolean {
15
11
return ! ! betas ?. includes ( CONST . BETAS . DEFAULT_ROOMS ) || canUseAllBetas ( betas ) ;
16
12
}
@@ -60,7 +56,6 @@ function canUseLinkPreviews(): boolean {
60
56
}
61
57
62
58
export default {
63
- canUseChronos,
64
59
canUseDefaultRooms,
65
60
canUseLinkPreviews,
66
61
canUseViolations,
You can’t perform that action at this time.
0 commit comments