Enhance PaidUntilBadge component to support pending payment review status
- Updated the PaidUntilBadge component to accept a new `pendingReview` prop, indicating if a payment is awaiting admin confirmation. - Modified the rendering logic to display a warning badge when a payment is under review, providing users with a neutral status instead of a negative one. - Updated relevant components in billing and dashboard routes to pass the new `pendingReview` prop based on the active payment request status. - Added internationalization support for new labels related to the pending review status in both English and Russian.
This commit is contained in:
@@ -63,7 +63,12 @@ function BillingContent() {
|
||||
? t('billing.paidUntil', { date: new Date(data.paidUntil).toLocaleDateString() })
|
||||
: t('billing.neverPaid')}
|
||||
</p>
|
||||
{data.paidUntil && <PaidUntilBadge paidUntil={data.paidUntil} />}
|
||||
{data.paidUntil && (
|
||||
<PaidUntilBadge
|
||||
paidUntil={data.paidUntil}
|
||||
pendingReview={data.activeRequest?.status === 'AwaitingConfirmation'}
|
||||
/>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -45,7 +45,10 @@ function ConfigsList() {
|
||||
{billingStatusQuery.data?.billingEnabled && (
|
||||
<Link to="/billing" className="mt-1 inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground">
|
||||
{t('billing.paidUntilLabel')}
|
||||
<PaidUntilBadge paidUntil={billingStatusQuery.data.paidUntil} />
|
||||
<PaidUntilBadge
|
||||
paidUntil={billingStatusQuery.data.paidUntil}
|
||||
pendingReview={billingStatusQuery.data.activeRequest?.status === 'AwaitingConfirmation'}
|
||||
/>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user