diff --git a/habitica-images b/habitica-images index 6e9d17b8a4..6610fcd017 160000 --- a/habitica-images +++ b/habitica-images @@ -1 +1 @@ -Subproject commit 6e9d17b8a4af295ba2d9dc9870b2904035d6fba7 +Subproject commit 6610fcd01761149ce5391cbe85a249fd80d7983c diff --git a/website/client/src/components/group-plans/groupPlanCreationModal.vue b/website/client/src/components/group-plans/groupPlanCreationModal.vue index fde0ec2d9f..cf837b13e5 100644 --- a/website/client/src/components/group-plans/groupPlanCreationModal.vue +++ b/website/client/src/components/group-plans/groupPlanCreationModal.vue @@ -89,6 +89,7 @@ class="group-input" :placeholder="'groupUseDefault'" :value="newGroup.demographics" + @select="newGroup.demographics = $event" />
@@ -102,6 +103,7 @@
+
+ + @@ -244,7 +253,7 @@ export default { amazonPayments: {}, PAGES: { CREATE_GROUP: 'create-group', - UPGRADE_GROUP: 'upgrade-group', + // UPGRADE_GROUP: 'upgrade-group', PAY: 'pay', }, PAYMENTS: { @@ -262,18 +271,15 @@ export default { demographics: null, }, activePage: 'create-group', - type: 'guild', // Guild or Party @TODO enum this + type: 'guild', }; }, computed: { ...mapState({ user: 'user.data' }), newGroupIsReady () { - return Boolean(this.newGroup.name); + return Boolean(this.newGroup.name) && Boolean(this.newGroup.demographics); }, }, - mounted () { - console.log('i am mounted'); - }, methods: { close () { this.$root.$emit('bv::hide::modal', 'create-group'); @@ -282,9 +288,8 @@ export default { this.activePage = page; }, createGroup () { - console.log('i am giving habitica money now'); - this.changePage(this.PAGES.PAY); console.log(this.newGroup); + this.changePage(this.PAGES.PAY); }, pay (paymentMethod) { const subscriptionKey = 'group_monthly'; // @TODO: Get from content API? @@ -313,9 +318,21 @@ export default { return null; }, + // need to figure out where/how to create the event in amplitude + // right now being sent to console in success() + sendAnalytics () { + return this.newGroup.demographics; + }, onHide () { this.sendingInProgress = false; }, + // temporary function to go with temporary button + success () { + console.log(this.sendAnalytics()); + this.sendAnalytics(); + this.$root.$emit('bv::hide::modal', 'create-group'); + this.$root.$emit('bv::show::modal', 'payments-success-modal'); + }, }, }; diff --git a/website/client/src/components/groups/groupPlan.vue b/website/client/src/components/groups/groupPlan.vue index a96766c402..a4667cc7a2 100644 --- a/website/client/src/components/groups/groupPlan.vue +++ b/website/client/src/components/groups/groupPlan.vue @@ -52,6 +52,7 @@ +
+