1
0
forked from Yara724/api

Added catalog endpoints to claim expert panel

This commit is contained in:
SepehrYahyaee
2026-05-09 14:00:02 +03:30
parent 7998649a89
commit a52b7a0a72
2 changed files with 39 additions and 12 deletions

View File

@@ -4063,17 +4063,17 @@ export class ClaimRequestManagementService {
);
}
// At most two non-top sides allowed
const sideSet = new Set(
selectedItems
.map((p) => p.side)
.filter((s) => s !== "top"),
);
if (sideSet.size > 2) {
throw new BadRequestException(
`At most two of left/right/front/back can be selected. Selected: ${[...sideSet].join(", ")}`,
);
}
// DISABLED: At most two non-top sides allowed
// const sideSet = new Set(
// selectedItems
// .map((p) => p.side)
// .filter((s) => s !== "top"),
// );
// if (sideSet.size > 2) {
// throw new BadRequestException(
// `At most two of left/right/front/back can be selected. Selected: ${[...sideSet].join(", ")}`,
// );
// }
const selectedPartDocs = selectedItems.map((p) =>
catalogItemToSelectedPart(p, catalog),