Add getModelType function to support model type display in Prices view

This commit is contained in:
wood chen 2025-02-21 11:58:04 +08:00
parent 6fa37f6d6a
commit 15a7c75145

View File

@ -464,6 +464,12 @@ const billingTypeMap = {
const getStatus = (status) => statusMap[status] || status const getStatus = (status) => statusMap[status] || status
const getBillingType = (type) => billingTypeMap[type] || type const getBillingType = (type) => billingTypeMap[type] || type
// getModelType
const getModelType = (type) => {
if (!type) return ''
return modelTypeMap.value[type] || type
}
const calculateRate = (price, currency) => { const calculateRate = (price, currency) => {
if (!price) return 0 if (!price) return 0
return currency === 'USD' ? (price / 2).toFixed(4) : (price / 14).toFixed(4) return currency === 'USD' ? (price / 2).toFixed(4) : (price / 14).toFixed(4)