dynamic locations

This commit is contained in:
2026-11-11 14:10:01 +03:30
parent 5e3bd02243
commit 658a8a74cc
18 changed files with 454 additions and 111 deletions
+8 -4
View File
@@ -199,12 +199,16 @@ export class ManagementService {
}
if (field === "locations") {
if (
![RoleEnum.FILE_MAKER, RoleEnum.FILE_REVIEWER].includes(
role as RoleEnum,
)
![
RoleEnum.EXPERT,
RoleEnum.DAMAGE_EXPERT,
RoleEnum.FIELD_EXPERT,
RoleEnum.FILE_MAKER,
RoleEnum.FILE_REVIEWER,
].includes(role as RoleEnum)
)
throw new BadRequestException(
"Locations apply only to file makers and reviewers",
"Locations apply only to expert staff roles",
);
if (!Array.isArray(value))
throw new BadRequestException("Locations must be an array");