Skip to content

Commit

Permalink
feat: update condition of programPurchasedWithoutSubscription
Browse files Browse the repository at this point in the history
  • Loading branch information
NawfalAhmed committed Jun 13, 2023
1 parent c7559f5 commit 5d08292
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>"
Expand Down

0 comments on commit 5d08292

Please sign in to comment.