Selection of multiple officials and role sub-categories

This commit is contained in:
2026-10-03 13:16:13 +03:30
parent 9f97371391
commit 3b128bd980
14 changed files with 904 additions and 95 deletions
+11
View File
@@ -7,6 +7,7 @@ import {
IsString,
MaxLength,
MinLength,
ValidateIf,
ValidateNested,
} from 'class-validator';
import { ROLE_PERMISSION_ITEMS, type RolePermissionKey } from '@mento/shared';
@@ -34,6 +35,11 @@ export class CreateOrgRoleDto {
@ArrayUnique()
@IsIn(PERMISSION_KEYS, { each: true })
permissions?: RolePermissionKey[];
@IsOptional()
@ValidateIf((_, v) => v !== null)
@IsString()
parentId?: string | null;
}
export class UpdateOrgRoleDto {
@@ -57,6 +63,11 @@ export class UpdateOrgRoleDto {
@ArrayUnique()
@IsIn(PERMISSION_KEYS, { each: true })
permissions?: RolePermissionKey[];
@IsOptional()
@ValidateIf((_, v) => v !== null)
@IsString()
parentId?: string | null;
}
export class RolePermissionPatchItemDto {