Add defaultLocale, EN names, and dashboard activity endpoints.

Expose branding.defaultLocale, optional user EN name fields, and lightweight dual daily activity for orders/customers; update project context and rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-01 09:35:27 +03:30
co-authored by Cursor
parent 4598add88c
commit 43e3912662
22 changed files with 331 additions and 15 deletions
+10 -1
View File
@@ -23,6 +23,10 @@ import { LegacyMigrateService } from './legacy-migrate.service';
import { LegacyPurgeService } from './legacy-purge.service';
import { normalizeBusinessPrimaryColorId } from '../business-settings/business-primary-colors';
import type { BusinessPrimaryColorId } from '../business-settings/business-primary-colors';
import {
normalizeDashboardLocale,
} from '../business-settings/business-settings.util';
import type { DashboardLocale } from '../business-settings/business-settings.types';
type BusinessRow = {
id: bigint;
@@ -40,6 +44,7 @@ type BusinessRow = {
ownerName: string | null;
ownerCellNumber: string | null;
primaryColor: string | null;
defaultLocale: string | null;
};
function slugify(value: string) {
@@ -113,7 +118,8 @@ export class BusinessAdminService {
own."ownerUserId" AS "ownerUserId",
own."ownerName" AS "ownerName",
own."ownerCellNumber" AS "ownerCellNumber",
b.settings->'branding'->>'primaryColor' AS "primaryColor"
b.settings->'branding'->>'primaryColor' AS "primaryColor",
b.settings->'branding'->>'defaultLocale' AS "defaultLocale"
FROM businesses b
LEFT JOIN LATERAL (
SELECT d.id, d.host, d.ssl_enabled
@@ -149,6 +155,9 @@ export class BusinessAdminService {
primaryColor: normalizeBusinessPrimaryColorId(
item.primaryColor,
) as BusinessPrimaryColorId,
defaultLocale: normalizeDashboardLocale(
item.defaultLocale,
) as DashboardLocale,
})),
total: totalRow[0]?.total ?? 0,
page,