Fix web build failure from corrupted Tahesab status types.

Restore MandehValueDto status encoding and derive بس/بد labels from amount.
This commit is contained in:
2026-09-27 21:26:56 +03:30
parent 647503810d
commit 7e73ba9936
2 changed files with 246 additions and 245 deletions
@@ -555,7 +555,7 @@ onMounted(async () => {
{{ formatMandehAmount(v.amount, v.unit) }} {{ formatMandehAmount(v.amount, v.unit) }}
</span> </span>
<span class="unit">{{ v.unit }}</span> <span class="unit">{{ v.unit }}</span>
<span class="st">{{ v.status === 'بس' ? 'بد' : 'بس' }}</span> <span class="st">{{ Number(v.amount) >= 0 ? 'بد' : 'بس' }}</span>
<span v-if="vi < item.values.length - 1" class="sep">|</span> <span v-if="vi < item.values.length - 1" class="sep">|</span>
</template> </template>
</div> </div>
+245 -244
View File
@@ -3,13 +3,13 @@ export type UserRole = "owner" | "admin" | "sales" | "support";
export const USER_ROLES: UserRole[] = ["owner", "admin", "sales", "support"]; export const USER_ROLES: UserRole[] = ["owner", "admin", "sales", "support"];
export const USER_ROLE_LABELS: Record<UserRole, string> = { export const USER_ROLE_LABELS: Record<UserRole, string> = {
owner: "مالک", owner: "مالک",
admin: "مدیر", admin: "مدیر",
sales: "فروش", sales: "فروش",
support: "پشتیبانی", support: "پشتیبانی",
}; };
/** تنظیمات سازمانی و مدیریت کاربران */ /** تنظیمات سازمانی و مدیریت کاربران */
export function canManageSettings(role: UserRole | string | null | undefined): boolean { export function canManageSettings(role: UserRole | string | null | undefined): boolean {
return role === "owner" || role === "admin"; return role === "owner" || role === "admin";
} }
@@ -18,12 +18,12 @@ export function canManageUsers(role: UserRole | string | null | undefined): bool
return role === "owner" || role === "admin"; return role === "owner" || role === "admin";
} }
/** مشاهده همه پرونده‌های سازمان (نه فقط مالکیت خود) */ /** مشاهده همه پرونده‌های سازمان (نه فقط مالکیت خود) */
export function canViewAllRecords(role: UserRole | string | null | undefined): boolean { export function canViewAllRecords(role: UserRole | string | null | undefined): boolean {
return role === "owner" || role === "admin"; return role === "owner" || role === "admin";
} }
/** تغییر مالک پرونده */ /** تغییر مالک پرونده */
export function canReassignRecords(role: UserRole | string | null | undefined): boolean { export function canReassignRecords(role: UserRole | string | null | undefined): boolean {
return role === "owner" || role === "admin"; return role === "owner" || role === "admin";
} }
@@ -37,10 +37,10 @@ export interface AuthUserDto {
organizationId: string; organizationId: string;
organizationName?: string; organizationName?: string;
hasAvatar?: boolean; hasAvatar?: boolean;
/** مالک محیط فعلی — اشتراک متعلق به مالک است نه عضو زیرمجموعه */ /** مالک محیط فعلی — اشتراک متعلق به مالک است نه عضو زیرمجموعه */
isOrgOwner?: boolean; isOrgOwner?: boolean;
enabledModules?: OrgModuleKey[]; enabledModules?: OrgModuleKey[];
/** خلاصه اشتراک مالک محیط (برای اعضا فقط جهت نمایش/گیت ورود) */ /** خلاصه اشتراک مالک محیط (برای اعضا فقط جهت نمایش/گیت ورود) */
subscription?: SubscriptionSummaryDto | null; subscription?: SubscriptionSummaryDto | null;
} }
@@ -64,15 +64,15 @@ export const BILLING_PLAN_CODES: BillingPlanCode[] = [
]; ];
export const BILLING_PLAN_LABELS: Record<BillingPlanCode, string> = { export const BILLING_PLAN_LABELS: Record<BillingPlanCode, string> = {
trial: "دمو ۱۵ روزه", trial: "دمو Û±Ûµ روزه",
monthly: "ماهانه", monthly: "ماهانه",
quarterly: "سه‌ماهه", quarterly: "سه‌ماهه",
semiannual: "شش‌ماهه", semiannual: "شش‌ماهه",
yearly: "یکساله", yearly: "یکساله",
custom: "سفارشی", custom: "سفارشی",
}; };
/** مدت پیش‌فرض پلن‌ها (روز) — custom ندارد */ /** مدت پیش‌فرض پلن‌ها (روز) — custom ندارد */
export const BILLING_PLAN_DAYS: Record<Exclude<BillingPlanCode, "custom">, number> = { export const BILLING_PLAN_DAYS: Record<Exclude<BillingPlanCode, "custom">, number> = {
trial: 15, trial: 15,
monthly: 30, monthly: 30,
@@ -164,49 +164,49 @@ export const ORG_MODULE_KEYS: OrgModuleKey[] = [
]; ];
export const ORG_MODULE_LABELS: Record<OrgModuleKey, string> = { export const ORG_MODULE_LABELS: Record<OrgModuleKey, string> = {
customers: "مشتریان", customers: "مشتریان",
pipeline: "کاریز فروش", pipeline: "کاریز فروش",
products: "محصولات", products: "محصولات",
invoices: "فاکتورها", invoices: "فاکتورها",
quotes: "پیش‌فاکتورها", quotes: "پیش‌فاکتورها",
commissions: "پورسانت", commissions: "پورسانت",
sales_forecast: "هدف و پیش‌بینی", sales_forecast: "هدف و پیش‌بینی",
activities: "فعالیت‌ها", activities: "فعالیت‌ها",
tickets: "تیکت‌ها", tickets: "تیکت‌ها",
workflow_automations: "اتوماسیون گردش کار", workflow_automations: "اتوماسیون گردش کار",
message_automations: "اتوماسیون پیامک", message_automations: "اتوماسیون پیامک",
lead_forms: "فرم‌ساز سرنخ", lead_forms: "فرم‌ساز سرنخ",
leads: "مدیریت لیدها", leads: "مدیریت لیدها",
project_boards: "کاریز پروژه", project_boards: "کاریز پروژه",
inventory: "انبار", inventory: "انبار",
cheques: "چک‌ها", cheques: "چک‌ها",
attachments: "پیوست‌ها", attachments: "پیوست‌ها",
loyalty: "باشگاه مشتریان", loyalty: "باشگاه مشتریان",
reports: "گزارش‌ها", reports: "گزارش‌ها",
notes: "یادداشت‌ها", notes: "یادداشت‌ها",
tahesab: "ته‌حساب", tahesab: "ته‌حساب",
custom_fields: "فیلدهای سفارشی", custom_fields: "فیلدهای سفارشی",
currencies: "ارزها", currencies: "ارزها",
team_settings: "تیم و تنظیمات سازمان", team_settings: "تیم و تنظیمات سازمان",
faq: "FAQ", faq: "FAQ",
audit_logs: "لاگ فعالیت کاربران", audit_logs: "لاگ فعالیت کاربران",
saved_views: "فیلترهای ذخیره‌شده", saved_views: "فیلترهای ذخیره‌شده",
public_api: "API و وب‌هوک", public_api: "API و وب‌هوک",
sms_campaigns: "پیامک گروهی", sms_campaigns: "پیامک گروهی",
teams: "تیم‌ها و سطح دسترسی به پرونده‌ها", teams: "تیم‌ها و سطح دسترسی به پرونده‌ها",
woocommerce: "ووکامرس", woocommerce: "ووکامرس",
voip: "تلفن سازمانی", voip: "تلفن سازمانی",
reservations: "رزرو و نوبت‌دهی", reservations: "رزرو و نوبت‌دهی",
}; };
export const ORG_MODULE_GROUPS: Array<{ export const ORG_MODULE_GROUPS: Array<{
title: string; title: string;
keys: OrgModuleKey[]; keys: OrgModuleKey[];
}> = [ }> = [
{ title: "مشتریان", keys: ["customers"] }, { title: "مشتریان", keys: ["customers"] },
{ title: "لیدها", keys: ["leads", "lead_forms"] }, { title: "لیدها", keys: ["leads", "lead_forms"] },
{ {
title: "فروش", title: "فروش",
keys: [ keys: [
"pipeline", "pipeline",
"products", "products",
@@ -216,10 +216,10 @@ export const ORG_MODULE_GROUPS: Array<{
"sales_forecast", "sales_forecast",
], ],
}, },
{ title: "فعالیت‌ها", keys: ["activities", "notes"] }, { title: "فعالیت‌ها", keys: ["activities", "notes"] },
{ title: "پشتیبانی", keys: ["tickets", "faq"] }, { title: "پشتیبانی", keys: ["tickets", "faq"] },
{ {
title: "اتوماسیون", title: "اتوماسیون",
keys: [ keys: [
"workflow_automations", "workflow_automations",
"message_automations", "message_automations",
@@ -227,7 +227,7 @@ export const ORG_MODULE_GROUPS: Array<{
], ],
}, },
{ {
title: "ابزارها", title: "ابزارها",
keys: [ keys: [
"project_boards", "project_boards",
"inventory", "inventory",
@@ -242,7 +242,7 @@ export const ORG_MODULE_GROUPS: Array<{
], ],
}, },
{ {
title: "تنظیمات", title: "تنظیمات",
keys: [ keys: [
"team_settings", "team_settings",
"teams", "teams",
@@ -312,7 +312,7 @@ export interface OrgUserDto {
lastLoginAt?: string | null; lastLoginAt?: string | null;
hasAvatar?: boolean; hasAvatar?: boolean;
commissionPercent?: number; commissionPercent?: number;
/** own = فقط خود | team = هم‌تیمی‌ها | org = کل سازمان */ /** own = فقط خود | team = هم‌تیمی‌ها | org = کل سازمان */
dataVisibility?: DataVisibility; dataVisibility?: DataVisibility;
createdAt: string; createdAt: string;
} }
@@ -322,9 +322,9 @@ export type DataVisibility = "own" | "team" | "org";
export const DATA_VISIBILITIES: DataVisibility[] = ["own", "team", "org"]; export const DATA_VISIBILITIES: DataVisibility[] = ["own", "team", "org"];
export const DATA_VISIBILITY_LABELS: Record<DataVisibility, string> = { export const DATA_VISIBILITY_LABELS: Record<DataVisibility, string> = {
own: "فقط پرونده‌های خود", own: "فقط پرونده‌های خود",
team: "تیم‌های عضو", team: "تیم‌های عضو",
org: "کل سازمان", org: "کل سازمان",
}; };
export interface UpdateUserVisibilityRequest { export interface UpdateUserVisibilityRequest {
@@ -345,14 +345,14 @@ export const ROLE_PERMISSION_ITEMS: Array<{
key: RolePermissionKey; key: RolePermissionKey;
label: string; label: string;
}> = [ }> = [
{ key: "customers", label: "مشتریان" }, { key: "customers", label: "مشتریان" },
{ key: "sales", label: "فروش و معاملات" }, { key: "sales", label: "فروش و معاملات" },
{ key: "billing", label: "پیش‌فاکتورها و فاکتورها" }, { key: "billing", label: "پیش‌فاکتورها و فاکتورها" },
{ key: "products", label: "محصولات و خدمات" }, { key: "products", label: "محصولات و خدمات" },
{ key: "activities", label: "فعالیت‌ها" }, { key: "activities", label: "فعالیت‌ها" },
{ key: "notes", label: "یادداشت‌ها" }, { key: "notes", label: "یادداشت‌ها" },
{ key: "reports", label: "گزارش‌ها" }, { key: "reports", label: "گزارش‌ها" },
{ key: "audit", label: "لاگ فعالیت کاربران" }, { key: "audit", label: "لاگ فعالیت کاربران" },
]; ];
export interface OrgRoleMemberDto { export interface OrgRoleMemberDto {
@@ -422,7 +422,7 @@ export interface ApiErrorBody {
} }
export interface LoginRequest { export interface LoginRequest {
/** ایمیل یا شماره موبایل */ /** ایمیل یا شماره موبایل */
identifier: string; identifier: string;
password: string; password: string;
} }
@@ -444,7 +444,7 @@ export interface LoginChallengeResponse {
channel: 'email' | 'mobile'; channel: 'email' | 'mobile';
expiresInSeconds: number; expiresInSeconds: number;
maskedDestination?: string; maskedDestination?: string;
/** فقط در محیط توسعه / AUTH_RETURN_OTP */ /** فقط در محیط توسعه / AUTH_RETURN_OTP */
devCode?: string; devCode?: string;
} }
@@ -453,7 +453,7 @@ export interface RegisterChallengeResponse {
expiresInSeconds: number; expiresInSeconds: number;
maskedEmail?: string; maskedEmail?: string;
maskedMobile?: string; maskedMobile?: string;
/** وقتی سرویس ایمیل خاموش است false — فقط OTP موبایل لازم است */ /** وقتی سرویس ایمیل خاموش است false — فقط OTP موبایل لازم است */
emailOtpRequired?: boolean; emailOtpRequired?: boolean;
devEmailCode?: string; devEmailCode?: string;
devMobileCode?: string; devMobileCode?: string;
@@ -531,7 +531,7 @@ export interface UpdateOrganizationRequest {
businessField?: BusinessField; businessField?: BusinessField;
} }
/** زمینه فعالیت سازمان — هم‌تراز صنایع دیدار */ /** زمینه فعالیت سازمان — هم‌تراز صنایع دیدار */
export const BUSINESS_FIELDS = [ export const BUSINESS_FIELDS = [
"education", "education",
"beauty", "beauty",
@@ -558,26 +558,26 @@ export const BUSINESS_FIELDS = [
export type BusinessField = (typeof BUSINESS_FIELDS)[number]; export type BusinessField = (typeof BUSINESS_FIELDS)[number];
export const BUSINESS_FIELD_LABELS: Record<BusinessField, string> = { export const BUSINESS_FIELD_LABELS: Record<BusinessField, string> = {
education: "آموزشگاه و مؤسسات آموزشی", education: "آموزشگاه و مؤسسات آموزشی",
beauty: "کلینیک زیبایی و آرایشگاه", beauty: "کلینیک زیبایی و آرایشگاه",
real_estate: "املاک و مشاورین مسکن", real_estate: "املاک و مشاورین مسکن",
construction: "صنعت ساختمان", construction: "صنعت ساختمان",
advertising: "تبلیغات و مشاوره کسب‌وکار", advertising: "تبلیغات و مشاوره کسب‌وکار",
insurance: "بیمه", insurance: "بیمه",
consulting: "شرکت‌های مشاور", consulting: "شرکت‌های مشاور",
startup: "استارتاپ و کسب‌وکار آنلاین", startup: "استارتاپ و کسب‌وکار آنلاین",
medical_devices: "تجهیزات پزشکی", medical_devices: "تجهیزات پزشکی",
travel: "گردشگری و مهاجرت", travel: "گردشگری و مهاجرت",
contractor: "پیمانکاری و پروژه‌ای", contractor: "پیمانکاری و پروژه‌ای",
trading: "بازرگانی", trading: "بازرگانی",
manufacturing: "تولیدی و صنعتی", manufacturing: "تولیدی و صنعتی",
personal: "کسب‌وکار شخصی و خانگی", personal: "کسب‌وکار شخصی و خانگی",
tech: "نرم‌افزار و سخت‌افزار", tech: "نرم‌افزار و سخت‌افزار",
legal: "وکلا و مشاورین حقوقی", legal: "وکلا و مشاورین حقوقی",
repair: "خدمات و تعمیرات", repair: "خدمات و تعمیرات",
retail: "خرده‌فروشی", retail: "خرده‌فروشی",
jewelry: "طلا و جواهر", jewelry: "طلا و جواهر",
other: "سایر", other: "سایر",
}; };
export function isBusinessField(value: string): value is BusinessField { export function isBusinessField(value: string): value is BusinessField {
@@ -593,7 +593,7 @@ export interface ExchangeRateDto {
export interface UpdateOrgCurrenciesRequest { export interface UpdateOrgCurrenciesRequest {
baseCurrency?: string; baseCurrency?: string;
enabledCurrencies?: string[]; enabledCurrencies?: string[];
/** نرخ‌ها نسبت به ارز پایه؛ ارز پایه نیازی به نرخ ندارد */ /** نرخ‌ها نسبت به ارز پایه؛ ارز پایه نیازی به نرخ ندارد */
rates?: Array<{ currency: string; rateToBase: number }>; rates?: Array<{ currency: string; rateToBase: number }>;
} }
@@ -602,12 +602,12 @@ export const CURRENCY_CATALOG: Array<{
labelFa: string; labelFa: string;
suffix: string; suffix: string;
}> = [ }> = [
{ code: "IRR", labelFa: "ریال ایران", suffix: "ریال" }, { code: "IRR", labelFa: "ریال ایران", suffix: "ریال" },
{ code: "USD", labelFa: "دلار آمریکا", suffix: "دلار" }, { code: "USD", labelFa: "دلار آمریکا", suffix: "دلار" },
{ code: "EUR", labelFa: "یورو", suffix: "یورو" }, { code: "EUR", labelFa: "یورو", suffix: "یورو" },
{ code: "AED", labelFa: "درهم امارات", suffix: "درهم" }, { code: "AED", labelFa: "درهم امارات", suffix: "درهم" },
{ code: "TRY", labelFa: "لیر ترکیه", suffix: "لیر" }, { code: "TRY", labelFa: "لیر ترکیه", suffix: "لیر" },
{ code: "GBP", labelFa: "پوند انگلیس", suffix: "پوند" }, { code: "GBP", labelFa: "پوند انگلیس", suffix: "پوند" },
]; ];
export function currencySuffix(code: string): string { export function currencySuffix(code: string): string {
@@ -677,10 +677,10 @@ export const PERSON_MOODS = ["newcomer", "happy", "unhappy", "special"] as const
export type PersonMood = (typeof PERSON_MOODS)[number]; export type PersonMood = (typeof PERSON_MOODS)[number];
export const PERSON_MOOD_LABELS: Record<PersonMood, string> = { export const PERSON_MOOD_LABELS: Record<PersonMood, string> = {
newcomer: "مشتری تازه وارد", newcomer: "مشتری تازه وارد",
happy: "مشتری خوشحال", happy: "مشتری خوشحال",
unhappy: "مشتری ناراضی", unhappy: "مشتری ناراضی",
special: "مشتری خاص", special: "مشتری خاص",
}; };
export interface PersonDto { export interface PersonDto {
@@ -777,7 +777,7 @@ export interface DealDto {
person: PersonSummaryDto | null; person: PersonSummaryDto | null;
company: CompanySummaryDto | null; company: CompanySummaryDto | null;
owner: UserSummaryDto | null; owner: UserSummaryDto | null;
/** مسئولان مشترک معامله (علاوه بر مالک اصلی) */ /** مسئولان مشترک معامله (علاوه بر مالک اصلی) */
assignees: UserSummaryDto[]; assignees: UserSummaryDto[];
lineItems: DealLineItemDto[]; lineItems: DealLineItemDto[];
createdAt: string; createdAt: string;
@@ -849,7 +849,7 @@ export interface UpdateDealRequest {
lineItems?: DealLineItemInput[]; lineItems?: DealLineItemInput[];
} }
/** فیلتر ذخیره‌شدهٔ لیست اشخاص */ /** فیلتر ذخیره‌شدهٔ لیست اشخاص */
export interface PeopleViewFilters { export interface PeopleViewFilters {
q?: string; q?: string;
sort?: string; sort?: string;
@@ -857,7 +857,7 @@ export interface PeopleViewFilters {
page?: number; page?: number;
} }
/** فیلتر ذخیره‌شدهٔ کاریز / معاملات */ /** فیلتر ذخیره‌شدهٔ کاریز / معاملات */
export interface DealsViewFilters { export interface DealsViewFilters {
q?: string; q?: string;
amountMin?: string; amountMin?: string;
@@ -1014,7 +1014,7 @@ export interface NoteDto {
title: string | null; title: string | null;
body: string; body: string;
noteType: NoteType | string; noteType: NoteType | string;
/** team = تیمی | personal = فقط نویسنده */ /** team = تیمی | personal = فقط نویسنده */
visibility: NoteVisibility; visibility: NoteVisibility;
pinned: boolean; pinned: boolean;
color: string | null; color: string | null;
@@ -1029,7 +1029,7 @@ export interface NoteDto {
activity: { id: string; title: string } | null; activity: { id: string; title: string } | null;
author: UserSummaryDto | null; author: UserSummaryDto | null;
attachments: NoteAttachmentDto[]; attachments: NoteAttachmentDto[];
/** تعداد نسخه‌های قبلی (برای نمایش دکمه تاریخچه) */ /** تعداد نسخه‌های قبلی (برای نمایش دکمه تاریخچه) */
revisionCount?: number; revisionCount?: number;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
@@ -1040,8 +1040,8 @@ export type NoteVisibility = "team" | "personal";
export const NOTE_VISIBILITIES: NoteVisibility[] = ["team", "personal"]; export const NOTE_VISIBILITIES: NoteVisibility[] = ["team", "personal"];
export const NOTE_VISIBILITY_LABELS: Record<NoteVisibility, string> = { export const NOTE_VISIBILITY_LABELS: Record<NoteVisibility, string> = {
team: "تیمی", team: "تیمی",
personal: "شخصی (فقط من)", personal: "شخصی (فقط من)",
}; };
export interface NoteRevisionDto { export interface NoteRevisionDto {
@@ -1865,7 +1865,7 @@ export interface CreateSalesGoalRequest {
probability?: number | null; probability?: number | null;
currency?: string; currency?: string;
notes?: string; notes?: string;
/** فقط مالک/مدیر؛ در غیر این صورت هدف برای خود کاربر */ /** فقط مالک/مدیر؛ در غیر این صورت هدف برای خود کاربر */
userId?: string | null; userId?: string | null;
} }
@@ -1896,13 +1896,13 @@ export interface SalesForecastDto {
periodStart: string; periodStart: string;
periodEnd: string; periodEnd: string;
currency: string; currency: string;
/** مجموع اهداف هم‌پوشان با بازه */ /** مجموع اهداف هم‌پوشان با بازه */
targetAmount: number; targetAmount: number;
/** معاملات برنده‌شده در بازه */ /** معاملات برنده‌شده در بازه */
wonAmount: number; wonAmount: number;
/** معاملات باز فعلی */ /** معاملات باز فعلی */
openPipelineAmount: number; openPipelineAmount: number;
/** پیش‌بینی: تحقق + کاریز باز × میانگین احتمال */ /** پیش‌بینی: تحقق + کاریز باز × میانگین احتمال */
forecastAmount: number; forecastAmount: number;
progressPercent: number | null; progressPercent: number | null;
openDealsCount: number; openDealsCount: number;
@@ -1910,7 +1910,7 @@ export interface SalesForecastDto {
goals: SalesGoalDto[]; goals: SalesGoalDto[];
kpis: SalesForecastKpiDto[]; kpis: SalesForecastKpiDto[];
newCustomersCount: number; newCustomersCount: number;
/** معاملات ایجادشده در بازه */ /** معاملات ایجادشده در بازه */
newDealsCount: number; newDealsCount: number;
} }
@@ -2011,7 +2011,7 @@ export interface UpdateFaqArticleRequest {
position?: number; position?: number;
} }
/** ساعات مهلت پاسخ اول بر اساس اولویت */ /** ساعات مهلت پاسخ اول بر اساس اولویت */
export const TICKET_SLA_HOURS: Record<TicketPriority, number> = { export const TICKET_SLA_HOURS: Record<TicketPriority, number> = {
urgent: 4, urgent: 4,
high: 8, high: 8,
@@ -2019,7 +2019,7 @@ export const TICKET_SLA_HOURS: Record<TicketPriority, number> = {
low: 48, low: 48,
}; };
/* ——— پرتال مشتری (OTP) ——— */ /* ——— پرتال مشتری (OTP) ——— */
export interface PortalOrgInfoDto { export interface PortalOrgInfoDto {
name: string; name: string;
@@ -2032,7 +2032,7 @@ export interface PortalRequestOtpRequest {
export interface PortalRequestOtpResponse { export interface PortalRequestOtpResponse {
ok: true; ok: true;
/** فقط در حالت توسعه / دمو وقتی SMS واقعی وصل نیست */ /** فقط در حالت توسعه / دمو وقتی SMS واقعی وصل نیست */
devCode?: string; devCode?: string;
expiresInSeconds: number; expiresInSeconds: number;
} }
@@ -2089,7 +2089,7 @@ export interface PortalTicketDto {
updatedAt: string; updatedAt: string;
} }
/* ——— گزارشات و داشبورد ——— */ /* ——— گزارشات و داشبورد ——— */
export interface ReportsKpiDto { export interface ReportsKpiDto {
key: string; key: string;
@@ -2127,7 +2127,7 @@ export interface ReportsTeamRowDto {
activitiesDone: number; activitiesDone: number;
} }
/** گونه‌های drill-down گزارش عمیق (فاز ۱ BI) */ /** گونه‌های drill-down گزارش عمیق (فاز Û± BI) */
export type ReportsDrillKind = export type ReportsDrillKind =
| "stage_open" | "stage_open"
| "team_won" | "team_won"
@@ -2152,25 +2152,25 @@ export interface ReportsFunnelStageDto {
pipelineName: string; pipelineName: string;
count: number; count: number;
amount: number; amount: number;
/** درصد تبدیل نسبت به مرحله قبل همان کاریز؛ null برای اولین مرحله */ /** درصد تبدیل نسبت به مرحله قبل همان کاریز؛ null برای اولین مرحله */
conversionFromPrevPercent: number | null; conversionFromPrevPercent: number | null;
/** سهم از کل معاملات باز همان کاریز */ /** سهم از کل معاملات باز همان کاریز */
shareOfPipelinePercent: number; shareOfPipelinePercent: number;
} }
/** یک ردیف نرخ تبدیل (ورودی → موفق) مثل دیدار */ /** یک ردیف نرخ تبدیل (ورودی → موفق) مثل دیدار */
export interface ReportsConversionRateRowDto { export interface ReportsConversionRateRowDto {
key: string; key: string;
label: string; label: string;
incomingCount: number; incomingCount: number;
wonCount: number; wonCount: number;
/** درصد؛ اگر ورودی صفر باشد ۰ */ /** درصد؛ اگر ورودی صفر باشد Û° */
conversionPercent: number; conversionPercent: number;
} }
/** /**
* نرخ تبدیل به سبک دیدار: * نرخ تبدیل به سبک دیدار:
* از معاملات تازه‌ساخته‌شده در بازه، چند درصد الان برنده شده‌اند. * از معاملات تازه‌ساخته‌شده در بازه، چند درصد الان برنده شده‌اند.
*/ */
export interface ReportsConversionRateDto { export interface ReportsConversionRateDto {
incomingCount: number; incomingCount: number;
@@ -2192,7 +2192,7 @@ export interface ReportsPeriodCompareRowDto {
current: number; current: number;
previous: number; previous: number;
changePercent: number | null; changePercent: number | null;
/** اگر قابل کلیک برای لیست پرونده باشد */ /** اگر قابل کلیک برای لیست پرونده باشد */
drillKind?: ReportsDrillKind; drillKind?: ReportsDrillKind;
} }
@@ -2249,9 +2249,9 @@ export interface ReportsDashboardDto {
winRate: number; winRate: number;
}; };
funnel: ReportsFunnelStageDto[]; funnel: ReportsFunnelStageDto[];
/** نرخ تبدیل ورودی→موفق (سبک دیدار) */ /** نرخ تبدیل ورودی→موفق (سبک دیدار) */
conversionRate: ReportsConversionRateDto; conversionRate: ReportsConversionRateDto;
/** مقایسه صریح بازه فعلی با دوره قبل هم‌طول */ /** مقایسه صریح بازه فعلی با دوره قبل هم‌طول */
periodCompare: ReportsPeriodCompareRowDto[]; periodCompare: ReportsPeriodCompareRowDto[];
tickets: { tickets: {
open: number; open: number;
@@ -2309,7 +2309,7 @@ export interface HomeDashboardDto {
topCustomers: HomeDashboardTopCustomerDto[]; topCustomers: HomeDashboardTopCustomerDto[];
} }
/** برد پروژه / کاریز کارت */ /** برد پروژه / کاریز کارت */
export interface ProjectBoardStageDto { export interface ProjectBoardStageDto {
id: string; id: string;
name: string; name: string;
@@ -2373,7 +2373,7 @@ export interface MoveProjectCardRequest {
position?: number; position?: number;
} }
/** باشگاه مشتریان */ /** باشگاه مشتریان */
export interface LoyaltyTierDto { export interface LoyaltyTierDto {
id: string; id: string;
name: string; name: string;
@@ -2476,7 +2476,7 @@ export interface RedeemLoyaltyRewardRequest {
personId: string; personId: string;
} }
/** اتوماسیون اگر/آنگاه */ /** اتوماسیون اگر/آنگاه */
export type AutomationTrigger = export type AutomationTrigger =
| "person_created" | "person_created"
| "lead_submitted" | "lead_submitted"
@@ -2495,23 +2495,23 @@ export type AutomationAction =
| "add_loyalty_points"; | "add_loyalty_points";
export const AUTOMATION_TRIGGER_LABELS: Record<AutomationTrigger, string> = { export const AUTOMATION_TRIGGER_LABELS: Record<AutomationTrigger, string> = {
person_created: "مخاطب جدید ساخته شد", person_created: "مخاطب جدید ساخته شد",
lead_submitted: "فرم سرنخ ارسال شد", lead_submitted: "فرم سرنخ ارسال شد",
deal_created: "معامله جدید ساخته شد", deal_created: "معامله جدید ساخته شد",
deal_stage_changed: "مرحله معامله عوض شد", deal_stage_changed: "مرحله معامله عوض شد",
deal_won: "معامله برنده شد", deal_won: "معامله برنده شد",
deal_lost: "معامله باخت", deal_lost: "معامله باخت",
ticket_created: "تیکت جدید ساخته شد", ticket_created: "تیکت جدید ساخته شد",
ticket_resolved: "تیکت حل شد", ticket_resolved: "تیکت حل شد",
invoice_issued: "فاکتور صادر شد", invoice_issued: "فاکتور صادر شد",
invoice_paid: "پرداخت روی فاکتور ثبت شد", invoice_paid: "پرداخت روی فاکتور ثبت شد",
activity_done: "فعالیت تمام شد", activity_done: "فعالیت تمام شد",
}; };
export const AUTOMATION_ACTION_LABELS: Record<AutomationAction, string> = { export const AUTOMATION_ACTION_LABELS: Record<AutomationAction, string> = {
create_activity: "ساخت فعالیت", create_activity: "ساخت فعالیت",
create_notification: "ارسال اعلان", create_notification: "ارسال اعلان",
add_loyalty_points: "افزودن امتیاز باشگاه", add_loyalty_points: "افزودن امتیاز باشگاه",
}; };
export const MAX_AUTOMATION_STEPS = 8; export const MAX_AUTOMATION_STEPS = 8;
@@ -2540,14 +2540,14 @@ export const AUTOMATION_TRIGGER_GROUPS: {
label: string; label: string;
items: AutomationTrigger[]; items: AutomationTrigger[];
}[] = [ }[] = [
{ label: "مخاطب", items: ["person_created", "lead_submitted"] }, { label: "مخاطب", items: ["person_created", "lead_submitted"] },
{ {
label: "معامله", label: "معامله",
items: ["deal_created", "deal_stage_changed", "deal_won", "deal_lost"], items: ["deal_created", "deal_stage_changed", "deal_won", "deal_lost"],
}, },
{ label: "تیکت", items: ["ticket_created", "ticket_resolved"] }, { label: "تیکت", items: ["ticket_created", "ticket_resolved"] },
{ label: "فعالیت", items: ["activity_done"] }, { label: "فعالیت", items: ["activity_done"] },
{ label: "مالی", items: ["invoice_issued", "invoice_paid"] }, { label: "مالی", items: ["invoice_issued", "invoice_paid"] },
]; ];
export type AutomationStepKind = "action" | "condition"; export type AutomationStepKind = "action" | "condition";
@@ -2573,31 +2573,31 @@ export const AUTOMATION_CONDITION_FIELD_LABELS: Record<
AutomationConditionField, AutomationConditionField,
string string
> = { > = {
deal_amount: "مبلغ معامله", deal_amount: "مبلغ معامله",
has_person: "مخاطب دارد", has_person: "مخاطب دارد",
has_company: "شرکت دارد", has_company: "شرکت دارد",
ticket_priority: "اولویت تیکت", ticket_priority: "اولویت تیکت",
}; };
export const AUTOMATION_CONDITION_OP_LABELS: Record< export const AUTOMATION_CONDITION_OP_LABELS: Record<
AutomationConditionOp, AutomationConditionOp,
string string
> = { > = {
gte: "بزرگ‌تر یا مساوی", gte: "بزرگ‌تر یا مساوی",
lte: "کوچک‌تر یا مساوی", lte: "کوچک‌تر یا مساوی",
eq: "مساوی", eq: "مساوی",
neq: "نامساوی", neq: "نامساوی",
is_set: "دارد", is_set: "دارد",
is_empty: "ندارد", is_empty: "ندارد",
}; };
export const AUTOMATION_NOTIFY_CHANNEL_LABELS: Record< export const AUTOMATION_NOTIFY_CHANNEL_LABELS: Record<
AutomationNotifyChannel, AutomationNotifyChannel,
string string
> = { > = {
app: "ناتیفیکیشن داخلی", app: "ناتیفیکیشن داخلی",
sms: "پیامک", sms: "پیامک",
both: "هر دو", both: "هر دو",
}; };
export const AUTOMATION_NOTIFY_CHANNELS = [ export const AUTOMATION_NOTIFY_CHANNELS = [
@@ -2660,7 +2660,7 @@ export interface AutomationRuleConfig {
notifyTarget?: AutomationNotifyTarget; notifyTarget?: AutomationNotifyTarget;
activityType?: "call" | "meeting" | "task" | "note"; activityType?: "call" | "meeting" | "task" | "note";
points?: number; points?: number;
/** زنجیرهٔ اعمال؛ اگر خالی باشد همان action تکی استفاده می‌شود */ /** زنجیرهٔ اعمال؛ اگر خالی باشد همان action تکی استفاده می‌شود */
steps?: AutomationStep[]; steps?: AutomationStep[];
} }
@@ -2756,7 +2756,7 @@ export function automationStepToConfig(step: AutomationStep): AutomationRuleConf
}; };
} }
// —— ته‌حساب / حسابداری —— // —— ته‌حساب / حسابداری ——
export const TAHSAB_SANAD_TYPES = [ export const TAHSAB_SANAD_TYPES = [
"buy_sale_gold", "buy_sale_gold",
@@ -2769,11 +2769,11 @@ export const TAHSAB_SANAD_TYPES = [
export type TahesabSanadType = (typeof TAHSAB_SANAD_TYPES)[number]; export type TahesabSanadType = (typeof TAHSAB_SANAD_TYPES)[number];
export const TAHSAB_SANAD_LABELS: Record<TahesabSanadType, string> = { export const TAHSAB_SANAD_LABELS: Record<TahesabSanadType, string> = {
buy_sale_gold: "خرید/فروش آبشده", buy_sale_gold: "خرید/فروش آبشده",
buy_sale_sekeh: "خرید/فروش سکه", buy_sale_sekeh: "خرید/فروش سکه",
talab_bedehi: "طلب/بدهی", talab_bedehi: "طلب/بدهی",
vkh_gold: "واریز/خروج طلا", vkh_gold: "واریز/خروج طلا",
vkh_bank: "واریز/خروج بانکی", vkh_bank: "واریز/خروج بانکی",
}; };
export interface TahesabConnectionDto { export interface TahesabConnectionDto {
@@ -2822,7 +2822,8 @@ export interface PersonAccountingLinkDto {
export interface MandehValueDto { export interface MandehValueDto {
amount: string | number; amount: string | number;
unit: string; unit: string;
status: "بس" | "بد"; /** بس = بستانکار | بد = بدهکار */
status: "بس" | "بد" | string;
} }
export interface MandehDetailItemDto { export interface MandehDetailItemDto {
@@ -2843,7 +2844,7 @@ export interface PersonAssetsDto {
fetchedAt: string; fetchedAt: string;
} }
// —— پیام خودکار (جدا از اتوماسیون گردش کار) —— // —— پیام خودکار (جدا از اتوماسیون گردش کار) ——
export type MessageAutomationTrigger = export type MessageAutomationTrigger =
| "person_created" | "person_created"
@@ -2887,37 +2888,37 @@ export const MESSAGE_AUTOMATION_TRIGGER_LABELS: Record<
MessageAutomationTrigger, MessageAutomationTrigger,
string string
> = { > = {
person_created: "مخاطب جدید ساخته شد", person_created: "مخاطب جدید ساخته شد",
lead_submitted: "فرم سرنخ ارسال شد", lead_submitted: "فرم سرنخ ارسال شد",
deal_created: "معامله جدید ساخته شد", deal_created: "معامله جدید ساخته شد",
deal_stage_changed: "مرحله معامله عوض شد", deal_stage_changed: "مرحله معامله عوض شد",
deal_won: "معامله برنده شد", deal_won: "معامله برنده شد",
deal_lost: "معامله باخت", deal_lost: "معامله باخت",
ticket_created: "تیکت جدید ساخته شد", ticket_created: "تیکت جدید ساخته شد",
ticket_resolved: "تیکت حل شد", ticket_resolved: "تیکت حل شد",
invoice_issued: "فاکتور صادر شد", invoice_issued: "فاکتور صادر شد",
invoice_paid: "پرداخت روی فاکتور ثبت شد", invoice_paid: "پرداخت روی فاکتور ثبت شد",
activity_created: "فعالیت ثبت شد", activity_created: "فعالیت ثبت شد",
activity_done: "فعالیت تمام شد", activity_done: "فعالیت تمام شد",
}; };
export const MESSAGE_AUTOMATION_UNIT_LABELS: Record< export const MESSAGE_AUTOMATION_UNIT_LABELS: Record<
MessageAutomationDelayUnit, MessageAutomationDelayUnit,
string string
> = { > = {
minutes: "دقیقه", minutes: "دقیقه",
hours: "ساعت", hours: "ساعت",
days: "روز", days: "روز",
weeks: "هفته", weeks: "هفته",
months: "ماه", months: "ماه",
}; };
export const MESSAGE_AUTOMATION_FIELDS = [ export const MESSAGE_AUTOMATION_FIELDS = [
{ token: "{نام}", label: "نام مشتری" }, { token: "{نام}", label: "نام مشتری" },
{ token: "{شماره}", label: "شماره موبایل" }, { token: "{شماره}", label: "شماره موبایل" },
{ token: "{تاریخ}", label: "تاریخ ارسال" }, { token: "{تاریخ}", label: "تاریخ ارسال" },
{ token: "{عنوان}", label: "عنوان رکورد" }, { token: "{عنوان}", label: "عنوان رکورد" },
{ token: "{شرکت}", label: "نام شرکت" }, { token: "{شرکت}", label: "نام شرکت" },
] as const; ] as const;
export const MESSAGE_AUTOMATION_SMS_SEGMENT = 70; export const MESSAGE_AUTOMATION_SMS_SEGMENT = 70;
@@ -2926,18 +2927,18 @@ export const MESSAGE_AUTOMATION_CHANNEL_LABELS: Record<
MessageAutomationChannel, MessageAutomationChannel,
string string
> = { > = {
app: "ناتیف داخل برنامه", app: "ناتیف داخل برنامه",
sms: "پیامک", sms: "پیامک",
both: "پیامک و ناتیف", both: "پیامک و ناتیف",
}; };
export const MESSAGE_AUTOMATION_TARGET_LABELS: Record< export const MESSAGE_AUTOMATION_TARGET_LABELS: Record<
MessageAutomationTarget, MessageAutomationTarget,
string string
> = { > = {
staff: "مسئول پرونده", staff: "مسئول پرونده",
person: "مشتری", person: "مشتری",
both: "مشتری و مسئول", both: "مشتری و مسئول",
}; };
export interface MessageAutomationRuleDto { export interface MessageAutomationRuleDto {
@@ -3064,7 +3065,7 @@ export interface PlatformUserDto {
lastLoginAt?: string | null; lastLoginAt?: string | null;
createdAt: string; createdAt: string;
memberships: PlatformUserMembershipDto[]; memberships: PlatformUserMembershipDto[];
/** فقط اگر حداقل یک عضویت مالک فعال دارد */ /** فقط اگر حداقل یک عضویت مالک فعال دارد */
isBillingOwner?: boolean; isBillingOwner?: boolean;
billing?: BillingAccountDto | null; billing?: BillingAccountDto | null;
} }
@@ -3101,7 +3102,7 @@ export { brand, APP_NAME, APP_NAME_FA, brandSuggestionFa } from "./brand";
export type { Brand } from "./brand"; export type { Brand } from "./brand";
export const API_PREFIX = "api"; export const API_PREFIX = "api";
/* ——— لاگ فعالیت کاربران ——— */ /* ——— لاگ فعالیت کاربران ——— */
export interface AuditLogDto { export interface AuditLogDto {
id: string; id: string;
@@ -3123,7 +3124,7 @@ export interface AuditLogListResponse {
limit: number; limit: number;
} }
/* ——— فیلترهای ذخیره‌شده ——— */ /* ——— فیلترهای ذخیره‌شده ——— */
export type SavedViewScope = export type SavedViewScope =
| "deals" | "deals"
@@ -3142,7 +3143,7 @@ export const SAVED_VIEW_SCOPES: SavedViewScope[] = [
"reports", "reports",
]; ];
/** فیلترهای ذخیره‌شدهٔ صفحه گزارشات */ /** فیلترهای ذخیره‌شدهٔ صفحه گزارشات */
export interface ReportsViewFilters { export interface ReportsViewFilters {
/** today | week | month | quarter | year | custom */ /** today | week | month | quarter | year | custom */
period: string; period: string;
@@ -3158,7 +3159,7 @@ export interface ReportsViewFilters {
}; };
} }
/** متریک‌های گزارش‌ساز ساده */ /** متریک‌های گزارش‌ساز ساده */
export type ReportsBuilderMetric = export type ReportsBuilderMetric =
| "won_amount" | "won_amount"
| "won_count" | "won_count"
@@ -3186,18 +3187,18 @@ export const REPORTS_BUILDER_METRIC_LABELS: Record<
ReportsBuilderMetric, ReportsBuilderMetric,
string string
> = { > = {
won_amount: "مبلغ معاملات برنده", won_amount: "مبلغ معاملات برنده",
won_count: "تعداد معاملات برنده", won_count: "تعداد معاملات برنده",
lost_count: "تعداد معاملات باخته", lost_count: "تعداد معاملات باخته",
open_count: "تعداد معاملات باز", open_count: "تعداد معاملات باز",
open_amount: "مبلغ معاملات باز", open_amount: "مبلغ معاملات باز",
activities_done: "فعالیت انجام‌شده", activities_done: "فعالیت انجام‌شده",
people_created: "مشتریان جدید", people_created: "مشتریان جدید",
invoice_amount: "مبلغ فاکتور", invoice_amount: "مبلغ فاکتور",
invoice_count: "تعداد فاکتور", invoice_count: "تعداد فاکتور",
}; };
/** ابعاد گروه‌بندی گزارش‌ساز */ /** ابعاد گروه‌بندی گزارش‌ساز */
export type ReportsBuilderDimension = export type ReportsBuilderDimension =
| "none" | "none"
| "owner" | "owner"
@@ -3221,13 +3222,13 @@ export const REPORTS_BUILDER_DIMENSION_LABELS: Record<
ReportsBuilderDimension, ReportsBuilderDimension,
string string
> = { > = {
none: "بدون گروه‌بندی (جمع کل)", none: "بدون گروه‌بندی (جمع کل)",
owner: "کاربر / مسئول", owner: "کاربر / مسئول",
team: "تیم", team: "تیم",
source: "منبع", source: "منبع",
stage: "مرحله کاریز", stage: "مرحله کاریز",
month: "ماه", month: "ماه",
status: "وضعیت معامله", status: "وضعیت معامله",
}; };
export interface ReportsBuilderQuery { export interface ReportsBuilderQuery {
@@ -3278,7 +3279,7 @@ export interface CreateSavedViewRequest {
export type UpdateSavedViewRequest = Partial<CreateSavedViewRequest>; export type UpdateSavedViewRequest = Partial<CreateSavedViewRequest>;
/* ——— API عمومی و وب‌هوک ——— */ /* ——— API عمومی و وب‌هوک ——— */
export const WEBHOOK_EVENTS = [ export const WEBHOOK_EVENTS = [
"person.created", "person.created",
@@ -3307,7 +3308,7 @@ export interface CreateOrganizationApiKeyRequest {
} }
export interface CreateOrganizationApiKeyResponse extends OrganizationApiKeyDto { export interface CreateOrganizationApiKeyResponse extends OrganizationApiKeyDto {
/** فقط یک‌بار هنگام ساخت برگردانده می‌شود */ /** فقط یک‌بار هنگام ساخت برگردانده می‌شود */
rawKey: string; rawKey: string;
} }
@@ -3329,7 +3330,7 @@ export interface CreateWebhookEndpointRequest {
isActive?: boolean; isActive?: boolean;
} }
/** فقط هنگام ساخت؛ secret دوباره برنمی‌گردد */ /** فقط هنگام ساخت؛ secret دوباره برنمی‌گردد */
export interface CreateWebhookEndpointResponse extends WebhookEndpointDto { export interface CreateWebhookEndpointResponse extends WebhookEndpointDto {
secret: string; secret: string;
} }
@@ -3347,7 +3348,7 @@ export interface WebhookDeliveryDto {
deliveredAt: string | null; deliveredAt: string | null;
} }
/* ——— پیامک گروهی ——— */ /* ——— پیامک گروهی ——— */
export type SmsCampaignStatus = export type SmsCampaignStatus =
| "draft" | "draft"
@@ -3375,7 +3376,7 @@ export interface CreateSmsCampaignRequest {
body: string; body: string;
personIds: string[]; personIds: string[];
scheduledAt?: string | null; scheduledAt?: string | null;
/** اگر true باشد بلافاصله صف می‌شود */ /** اگر true باشد بلافاصله صف می‌شود */
queueNow?: boolean; queueNow?: boolean;
} }
@@ -3384,7 +3385,7 @@ export interface SmsCampaignListResponse {
total: number; total: number;
} }
/* ——— تیم‌ها و سطح دسترسی به پرونده‌ها ——— */ /* ——— تیم‌ها و سطح دسترسی به پرونده‌ها ——— */
export type TeamMemberRole = "member" | "manager"; export type TeamMemberRole = "member" | "manager";
@@ -3421,7 +3422,7 @@ export interface SetTeamMembersRequest {
members: Array<{ userId: string; role: TeamMemberRole }>; members: Array<{ userId: string; role: TeamMemberRole }>;
} }
/* ——— ووکامرس ——— */ /* ——— ووکامرس ——— */
export interface WooCommerceConnectionDto { export interface WooCommerceConnectionDto {
id: string; id: string;
@@ -3477,7 +3478,7 @@ export interface WooCommerceOrderLinkDto {
syncedAt: string; syncedAt: string;
} }
/* ——— تلفن سازمانی / VoIP ——— */ /* ——— تلفن سازمانی / VoIP ——— */
export type VoipCallDirection = "inbound" | "outbound"; export type VoipCallDirection = "inbound" | "outbound";
@@ -3493,7 +3494,7 @@ export interface VoipConnectionDto {
label: string; label: string;
enabled: boolean; enabled: boolean;
webhookSecretSet: boolean; webhookSecretSet: boolean;
/** قالب URL برای شروع تماس؛ {number} جایگزین می‌شود */ /** قالب URL برای شروع تماس؛ {number} جایگزین می‌شود */
clickToCallUrl: string | null; clickToCallUrl: string | null;
lastEventAt: string | null; lastEventAt: string | null;
lastError: string | null; lastError: string | null;
@@ -3550,7 +3551,7 @@ export interface VoipClickToCallRequest {
} }
export interface VoipWebhookEvent { export interface VoipWebhookEvent {
/** شناسه یکتای تماس در سانترال */ /** شناسه یکتای تماس در سانترال */
callId: string; callId: string;
direction: VoipCallDirection; direction: VoipCallDirection;
status: VoipCallStatus | string; status: VoipCallStatus | string;
@@ -3559,16 +3560,16 @@ export interface VoipWebhookEvent {
startedAt?: string; startedAt?: string;
endedAt?: string; endedAt?: string;
durationSec?: number; durationSec?: number;
/** لینک فایل ضبط (برای خلاصه خودکار) */ /** لینک فایل ضبط (برای خلاصه خودکار) */
recordingUrl?: string; recordingUrl?: string;
/** متن آمادهٔ تماس؛ اگر باشد STT رد می‌شود */ /** متن آمادهٔ تماس؛ اگر باشد STT رد می‌شود */
transcript?: string; transcript?: string;
/** برای سازگاری با فیلدهای رایج دیگر */ /** برای سازگاری با فیلدهای رایج دیگر */
caller?: string; caller?: string;
callee?: string; callee?: string;
} }
/* ——— رزرو و نوبت‌دهی ——— */ /* ——— رزرو و نوبت‌دهی ——— */
export type ReservationStatus = export type ReservationStatus =
| "pending" | "pending"
@@ -3584,10 +3585,10 @@ export const RESERVATION_STATUSES: ReservationStatus[] = [
]; ];
export const RESERVATION_STATUS_LABELS: Record<ReservationStatus, string> = { export const RESERVATION_STATUS_LABELS: Record<ReservationStatus, string> = {
pending: "در انتظار", pending: "در انتظار",
confirmed: "تأیید شده", confirmed: "تأیید شده",
canceled: "لغو شده", canceled: "لغو شده",
done: "انجام شده", done: "انجام شده",
}; };
export interface ReservationServiceDto { export interface ReservationServiceDto {
@@ -3595,7 +3596,7 @@ export interface ReservationServiceDto {
name: string; name: string;
description: string; description: string;
durationMinutes: number; durationMinutes: number;
/** روزهای هفته ۰=یکشنبه … ۶=شنبه (JS getDay) */ /** روزهای هفته Û°=یکشنبه … Û¶=شنبه (JS getDay) */
workDays: number[]; workDays: number[];
dayStartHour: number; dayStartHour: number;
dayEndHour: number; dayEndHour: number;
@@ -3663,7 +3664,7 @@ export interface ReservationListResponse {
/* ——— مدیریت لیدها ——— */ /* ——— مدیریت لیدها ——— */
export type LeadAssignRule = "round_robin" | "equal_split"; export type LeadAssignRule = "round_robin" | "equal_split";