Sept 8 fixes (#9028)

* Added task sync after joining challenge

* Added gem purchasing

* Updated member modal style

* Added community guidelines to all groups

* Added group plans redirect

* Began add new front page design

* Fixed challenge loading on mount

* Fixed upgrade

* Added default summary

* Fixed small nav bar styles

* Added more unlock options to avatar editor

* Added more home page finishes
This commit is contained in:
Keith Holliday
2017-09-11 23:00:34 -05:00
committed by GitHub
parent eee41142b1
commit 55e62cdc79
48 changed files with 1156 additions and 866 deletions

View File

@@ -119,9 +119,6 @@ import planGemLimits from '../../../common/script/libs/planGemLimits';
import amazonPaymentsModal from '../payments/amazonModal';
import paymentsMixin from '../../mixins/payments';
// TODO
const STRIPE_PUB_KEY = 'pk_test_6pRNASCoBOKtIshFeQd4XMUh';
export default {
mixins: [paymentsMixin],
components: {
@@ -137,7 +134,6 @@ export default {
key: 'basic_earned',
},
amazonPayments: {},
StripeCheckout: {},
paymentMethods: {
AMAZON_PAYMENTS: 'Amazon Payments',
STRIPE: 'Stripe',
@@ -148,9 +144,6 @@ export default {
},
};
},
mounted () {
this.StripeCheckout = window.StripeCheckout;
},
filters: {
date (value) {
if (!value) return '';
@@ -254,30 +247,6 @@ export default {
subs.basic_6mo.discount = true;
subs.google_6mo.discount = false;
},
showStripeEdit (config) {
let groupId;
if (config && config.groupId) {
groupId = config.groupId;
}
this.StripeCheckout.open({
key: STRIPE_PUB_KEY,
address: false,
name: this.$t('subUpdateTitle'),
description: this.$t('subUpdateDescription'),
panelLabel: this.$t('subUpdateCard'),
token: async (data) => {
data.groupId = groupId;
let url = '/stripe/subscribe/edit';
let response = await axios.post(url, data);
// Succss
window.location.reload(true);
// error
alert(response.message);
},
});
},
canCancelSubscription () {
return (
this.user.purchased.plan.paymentMethod !== this.paymentMethods.GOOGLE &&