fix(display): cadence-aware contribution suffix across UI + admin dashboard
Add formatContribution helper in app/config/contributions.js and route all member-facing and admin contribution displays through cadence-aware expressions so annual members see /yr instead of /mo. Normalize annual amounts to monthly equivalents in the admin dashboard revenue aggregate now that contributionAmount is stored in cadence units.
This commit is contained in:
parent
5023fb14ad
commit
0dd68ff1aa
6 changed files with 29 additions and 12 deletions
|
|
@ -36,7 +36,7 @@
|
|||
<PageHeader :title="welcomeTitle">
|
||||
<div class="dashboard-meta">
|
||||
<CircleBadge :circle="memberData?.circle || 'community'" />
|
||||
<span>${{ memberData?.contributionAmount ?? 0 }} CAD/mo</span>
|
||||
<span>{{ formatContribution(memberData?.contributionAmount ?? 0, memberData?.billingCadence) }} CAD</span>
|
||||
</div>
|
||||
<p v-if="showSlackComingNote" class="slack-coming-note">
|
||||
Slack workspace access is part of your membership. Invitations are
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
<div class="membership-row">
|
||||
<span class="key">Contribution</span>
|
||||
<span class="val"
|
||||
>${{ memberData?.contributionAmount ?? 0 }} CAD/month</span
|
||||
>{{ formatContribution(memberData?.contributionAmount ?? 0, memberData?.billingCadence) }} CAD</span
|
||||
>
|
||||
</div>
|
||||
<div class="membership-row">
|
||||
|
|
@ -220,6 +220,8 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { formatContribution } from '~/config/contributions';
|
||||
|
||||
useSiteMeta({ title: 'Dashboard', noindex: true });
|
||||
|
||||
const { memberData, checkMemberStatus } = useAuth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue