Add customer and business user-product flows across dashboards.
Ship my-products / customer-products UI with gallery uploads, status controls, module gating, and related shared UI polish. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
c5bdaad16b
commit
1271d96539
@@ -4,9 +4,12 @@ import type { BusinessModuleId, HomeChartId } from '../utils/businessModules'
|
||||
|
||||
export type DashboardLocale = 'en' | 'fa'
|
||||
|
||||
export type DashboardThemeMode = 'light' | 'dark'
|
||||
|
||||
export interface BrandingSettings {
|
||||
primaryColor: BusinessPrimaryColorId
|
||||
defaultLocale: DashboardLocale
|
||||
themeMode: DashboardThemeMode
|
||||
}
|
||||
|
||||
export interface ModulesSettings {
|
||||
@@ -52,6 +55,19 @@ export async function updateBusinessPrimaryColor(
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateBusinessThemeMode(
|
||||
businessId: string,
|
||||
themeMode: DashboardThemeMode,
|
||||
) {
|
||||
return apiRequest<BusinessSettingsResponse>(`/businesses/${businessId}/settings`, {
|
||||
method: 'PATCH',
|
||||
auth: true,
|
||||
body: {
|
||||
branding: { themeMode },
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateBusinessDefaultLocale(
|
||||
businessId: string,
|
||||
defaultLocale: DashboardLocale,
|
||||
|
||||
Reference in New Issue
Block a user