Ask for organization business field at signup, including jewelry.
Store Didar-style industry on the org so registration, settings, and Ask Mento share the same catalog. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -68,6 +68,14 @@ export interface LoginRequest {
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface RegisterOrganizationRequest {
|
||||
organizationName: string;
|
||||
fullName: string;
|
||||
email: string;
|
||||
password: string;
|
||||
businessField: BusinessField;
|
||||
}
|
||||
|
||||
export interface LoginResponse {
|
||||
accessToken: string;
|
||||
user: AuthUserDto;
|
||||
@@ -77,11 +85,70 @@ export interface OrganizationDto {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
businessField: BusinessField | null;
|
||||
baseCurrency: string;
|
||||
enabledCurrencies: string[];
|
||||
exchangeRates: ExchangeRateDto[];
|
||||
}
|
||||
|
||||
export interface UpdateOrganizationRequest {
|
||||
name?: string;
|
||||
businessField?: BusinessField;
|
||||
}
|
||||
|
||||
/** زمینه فعالیت سازمان — همتراز صنایع دیدار */
|
||||
export const BUSINESS_FIELDS = [
|
||||
"education",
|
||||
"beauty",
|
||||
"real_estate",
|
||||
"construction",
|
||||
"advertising",
|
||||
"insurance",
|
||||
"consulting",
|
||||
"startup",
|
||||
"medical_devices",
|
||||
"travel",
|
||||
"contractor",
|
||||
"trading",
|
||||
"manufacturing",
|
||||
"personal",
|
||||
"tech",
|
||||
"legal",
|
||||
"repair",
|
||||
"retail",
|
||||
"jewelry",
|
||||
"other",
|
||||
] as const;
|
||||
|
||||
export type BusinessField = (typeof BUSINESS_FIELDS)[number];
|
||||
|
||||
export const BUSINESS_FIELD_LABELS: Record<BusinessField, string> = {
|
||||
education: "آموزشگاه و مؤسسات آموزشی",
|
||||
beauty: "کلینیک زیبایی و آرایشگاه",
|
||||
real_estate: "املاک و مشاورین مسکن",
|
||||
construction: "صنعت ساختمان",
|
||||
advertising: "تبلیغات و مشاوره کسبوکار",
|
||||
insurance: "بیمه",
|
||||
consulting: "شرکتهای مشاور",
|
||||
startup: "استارتاپ و کسبوکار آنلاین",
|
||||
medical_devices: "تجهیزات پزشکی",
|
||||
travel: "گردشگری و مهاجرت",
|
||||
contractor: "پیمانکاری و پروژهای",
|
||||
trading: "بازرگانی",
|
||||
manufacturing: "تولیدی و صنعتی",
|
||||
personal: "کسبوکار شخصی و خانگی",
|
||||
tech: "نرمافزار و سختافزار",
|
||||
legal: "وکلا و مشاورین حقوقی",
|
||||
repair: "خدمات و تعمیرات",
|
||||
retail: "خردهفروشی",
|
||||
jewelry: "طلا و جواهر",
|
||||
other: "سایر",
|
||||
};
|
||||
|
||||
export function isBusinessField(value: string): value is BusinessField {
|
||||
return (BUSINESS_FIELDS as readonly string[]).includes(value);
|
||||
}
|
||||
|
||||
export interface ExchangeRateDto {
|
||||
currency: string;
|
||||
rateToBase: number;
|
||||
|
||||
Reference in New Issue
Block a user