mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 19:38:37 +00:00
💸 chore: Align subscription pricing display with global currency settings
Unify subscription price rendering to use the site-wide currency symbol/rate on the wallet and admin views. Make subscription plan currency read-only in the editor and force USD on create/update to avoid drift. Use global currency display type when creating Creem checkout payloads.
This commit is contained in:
@@ -19,6 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
import React from 'react';
|
||||
import { Button, Modal, Space, Tag } from '@douyinfe/semi-ui';
|
||||
import { convertUSDToCurrency } from '../../helpers/render';
|
||||
|
||||
const quotaTypeLabel = (quotaType) => (quotaType === 1 ? '按次' : '按量');
|
||||
|
||||
@@ -48,8 +49,8 @@ const renderPlanTitle = (text, record) => {
|
||||
);
|
||||
};
|
||||
|
||||
const renderPrice = (text, record) => {
|
||||
return `${record?.plan?.currency || 'USD'} ${Number(text || 0).toFixed(2)}`;
|
||||
const renderPrice = (text) => {
|
||||
return convertUSDToCurrency(Number(text || 0), 2);
|
||||
};
|
||||
|
||||
const renderDuration = (text, record, t) => {
|
||||
|
||||
Reference in New Issue
Block a user