feat: handle edge cases for purchased courses in a subscription program (#32438)
This commit is contained in:
@@ -200,6 +200,7 @@ class ProgramDetailsView extends Backbone.View {
|
||||
));
|
||||
const programPurchasedWithoutSubscription = (
|
||||
this.subscriptionModel.get('subscriptionState') !== 'active'
|
||||
&& this.subscriptionModel.get('subscriptionState') !== 'inactive'
|
||||
&& !isSomeCoursePurchasable
|
||||
&& this.remainingCourseCollection.length === 0
|
||||
);
|
||||
|
||||
@@ -48,7 +48,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (isSubscriptionEligible) { %>
|
||||
<% if (isSubscriptionEligible && (
|
||||
completedCount !== totalCount
|
||||
|| subscriptionState === 'active'
|
||||
)
|
||||
) { %>
|
||||
<div class="d-flex flex-column align-items-start flex-xl-row align-items-xl-center upgrade-subscription">
|
||||
<a
|
||||
href="<%- subscriptionUrl %>"
|
||||
|
||||
@@ -23,7 +23,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (isSubscriptionEligible) { %>
|
||||
<% if (isSubscriptionEligible && (
|
||||
completedCount !== totalCount
|
||||
|| subscriptionState === 'active'
|
||||
)
|
||||
) { %>
|
||||
<div class="d-flex flex-column align-items-start flex-xl-row align-items-xl-center upgrade-subscription">
|
||||
<a
|
||||
href="<%- subscriptionUrl %>"
|
||||
|
||||
Reference in New Issue
Block a user