Improve dashboard charts, category tree selects, and product AI name fill.

Fix RTL chart ordering with Y-axis and hover values; aggregate website views; refine category picker tree borders and spacing; add one-click FA→EN name translation on add product.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-28 20:39:43 +03:30
co-authored by Cursor
parent 7b2ed7c7b0
commit a412cb82fc
31 changed files with 1222 additions and 226 deletions
@@ -4,7 +4,8 @@ import type { ProductApi } from './productService'
export type ProductAiLanguage = 'en' | 'fa'
export type ProductAiFillField = 'summary' | 'description'
export type ProductAiFillField = 'summary' | 'description' | 'nameEn'
export type ProductAiPromptField = Extract<ProductAiFillField, 'summary' | 'description'>
export interface CreateProductByAiPayload {
categoryId: string
@@ -14,7 +15,7 @@ export interface CreateProductByAiPayload {
export interface FillProductFieldByAiPayload {
field: ProductAiFillField
prompt: string
prompt?: string
title?: string
nameFa?: string
categoryId?: string
@@ -45,6 +46,7 @@ export async function fillProductFieldByAi(payload: FillProductFieldByAiPayload)
return apiRequest<
| { field: 'summary'; text: string }
| { field: 'description'; html: string }
| { field: 'nameEn'; text: string }
>(`/businesses/${businessId}/products/ai-fill`, {
method: 'POST',
auth: true,