Include sponsored cancels in dashboard
Also includes free teacher sub cancels, which should be an insignificant number.
This commit is contained in:
parent
0353be4fc4
commit
dd35a1eb76
2 changed files with 1 additions and 2 deletions
|
@ -28,7 +28,7 @@ module.exports = class AnalyticsSubscriptionsView extends RootView
|
|||
context.subscriberCancelled = _.find context.subscribers, (subscriber) -> subscriber.cancel
|
||||
context.subscriberSponsored = _.find context.subscribers, (subscriber) -> subscriber.user?.stripe?.sponsorID
|
||||
context.total = @total ? 0
|
||||
context.cancelled = @cancelled ? 0
|
||||
context.cancelled = @cancellations?.length ? @cancelled ? 0
|
||||
context.monthlyChurn = @monthlyChurn ? 0.0
|
||||
context.monthlyGrowth = @monthlyGrowth ? 0.0
|
||||
context
|
||||
|
|
|
@ -49,7 +49,6 @@ class SubscriptionHandler extends Handler
|
|||
return done(err) if err
|
||||
for event in events.data
|
||||
continue unless event.data?.object?.cancel_at_period_end is true and event.data?.previous_attributes.cancel_at_period_end is false
|
||||
continue if event.data?.object?.discount?
|
||||
continue unless event.data?.object?.plan?.id is 'basic'
|
||||
continue unless event.data?.object?.id?
|
||||
cancellationEvents.push
|
||||
|
|
Reference in a new issue