Creating import&export excel
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user