mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
* Fixed date. * Got rid of the filter and returned moment. * fix the return value * Stupid typo.
This commit is contained in:
parent
f1e200c0f5
commit
4ab89fd3e0
1 changed files with 5 additions and 8 deletions
|
|
@ -33,7 +33,7 @@
|
|||
span.noninteractive-button.btn-danger {{ $t('canceledSubscription') }}
|
||||
i.glyphicon.glyphicon-time
|
||||
| {{ $t('subCanceled') }}
|
||||
strong {{user.purchased.plan.dateTerminated | date}}
|
||||
strong {{dateTerminated}}
|
||||
tr(v-if='!hasCanceledSubscription'): td
|
||||
h4 {{ $t('subscribed') }}
|
||||
p(v-if='hasPlan && !hasGroupPlan') {{ $t('purchasedPlanId', purchasedPlanIdInfo) }}
|
||||
|
|
@ -143,13 +143,6 @@ export default {
|
|||
},
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
date (value) {
|
||||
if (!value) return '';
|
||||
return moment(value);
|
||||
// return moment(value).format(this.user.preferences.dateFormat); // @TODO make that work (`TypeError: this is undefined`)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState({user: 'user.data', credentials: 'credentials'}),
|
||||
subscriptionBlocksOrdered () {
|
||||
|
|
@ -237,6 +230,10 @@ export default {
|
|||
amount: this.numberOfMysticHourglasses,
|
||||
};
|
||||
},
|
||||
dateTerminated () {
|
||||
if (!this.user.preferences || !this.user.preferences.dateFormat) return this.user.purchased.plan.dateTerminated;
|
||||
return moment(this.user.purchased.plan.dateTerminated).format(this.user.preferences.dateFormat.toUpperCase());
|
||||
},
|
||||
canCancelSubscription () {
|
||||
return (
|
||||
this.user.purchased.plan.paymentMethod !== this.paymentMethods.GOOGLE &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue