Skip to content

Commit

Permalink
Merge pull request #5061 from kiva/increase-edit-donation-modal-tip-r…
Browse files Browse the repository at this point in the history
…ate-MARS-549
  • Loading branch information
christian14b authored Nov 8, 2023
2 parents 444e57c + 94c3468 commit f0f5e03
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/components/Checkout/DonationNudge/DonationNudgeLightbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ import KvCharityNavigator from '@/components/Kv/KvCharityNavigator';
import { mdiInformation } from '@mdi/js';
import HeartIcon from '@/assets/icons/inline/heart-icon.svg';
import HowKivaUsesDonation from '@/components/Checkout/HowKivaUsesDonation';
import { gql } from '@apollo/client';
import { readBoolSetting } from '@/util/settingsUtils';
import KvButton from '~/@kiva/kv-components/vue/KvButton';
import KvLightbox from '~/@kiva/kv-components/vue/KvLightbox';
import KvMaterialIcon from '~/@kiva/kv-components/vue/KvMaterialIcon';
Expand All @@ -108,9 +110,25 @@ export default {
mdiInformation,
zeroUpsellVisible: false,
title: 'Loans change lives. Your donations make them possible.',
seasonalTipRateEnabled: false,
};
},
inject: ['cookieStore'],
inject: ['apollo', 'cookieStore'],
apollo: {
query: gql`query seasonalTipRateIncrease {
general {
seasonalTipRateEnabled: featureSetting(key: "seasonal_tip_rate.enabled") {
key
value
}
}
}
`,
preFetch: true,
result({ data }) {
this.seasonalTipRateEnabled = readBoolSetting(data, 'general.seasonalTipRateEnabled.value');
}
},
components: {
KvButton,
KvLightbox,
Expand Down Expand Up @@ -154,12 +172,12 @@ export default {
percentageRows() {
return [
{
percentage: 15,
percentage: this.seasonalTipRateEnabled ? 18 : 15,
appeal: `Cover the cost to facilitate ${this.loanCount > 1 ? 'these loans' : 'this loan'}`,
appealIsHorizontallyPadded: false,
},
{
percentage: 20,
percentage: this.seasonalTipRateEnabled ? 24 : 20,
appeal: 'Reach more people around the world!',
appealIsHorizontallyPadded: false,
},
Expand Down

0 comments on commit f0f5e03

Please sign in to comment.