fix: restore direct actions after quota recommendations
This commit is contained in:
@@ -8184,6 +8184,10 @@ function renderCreditsScreen() {
|
||||
const usage = appState.tenantUsage || quota?.usage || {};
|
||||
const categories = usage?.categories || {};
|
||||
const forecast = getTenantQuotaForecastValues(quota || {}, usage);
|
||||
const packageRecommendation = getTenantQuotaPackageRecommendation({
|
||||
...(quota || {}),
|
||||
package_label: quota?.config?.package_label || "custom"
|
||||
}, usage);
|
||||
const estimatedVideoUsage = (categories.ai_video?.quantity || 0) + (categories.real_cut?.quantity || 0);
|
||||
const budgetAmount = (quota?.monthly_budget_cents || usage?.total_cost_cents || 0) / 100;
|
||||
const usedAmount = (usage?.total_cost_cents || 0) / 100;
|
||||
|
||||
@@ -331,6 +331,7 @@ test("quota and review screens foreground live next-step guidance", () => {
|
||||
assert.match(tenantQuota, /renderTenantQuotaForecastTags\(quota \|\| \{\}, usage\)/);
|
||||
assert.match(tenantQuota, /packageRecommendation\.title/);
|
||||
assert.match(credits, /renderTenantQuotaForecastTags\(quota \|\| \{\}, usage\)/);
|
||||
assert.match(credits, /const packageRecommendation = getTenantQuotaPackageRecommendation\(/);
|
||||
assert.match(credits, /<h4>套餐建议<\/h4>/);
|
||||
assert.match(credits, /packageRecommendation\.summary/);
|
||||
assert.match(credits, /剩余 \${escapeHtml\(formatNumber\(forecast\.remainingBudgetCents \/ 100\)\)} 元/);
|
||||
|
||||
Reference in New Issue
Block a user