feat: add DISC profiles and a sales copilot as an org module

Help reps capture a customer's likely behavior style and get negotiation guidance, with the feature gated from super admin.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-18 21:04:26 +03:30
co-authored by Cursor
parent 96befd3867
commit 002f697dfe
27 changed files with 2838 additions and 26 deletions
+13 -2
View File
@@ -157,7 +157,8 @@ export type OrgModuleKey =
| "routines"
| "gamification"
| "prior_data_archive"
| "treasury";
| "treasury"
| "behavior";
export const ORG_MODULE_KEYS: OrgModuleKey[] = [
"customers",
@@ -200,6 +201,7 @@ export const ORG_MODULE_KEYS: OrgModuleKey[] = [
"gamification",
"prior_data_archive",
"treasury",
"behavior",
];
export const ORG_MODULE_LABELS: Record<OrgModuleKey, string> = {
@@ -243,6 +245,7 @@ export const ORG_MODULE_LABELS: Record<OrgModuleKey, string> = {
gamification: "باشگاه امتیازات",
prior_data_archive: "بایگانی اطلاعات قبل",
treasury: "مدیریت مالی",
behavior: "شخصیت‌شناسی و دستیار فروش",
};
export const ORG_MODULE_GROUPS: Array<{
@@ -255,6 +258,7 @@ export const ORG_MODULE_GROUPS: Array<{
title: "فروش",
keys: [
"pipeline",
"behavior",
"products",
"invoices",
"quotes",
@@ -442,7 +446,8 @@ export type RolePermissionKey =
| "conversations"
| "conversations_groups"
| "treasury"
| "treasury_payroll";
| "treasury_payroll"
| "behavior";
export const ROLE_PERMISSION_ITEMS: Array<{
key: RolePermissionKey;
@@ -460,6 +465,7 @@ export const ROLE_PERMISSION_ITEMS: Array<{
{ key: "conversations_groups", label: "ساخت گروه گفتگو" },
{ key: "treasury", label: "مدیریت مالی" },
{ key: "treasury_payroll", label: "حقوق و دستمزد" },
{ key: "behavior", label: "شخصیت‌شناسی و دستیار فروش" },
];
export interface OrgRoleMemberDto {
@@ -904,6 +910,10 @@ export interface PersonDto {
customFields: Record<string, unknown>;
loyaltyPoints: number;
loyaltyTier: LoyaltyTierSummaryDto | null;
/** تیپ غالب یا ترکیبی تأییدشده؛ بدون مجوز رفتار خالی برمی‌گردد */
discLabel: string | null;
discReliable: boolean;
discAssessedAt: string | null;
company: CompanySummaryDto | null;
owner: UserSummaryDto | null;
createdAt: string;
@@ -5725,3 +5735,4 @@ export interface TreasuryDashboardDto {
/* ───────── باشگاه امتیازات (گیمیفیکیشن کارکنان) ───────── */
export * from "./gamification";
export * from "./behavior";