Show contract renewal in businesses and align SSL/view charts.

Add annual renewal column with color-coded days left, owner title and renewal fields on create, SSL expiry display, and updated view chart kinds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-26 10:13:06 +03:30
co-authored by Cursor
parent a52f963f52
commit e2fb08cccd
11 changed files with 243 additions and 27 deletions
@@ -30,7 +30,7 @@ const VIEW_CHART_CONFIG: Record<
}
> = {
product_views_30d: {
kind: 'product',
kind: 'product_detail',
titleKey: 'home.chart.productViews.title',
subtitleKey: 'home.chart.productViews.subtitle',
legendKey: 'home.chart.productViews.legend',
@@ -39,7 +39,7 @@ const VIEW_CHART_CONFIG: Record<
barKey: 'home.chart.productViews.bar',
},
website_views_30d: {
kind: 'website',
kind: 'home',
titleKey: 'home.chart.websiteViews.title',
subtitleKey: 'home.chart.websiteViews.subtitle',
legendKey: 'home.chart.websiteViews.legend',
@@ -48,7 +48,7 @@ const VIEW_CHART_CONFIG: Record<
barKey: 'home.chart.websiteViews.bar',
},
portfolio_views_30d: {
kind: 'portfolio',
kind: 'portfolio_detail',
titleKey: 'home.chart.portfolioViews.title',
subtitleKey: 'home.chart.portfolioViews.subtitle',
legendKey: 'home.chart.portfolioViews.legend',
@@ -57,7 +57,7 @@ const VIEW_CHART_CONFIG: Record<
barKey: 'home.chart.portfolioViews.bar',
},
blog_views_30d: {
kind: 'blog',
kind: 'blog_detail',
titleKey: 'home.chart.blogViews.title',
subtitleKey: 'home.chart.blogViews.subtitle',
legendKey: 'home.chart.blogViews.legend',
+2 -2
View File
@@ -196,7 +196,7 @@ const en = {
'home.welcome': 'Welcome back, {name}!',
'home.welcomeFallback': 'there',
'home.subtitle': "Here's what's happening with your store today.",
'home.subtitle': 'Track your business status from here.',
'home.card.products.title': 'Products',
'home.card.products.desc': 'Manage your products, inventory and categories.',
'home.card.products.link': 'View products',
@@ -2455,7 +2455,7 @@ const fa: Record<MessageKey, string> = {
'home.welcome': '{name} عزیز، خوش آمدی.',
'home.welcomeFallback': 'کاربر',
'home.subtitle': 'وضعیت فروشگاهتان را از اینجا دنبال کنید.',
'home.subtitle': 'وضعیت مجموعه‌ی خود را از اینجا دنبال کنید.',
'home.card.products.title': 'محصولات',
'home.card.products.desc': 'محصولات، موجودی و دسته‌بندی‌ها را مدیریت کنید.',
'home.card.products.link': 'مشاهده محصولات',
@@ -40,7 +40,23 @@ export async function getCustomersDailyActivity(days = 30, signal?: AbortSignal)
)
}
export type WebsiteViewKind = 'website' | 'product' | 'portfolio' | 'blog'
export type WebsiteViewKind =
| 'home'
| 'portfolio_list'
| 'portfolio_detail'
| 'product_list'
| 'product_detail'
| 'store_item_list'
| 'store_item_detail'
| 'blog_list'
| 'blog_detail'
| 'video_list'
| 'video_detail'
/** @deprecated aliases still accepted by API */
| 'website'
| 'product'
| 'portfolio'
| 'blog'
export async function getViewDailyActivity(
kind: WebsiteViewKind,