fix(review): accept arbitrary amounts in payment-setup; rename m.tier → m.amount in activity text
This commit is contained in:
parent
9f557d7e7a
commit
dfc03f851b
2 changed files with 2 additions and 3 deletions
|
|
@ -56,12 +56,11 @@ const toast = useToast();
|
||||||
const { memberData, checkMemberStatus } = useAuth();
|
const { memberData, checkMemberStatus } = useAuth();
|
||||||
const { initializeHelcimPay, verifyPayment, cleanup: cleanupHelcim } = useHelcimPay();
|
const { initializeHelcimPay, verifyPayment, cleanup: cleanupHelcim } = useHelcimPay();
|
||||||
|
|
||||||
const VALID_AMOUNTS = [5, 15, 30, 50];
|
|
||||||
const VALID_CIRCLES = ['community', 'founder', 'practitioner'];
|
const VALID_CIRCLES = ['community', 'founder', 'practitioner'];
|
||||||
|
|
||||||
const targetAmount = computed(() => {
|
const targetAmount = computed(() => {
|
||||||
const n = Number(route.query.tier);
|
const n = Number(route.query.tier);
|
||||||
return VALID_AMOUNTS.includes(n) ? n : null;
|
return Number.isInteger(n) && n > 0 ? n : null;
|
||||||
});
|
});
|
||||||
const targetCircle = computed(() => {
|
const targetCircle = computed(() => {
|
||||||
const c = String(route.query.circle || '');
|
const c = String(route.query.circle || '');
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ const formatters = {
|
||||||
icon: 'i-lucide-user-pen'
|
icon: 'i-lucide-user-pen'
|
||||||
}),
|
}),
|
||||||
subscription_created: (m) => ({
|
subscription_created: (m) => ({
|
||||||
text: m.tier ? `Started $${m.tier}/mo subscription` : 'Started subscription',
|
text: m.amount != null ? `Started $${m.amount}/mo subscription` : 'Started subscription',
|
||||||
icon: 'i-lucide-credit-card'
|
icon: 'i-lucide-credit-card'
|
||||||
}),
|
}),
|
||||||
subscription_cancelled: () => ({
|
subscription_cancelled: () => ({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue