Squashed commit of the following:

commit a1f44b855cff2b54992cdca81b9dd2f67c5de20a
Author: Kalista Payne <sabrecat@gmail.com>
Date:   Wed Dec 4 15:28:54 2024 -0600

    fix(g1g1): pass promo data thru profile flow

commit a9923f882f3294ba22e1dff9497e6f74b0d12eab
Merge: 05793922b2 75c9731ca4
Author: Kalista Payne <sabrecat@gmail.com>
Date:   Tue Dec 3 13:53:28 2024 -0600

    Merge branch 'develop' into sabrecat/g1g1-success

commit 05793922b2a3c0f9dd206b61beefb927b00859e4
Merge: b0bbc10457 d6c47e7e81
Author: Kalista Payne <sabrecat@gmail.com>
Date:   Tue Nov 19 12:21:42 2024 -0600

    Merge branch 'develop' into sabrecat/g1g1-success

commit b0bbc10457b0558faeaf02305210c8b0d5ed5839
Author: Kalista Payne <sabrecat@gmail.com>
Date:   Mon Nov 4 16:26:30 2024 -0600

    feat(gifts): add dynamic G1G1 success text
    also clean out some more Amazon code
This commit is contained in:
Kalista Payne
2024-12-12 12:45:14 -06:00
parent 75c9731ca4
commit 54617f8583
6 changed files with 34 additions and 3 deletions

View File

@@ -979,6 +979,7 @@
import moment from 'moment';
import axios from 'axios';
import each from 'lodash/each';
import find from 'lodash/find';
import cloneDeep from 'lodash/cloneDeep';
import achievementsLib from '@/../../common/script/libs/achievements';
import Content from '@/../../common/script/content';
@@ -1062,8 +1063,12 @@ export default {
},
computed: {
...mapState({
currentEventList: 'worldState.data.currentEventList',
flatGear: 'content.gear.flat',
}),
currentEvent () {
return find(this.currentEventList, event => Boolean(event.promo));
},
userJoinedDate () {
return moment(this.user.auth.timestamps.created)
.format(this.userLoggedIn.preferences.dateFormat.toUpperCase());
@@ -1257,6 +1262,7 @@ export default {
},
openSendGemsModal () {
this.user.g1g1 = this.currentEvent?.promo === 'g1g1';
this.$store.state.giftModalOptions.startingPage = 'buyGems';
this.$root.$emit('habitica::send-gift', this.user);
},