Skip to content

Commit ea78b78

Browse files
committed
Payment plan card shows number of included products
1 parent 76a7b7d commit ea78b78

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

apps/web/components/admin/payments/payment-plan-list.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,15 @@ export default function PaymentPlanList({
238238
>
239239
{getPlanTypeLabel(plan)}
240240
</Badge>
241+
{plan.includedProducts &&
242+
plan.includedProducts.length > 0 && (
243+
<Badge
244+
variant="outline"
245+
className="rounded-full px-1.5 py-0.5 text-[10px]"
246+
>
247+
{`+${plan.includedProducts.length} products`}
248+
</Badge>
249+
)}
241250
</div>
242251
</div>
243252
))}

apps/web/hooks/use-community.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const useCommunity = (id?: string | null) => {
4646
emiTotalInstallments
4747
subscriptionMonthlyAmount
4848
subscriptionYearlyAmount
49+
includedProducts
4950
}
5051
defaultPaymentPlan
5152
featuredImage {

apps/web/hooks/use-product.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export default function useProduct(id?: string | null): {
9797
subscriptionYearlyAmount
9898
entityId
9999
entityType
100+
includedProducts
100101
}
101102
leadMagnet
102103
defaultPaymentPlan

0 commit comments

Comments
 (0)