mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
Merge pull request #256 from FireWookie/feature/riopay
- RioPay payment system integration
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.29.1](https://github.com/BEDOLAGA-DEV/bedolaga-cabinet/compare/v1.29.0...v1.29.1) (2026-03-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* daily tariff renewal uses purchaseTariff instead of renewSubscription ([8629cfe](https://github.com/BEDOLAGA-DEV/bedolaga-cabinet/commit/8629cfea18aab9daf818f1f6c8e250ede29054d4))
|
||||||
|
* show fallback when tariff has no available periods for renewal ([ea06ad1](https://github.com/BEDOLAGA-DEV/bedolaga-cabinet/commit/ea06ad1d8f7894f5460d150fa72d094617b9fbbe))
|
||||||
|
|
||||||
## [1.29.0](https://github.com/BEDOLAGA-DEV/bedolaga-cabinet/compare/v1.28.0...v1.29.0) (2026-03-09)
|
## [1.29.0](https://github.com/BEDOLAGA-DEV/bedolaga-cabinet/compare/v1.28.0...v1.29.0) (2026-03-09)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cabinet-frontend",
|
"name": "cabinet-frontend",
|
||||||
"version": "1.29.0",
|
"version": "1.29.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cabinet-frontend",
|
"name": "cabinet-frontend",
|
||||||
"version": "1.29.0",
|
"version": "1.29.1",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cabinet-frontend",
|
"name": "cabinet-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.29.0",
|
"version": "1.29.1",
|
||||||
"description": "Remnawave Bedolaga Web App",
|
"description": "Remnawave Bedolaga Web App",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { useId } from 'react';
|
||||||
|
|
||||||
interface PaymentMethodIconProps {
|
interface PaymentMethodIconProps {
|
||||||
method: string;
|
method: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
@@ -7,6 +9,8 @@ export default function PaymentMethodIcon({
|
|||||||
method,
|
method,
|
||||||
className = 'h-8 w-8',
|
className = 'h-8 w-8',
|
||||||
}: PaymentMethodIconProps) {
|
}: PaymentMethodIconProps) {
|
||||||
|
const uid = useId();
|
||||||
|
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case 'telegram_stars':
|
case 'telegram_stars':
|
||||||
return (
|
return (
|
||||||
@@ -171,16 +175,17 @@ export default function PaymentMethodIcon({
|
|||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
|
||||||
case 'kassa_ai':
|
case 'kassa_ai': {
|
||||||
|
const kassaGradId = `${uid}-kassaAi`;
|
||||||
return (
|
return (
|
||||||
<svg className={className} viewBox="0 0 40 40">
|
<svg className={className} viewBox="0 0 40 40">
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="kassaAiGrad" x1="0" y1="0" x2="1" y2="1">
|
<linearGradient id={kassaGradId} x1="0" y1="0" x2="1" y2="1">
|
||||||
<stop offset="0%" stopColor="#6366F1" />
|
<stop offset="0%" stopColor="#6366F1" />
|
||||||
<stop offset="100%" stopColor="#8B5CF6" />
|
<stop offset="100%" stopColor="#8B5CF6" />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<circle cx="20" cy="20" r="20" fill="url(#kassaAiGrad)" />
|
<circle cx="20" cy="20" r="20" fill={`url(#${kassaGradId})`} />
|
||||||
<g fill="#fff" fontFamily="Arial,sans-serif" fontWeight="700">
|
<g fill="#fff" fontFamily="Arial,sans-serif" fontWeight="700">
|
||||||
<text x="20" y="26" textAnchor="middle" fontSize="15">
|
<text x="20" y="26" textAnchor="middle" fontSize="15">
|
||||||
AI
|
AI
|
||||||
@@ -188,6 +193,27 @@ export default function PaymentMethodIcon({
|
|||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'riopay': {
|
||||||
|
const riopayGradId = `${uid}-riopay`;
|
||||||
|
return (
|
||||||
|
<svg className={className} viewBox="0 0 40 40">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id={riopayGradId} x1="0" y1="0" x2="1" y2="1">
|
||||||
|
<stop offset="0%" stopColor="#10B981" />
|
||||||
|
<stop offset="100%" stopColor="#059669" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<circle cx="20" cy="20" r="20" fill={`url(#${riopayGradId})`} />
|
||||||
|
<g fill="#fff" fontFamily="Arial,sans-serif" fontWeight="700">
|
||||||
|
<text x="20" y="26" textAnchor="middle" fontSize="14">
|
||||||
|
RP
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import type { SalesStatsParams } from '../../api/adminSalesStats';
|
import type { SalesStatsParams } from '../../api/adminSalesStats';
|
||||||
import { salesStatsApi } from '../../api/adminSalesStats';
|
import { salesStatsApi } from '../../api/adminSalesStats';
|
||||||
|
import { METHOD_LABELS } from '../../constants/paymentMethods';
|
||||||
import { SALES_STATS } from '../../constants/salesStats';
|
import { SALES_STATS } from '../../constants/salesStats';
|
||||||
import { useCurrency } from '../../hooks/useCurrency';
|
import { useCurrency } from '../../hooks/useCurrency';
|
||||||
import { StatCard } from '../stats';
|
import { StatCard } from '../stats';
|
||||||
@@ -16,21 +17,6 @@ interface DepositsTabProps {
|
|||||||
params: SalesStatsParams;
|
params: SalesStatsParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
const METHOD_LABELS: Record<string, string> = {
|
|
||||||
telegram_stars: 'Telegram Stars',
|
|
||||||
tribute: 'Tribute',
|
|
||||||
yookassa: 'YooKassa',
|
|
||||||
cryptobot: 'CryptoBot',
|
|
||||||
heleket: 'Heleket',
|
|
||||||
mulenpay: 'Mulenpay',
|
|
||||||
pal24: 'Pal24',
|
|
||||||
wata: 'Wata',
|
|
||||||
platega: 'Platega',
|
|
||||||
cloudpayments: 'CloudPayments',
|
|
||||||
freekassa: 'FreeKassa',
|
|
||||||
kassa_ai: 'Kassa AI',
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DepositsTab({ params }: DepositsTabProps) {
|
export function DepositsTab({ params }: DepositsTabProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { formatWithCurrency } = useCurrency();
|
const { formatWithCurrency } = useCurrency();
|
||||||
|
|||||||
17
src/constants/paymentMethods.ts
Normal file
17
src/constants/paymentMethods.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
export const METHOD_LABELS: Record<string, string> = {
|
||||||
|
telegram_stars: 'Telegram Stars',
|
||||||
|
tribute: 'Tribute',
|
||||||
|
cryptobot: 'CryptoBot',
|
||||||
|
heleket: 'Heleket',
|
||||||
|
yookassa: 'YooKassa',
|
||||||
|
mulenpay: 'MulenPay',
|
||||||
|
pal24: 'PayPalych',
|
||||||
|
platega: 'Platega',
|
||||||
|
wata: 'WATA',
|
||||||
|
freekassa: 'Freekassa',
|
||||||
|
freekassa_sbp: 'Freekassa СБП',
|
||||||
|
freekassa_card: 'Freekassa Карта',
|
||||||
|
cloudpayments: 'CloudPayments',
|
||||||
|
kassa_ai: 'Kassa AI',
|
||||||
|
riopay: 'RioPay',
|
||||||
|
};
|
||||||
@@ -3,6 +3,7 @@ import { useParams, useNavigate } from 'react-router';
|
|||||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { adminPaymentMethodsApi } from '../api/adminPaymentMethods';
|
import { adminPaymentMethodsApi } from '../api/adminPaymentMethods';
|
||||||
|
import { METHOD_LABELS } from '../constants/paymentMethods';
|
||||||
import type { PromoGroupSimple } from '../types';
|
import type { PromoGroupSimple } from '../types';
|
||||||
import { usePlatform } from '../platform/hooks/usePlatform';
|
import { usePlatform } from '../platform/hooks/usePlatform';
|
||||||
import { createNumberInputHandler, toNumber } from '../utils/inputHelpers';
|
import { createNumberInputHandler, toNumber } from '../utils/inputHelpers';
|
||||||
@@ -18,23 +19,6 @@ const BackIcon = () => (
|
|||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
|
||||||
const METHOD_LABELS: Record<string, string> = {
|
|
||||||
telegram_stars: 'Telegram Stars',
|
|
||||||
tribute: 'Tribute',
|
|
||||||
cryptobot: 'CryptoBot',
|
|
||||||
heleket: 'Heleket',
|
|
||||||
yookassa: 'YooKassa',
|
|
||||||
mulenpay: 'MulenPay',
|
|
||||||
pal24: 'PayPalych',
|
|
||||||
platega: 'Platega',
|
|
||||||
wata: 'WATA',
|
|
||||||
freekassa: 'Freekassa',
|
|
||||||
freekassa_sbp: 'Freekassa СБП',
|
|
||||||
freekassa_card: 'Freekassa Карта',
|
|
||||||
cloudpayments: 'CloudPayments',
|
|
||||||
kassa_ai: 'Kassa AI',
|
|
||||||
};
|
|
||||||
|
|
||||||
const CheckIcon = () => (
|
const CheckIcon = () => (
|
||||||
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
||||||
<path strokeLinecap="round" strokeLinejoin="round" d="M4.5 12.75l6 6 9-13.5" />
|
<path strokeLinecap="round" strokeLinejoin="round" d="M4.5 12.75l6 6 9-13.5" />
|
||||||
|
|||||||
Reference in New Issue
Block a user