File tree Expand file tree Collapse file tree
client/directives/accountsSelect Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ function accountsSelect (
105105 return '' ;
106106 }
107107 if ( currentOrg . poppa . isInTrial ( ) && ! currentOrg . poppa . attrs . hasPaymentMethod ) {
108- return currentOrg . poppa . trialDaysRemaining ( ) ;
108+ var trialRemaining = currentOrg . poppa . trialDaysRemaining ( ) ;
109+ if ( trialRemaining <= 3 ) {
110+ return trialRemaining ;
111+ }
109112 }
110113 return '' ;
111114 } ;
@@ -114,9 +117,10 @@ function accountsSelect (
114117 if ( ! $rootScope . featureFlags . billing ) {
115118 return { } ;
116119 }
120+ var showBadge = currentOrg . poppa . isInTrial ( ) && ! currentOrg . poppa . attrs . hasPaymentMethod && currentOrg . poppa . trialDaysRemaining ( ) <= 3 ;
117121 return {
118- badge : currentOrg . poppa . isInTrial ( ) && ! currentOrg . poppa . attrs . hasPaymentMethod ,
119- 'badge-orange' : currentOrg . poppa . isInTrial ( ) && ! currentOrg . poppa . attrs . hasPaymentMethod
122+ badge : showBadge ,
123+ 'badge-orange' : showBadge
120124 } ;
121125 } ;
122126 }
You can’t perform that action at this time.
0 commit comments