1
This commit is contained in:
@@ -1,81 +0,0 @@
|
|||||||
# Plan Limits Comparison Table
|
|
||||||
|
|
||||||
## Accounts
|
|
||||||
1. **dev@igny8.com** (Developer Account)
|
|
||||||
2. **scale@igny8.com** (Scale Account)
|
|
||||||
|
|
||||||
## Complete Limit Comparison Table
|
|
||||||
|
|
||||||
| Limit Category | Limit Name | dev@igny8.com | scale@igny8.com | Notes |
|
|
||||||
|----------------|-------------|---------------|-----------------|-------|
|
|
||||||
| **GENERAL LIMITS** | | | | |
|
|
||||||
| | Max Users | TBD | TBD | Total users allowed per account |
|
|
||||||
| | Max Sites | TBD | TBD | Maximum number of sites allowed |
|
|
||||||
| **PLANNER LIMITS** | | | | |
|
|
||||||
| | Max Keywords | TBD | TBD | Total keywords allowed (global limit) |
|
|
||||||
| | Max Clusters | TBD | TBD | Total clusters allowed (global) |
|
|
||||||
| | Max Content Ideas | TBD | TBD | Total content ideas allowed (global limit) |
|
|
||||||
| | Daily Cluster Limit | TBD | TBD | Max clusters that can be created per day |
|
|
||||||
| **WRITER LIMITS** | | | | |
|
|
||||||
| | Monthly Word Count Limit | TBD | TBD | Monthly word limit (for generated content) |
|
|
||||||
| | Daily Content Tasks | TBD | TBD | Max number of content tasks (blogs) per day |
|
|
||||||
| **IMAGE LIMITS** | | | | |
|
|
||||||
| | Monthly Image Count | TBD | TBD | Max images per month |
|
|
||||||
| | Daily Image Generation Limit | TBD | TBD | Max images that can be generated per day |
|
|
||||||
| **AI CREDITS** | | | | |
|
|
||||||
| | Monthly AI Credit Limit | TBD | TBD | Unified credit ceiling per month (all AI functions) |
|
|
||||||
| | Monthly Cluster AI Credits | TBD | TBD | AI credits allocated for clustering |
|
|
||||||
| | Monthly Content AI Credits | TBD | TBD | AI credit pool for content generation |
|
|
||||||
| | Monthly Image AI Credits | TBD | TBD | AI credit pool for image generation |
|
|
||||||
| | Credits Per Month (Effective) | TBD | TBD | Effective credits (included_credits or credits_per_month) |
|
|
||||||
|
|
||||||
## Current Status from Images
|
|
||||||
|
|
||||||
### Image 1 (dev@igny8.com):
|
|
||||||
- **Page Title**: "Usage" ✓ (Changed successfully)
|
|
||||||
- **Debug Info**: `Loading=No, Limits=0, Planner=0, Writer=0, Images=0, AI=0, General=0`
|
|
||||||
- **Error Message**: "No usage limits data available"
|
|
||||||
- **Status**: API endpoint not returning data or account has no plan assigned
|
|
||||||
|
|
||||||
### Image 2 (scale@igny8.com):
|
|
||||||
- **Page Title**: "Usage" ✓ (Changed successfully)
|
|
||||||
- **Debug Info**: `Loading=No, Limits=0, Planner=0, Writer=0, Images=0, AI=0, General=0`
|
|
||||||
- **Error Message**: "No usage limits data available"
|
|
||||||
- **Status**: API endpoint not returning data or account has no plan assigned
|
|
||||||
|
|
||||||
## Issue Identified
|
|
||||||
|
|
||||||
Both accounts show `Limits=0`, which means:
|
|
||||||
1. The API endpoint `/v1/billing/credits/usage/limits/` is being called
|
|
||||||
2. But it's returning an empty array `[]` or the accounts don't have plans
|
|
||||||
3. The frontend correctly shows the error message when no data is available
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
To get the actual limit values, we need to:
|
|
||||||
1. Check if accounts have plans assigned in the database
|
|
||||||
2. If plans exist, verify the API endpoint is correctly querying and returning the data
|
|
||||||
3. If no plans exist, assign plans to the accounts
|
|
||||||
|
|
||||||
## API Endpoint Details
|
|
||||||
|
|
||||||
- **URL**: `/v1/billing/credits/usage/limits/`
|
|
||||||
- **Method**: GET
|
|
||||||
- **Authentication**: Required (JWT or Session)
|
|
||||||
- **Response Format**:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"limits": [
|
|
||||||
{
|
|
||||||
"title": "Keywords",
|
|
||||||
"limit": 1000,
|
|
||||||
"used": 0,
|
|
||||||
"available": 1000,
|
|
||||||
"unit": "keywords",
|
|
||||||
"category": "planner",
|
|
||||||
"percentage": 0.0
|
|
||||||
},
|
|
||||||
...
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
@@ -48,23 +48,6 @@ export default function Usage() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCategoryColor = (category: string) => {
|
|
||||||
switch (category) {
|
|
||||||
case 'planner': return 'blue';
|
|
||||||
case 'writer': return 'green';
|
|
||||||
case 'images': return 'purple';
|
|
||||||
case 'ai': return 'orange';
|
|
||||||
case 'general': return 'gray';
|
|
||||||
default: return 'gray';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getUsageStatus = (percentage: number) => {
|
|
||||||
if (percentage >= 90) return 'danger';
|
|
||||||
if (percentage >= 75) return 'warning';
|
|
||||||
return 'success';
|
|
||||||
};
|
|
||||||
|
|
||||||
const groupedLimits = {
|
const groupedLimits = {
|
||||||
planner: limits.filter(l => l.category === 'planner'),
|
planner: limits.filter(l => l.category === 'planner'),
|
||||||
writer: limits.filter(l => l.category === 'writer'),
|
writer: limits.filter(l => l.category === 'writer'),
|
||||||
@@ -87,14 +70,14 @@ export default function Usage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-6">
|
<div className="p-6">
|
||||||
<PageMeta title="Usage" />
|
<PageMeta title="Usage" description="Monitor your plan limits and usage statistics" />
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Acoount Limits & Usage</h1>
|
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Acoount Limits & Usage</h1>
|
||||||
<p className="text-gray-600 dark:text-gray-400 mt-1">Monitor your plan limits and usage statistics</p>
|
<p className="text-gray-600 dark:text-gray-400 mt-1">Monitor your plan limits and usage statistics</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Debug Info - Remove in production */}
|
{/* Debug Info - Remove in production */}
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{import.meta.env.DEV && (
|
||||||
<Card className="p-4 mb-4 bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800">
|
<Card className="p-4 mb-4 bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800">
|
||||||
<div className="text-xs text-gray-600 dark:text-gray-400">
|
<div className="text-xs text-gray-600 dark:text-gray-400">
|
||||||
<strong>Debug:</strong> Loading={limitsLoading ? 'Yes' : 'No'}, Limits={limits.length},
|
<strong>Debug:</strong> Loading={limitsLoading ? 'Yes' : 'No'}, Limits={limits.length},
|
||||||
|
|||||||
Reference in New Issue
Block a user