feat(frontend): rename contributionTier → contributionAmount across remaining pages

This commit is contained in:
Jennie Robinson Faber 2026-04-19 19:08:57 +01:00
parent 5ef0cc845f
commit b17e006d65
6 changed files with 133 additions and 81 deletions

View file

@ -3,7 +3,7 @@
<ClientOnly>
<PageHeader
title="Set Up Payment"
:subtitle="targetTier ? `Upgrading to $${targetTier}/month` : 'Payment setup'"
:subtitle="targetAmount != null ? `Upgrading to $${targetAmount}/month` : 'Payment setup'"
/>
<PageSection>
@ -21,7 +21,7 @@
<div v-else-if="step === 'ready'" class="status-block">
<p>
To upgrade to <strong>${{ targetTier }}/month</strong>, we need a
To upgrade to <strong>${{ targetAmount }}/month</strong>, we need a
payment method on file. Click below to open the secure payment
form we'll verify your card with a $0 authorization and then
activate your new tier.
@ -56,12 +56,12 @@ const toast = useToast();
const { memberData, checkMemberStatus } = useAuth();
const { initializeHelcimPay, verifyPayment, cleanup: cleanupHelcim } = useHelcimPay();
const VALID_TIERS = ['5', '15', '30', '50'];
const VALID_AMOUNTS = [5, 15, 30, 50];
const VALID_CIRCLES = ['community', 'founder', 'practitioner'];
const targetTier = computed(() => {
const t = String(route.query.tier || '');
return VALID_TIERS.includes(t) ? t : null;
const targetAmount = computed(() => {
const n = Number(route.query.tier);
return VALID_AMOUNTS.includes(n) ? n : null;
});
const targetCircle = computed(() => {
const c = String(route.query.circle || '');
@ -78,8 +78,8 @@ const initialize = async () => {
errorMessage.value = '';
step.value = 'loading';
if (!targetTier.value) {
errorMessage.value = 'Missing or invalid target tier.';
if (targetAmount.value == null) {
errorMessage.value = 'Missing or invalid target amount.';
step.value = 'error';
return;
}
@ -129,7 +129,7 @@ const openModal = async () => {
await $fetch('/api/members/update-contribution', {
method: 'POST',
// cadence: annual upgrades go through /join; this page is monthly-only
body: { contributionTier: targetTier.value, cadence: 'monthly' },
body: { contributionAmount: targetAmount.value, cadence: 'monthly' },
});
await checkMemberStatus();