Refactor payment request handling to support role change top-ups
- Updated the `PaymentRequest` model to include a new `Kind` property, distinguishing between `Subscription` and `RoleChangeTopUp` requests. - Modified the `TelegramNotifier` to accommodate the new request type, ensuring accurate notifications for role change top-ups. - Enhanced the `ConfirmPaymentRequestCommandHandler` to handle role change top-ups without extending the billing period, reflecting the new payment logic. - Updated various application components and tests to support the new payment request structure and ensure proper functionality. - Revised API documentation to clarify the behavior of role change top-ups and their impact on billing.
This commit is contained in:
@@ -103,8 +103,12 @@ export function PaymentRequestPanel({ status }: { status: BillingStatusDto }) {
|
||||
</CardHeader>
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
<p className="text-sm">
|
||||
{t(`billing.periods.${request.period}`)} — <span className="font-medium">{request.amountSnapshot} ₽</span>
|
||||
{request.kind === 'RoleChangeTopUp' ? t('billing.roleChangeTopUp') : t(`billing.periods.${request.period}`)} —{' '}
|
||||
<span className="font-medium">{request.amountSnapshot} ₽</span>
|
||||
</p>
|
||||
{request.kind === 'RoleChangeTopUp' && (
|
||||
<p className="text-xs text-muted-foreground">{t('billing.roleChangeTopUpHint')}</p>
|
||||
)}
|
||||
|
||||
{!isAwaitingConfirmation && (
|
||||
<div className="flex flex-col gap-1.5">
|
||||
|
||||
Reference in New Issue
Block a user