Creating import&export excel

This commit is contained in:
2026-09-15 17:33:05 +03:30
parent 9ae176bec0
commit 44f9849d0e
26 changed files with 3682 additions and 474 deletions
+69 -4
View File
@@ -44,23 +44,88 @@ export interface OrgUserDto {
mobile?: string | null;
fullName: string;
role: UserRole;
orgRoleId?: string | null;
orgRoleName?: string;
orgRoleColor?: string;
isActive?: boolean;
lastLoginAt?: string | null;
hasAvatar?: boolean;
commissionPercent?: number;
createdAt: string;
}
export interface UpdateUserCommissionRequest {
commissionPercent: number;
export type RolePermissionKey =
| "customers"
| "sales"
| "billing"
| "products"
| "activities"
| "notes"
| "reports";
export const ROLE_PERMISSION_ITEMS: Array<{
key: RolePermissionKey;
label: string;
}> = [
{ key: "customers", label: "مشتریان" },
{ key: "sales", label: "فروش و معاملات" },
{ key: "billing", label: "پیش‌فاکتورها و فاکتورها" },
{ key: "products", label: "محصولات و خدمات" },
{ key: "activities", label: "فعالیت‌ها" },
{ key: "notes", label: "یادداشت‌ها" },
{ key: "reports", label: "گزارش‌ها" },
];
export interface OrgRoleMemberDto {
id: string;
fullName: string;
hasAvatar: boolean;
}
export interface OrgRoleDto {
id: string;
name: string;
description: string;
color: string;
permissions: RolePermissionKey[];
systemKey: UserRole | null;
userCount: number;
members: OrgRoleMemberDto[];
}
export interface CreateOrgRoleRequest {
name: string;
description?: string;
color?: string;
permissions?: RolePermissionKey[];
}
export interface UpdateOrgRoleRequest {
name?: string;
description?: string;
color?: string;
permissions?: RolePermissionKey[];
}
export interface InviteUserRequest {
mobile: string;
fullName: string;
password: string;
role: Exclude<UserRole, "owner">;
role?: Exclude<UserRole, "owner">;
orgRoleId?: string;
}
export interface UpdateUserRoleRequest {
role: UserRole;
role?: UserRole;
orgRoleId?: string;
}
export interface UpdateUserStatusRequest {
isActive: boolean;
}
export interface UpdateUserCommissionRequest {
commissionPercent: number;
}
export interface UpdateProfileRequest {