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:
co-authored by
Cursor
parent
7b2ed7c7b0
commit
a412cb82fc
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user