mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-02 07:49:39 +00:00
* Added new message for when user has group plan * Changed subscription wording to group plan * Updated copy
50 lines
3.5 KiB
Text
50 lines
3.5 KiB
Text
// @TODO: This can be a directive and the group/user can be an object passed via attribute
|
|
mixin groupSubscription()
|
|
div(ng-show="groupPanel == 'subscription'")
|
|
.col-md-12
|
|
.col-md-12
|
|
div(ng-hide="group.purchased.plan.customerId")
|
|
+groupPlansBenefits
|
|
|
|
.row
|
|
.col-md-12
|
|
br
|
|
table.table.alert.alert-info(ng-if='group.purchased.plan.customerId')
|
|
tr(ng-if='group.purchased.plan.dateTerminated'): td.alert.alert-warning
|
|
span.noninteractive-button.btn-danger=env.t('canceledSubscription')
|
|
i.glyphicon.glyphicon-time
|
|
| #{env.t('subCanceled')} <strong>{{moment(group.purchased.plan.dateTerminated).format('MM/DD/YYYY')}}</strong>
|
|
tr(ng-if='!group.purchased.plan.dateTerminated'): td
|
|
h3=env.t('paymentDetails')
|
|
p(ng-if='group.purchased.plan.planId')=env.t('groupSubscriptionPrice')
|
|
tr(ng-if='group.purchased.plan.extraMonths'): td
|
|
span.glyphicon.glyphicon-credit-card
|
|
| #{env.t('purchasedGroupPlanPlanExtraMonths', {months: '{{group.purchased.plan.extraMonths | number:2}}'})}
|
|
tr(ng-if='group.purchased.plan.consecutive.count || group.purchased.plan.consecutive.offset'): td
|
|
span.glyphicon.glyphicon-forward
|
|
| #{env.t('consecutiveSubscription')}
|
|
ul.list-unstyled
|
|
li #{env.t('consecutiveMonths')} {{group.purchased.plan.consecutive.count + group.purchased.plan.consecutive.offset}}
|
|
li #{env.t('gemCapExtra')} {{group.purchased.plan.consecutive.gemCapExtra}}
|
|
li #{env.t('mysticHourglasses')} {{group.purchased.plan.consecutive.trinkets}}
|
|
|
|
div(ng-if='group.purchased.plan.customerId')
|
|
.btn.btn-primary(ng-if='!group.purchased.plan.dateTerminated && group.purchased.plan.paymentMethod=="Stripe"', ng-click='Payments.showStripeEdit({groupId: group.id})')=env.t('subUpdateCard')
|
|
.btn.btn-sm.btn-danger(ng-if='!group.purchased.plan.dateTerminated', ng-click='Payments.cancelSubscription({group: group})')=env.t('cancelGroupSub')
|
|
|
|
.row
|
|
.col-md-12(ng-if='!group.purchased.plan.customerId || (group.purchased.plan.customerId && group.purchased.plan.dateTerminated)', ng-init="_subscription.key='group_monthly'")
|
|
.row.text-center
|
|
h3 Upgrade My Group
|
|
div
|
|
a.purchase.btn.btn-primary(ng-click='Payments.showStripe({subscription:_subscription.key, coupon:_subscription.coupon, groupId: group.id, group: group})', ng-disabled='!_subscription.key')= env.t('card')
|
|
a.purchase(ng-click="Payments.amazonPayments.init({type: 'subscription', subscription:_subscription.key, coupon:_subscription.coupon, groupId: group.id, group: group})")
|
|
img(src='https://payments.amazon.com/gp/cba/button',alt=env.t('amazonPayments'))
|
|
//- .col-xs-4
|
|
//- a.purchase(href='/paypal/subscribe?_id={{user._id}}&apiToken={{User.settings.auth.apiToken}}&sub={{_subscription.key}}{{_subscription.coupon ? "&coupon="+_subscription.coupon : ""}}&groupId={{group.id}}', ng-disabled='!_subscription.key')
|
|
//- img(src='https://www.paypalobjects.com/webstatic/en_US/i/buttons/pp-acceptance-small.png',alt=env.t('paypal'))
|
|
|
|
.row(ng-if='!group.purchased.plan.customerId')
|
|
.col-md-6.col-md-offset-3
|
|
br
|
|
.text-center=env.t('groupSubscriptionPrice')
|