Add all-debtors mode beside custom ranges for balance claims criteria.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-18 15:28:08 +03:30
co-authored by Cursor
parent ae61c321a1
commit 9b0c0d55c6
5 changed files with 165 additions and 64 deletions
+9 -3
View File
@@ -1,5 +1,6 @@
import { Type } from 'class-transformer';
import {
IsIn,
IsInt,
IsNumber,
IsObject,
@@ -13,11 +14,16 @@ import {
} from 'class-validator';
export class AccountBalanceRangeBody {
@IsNumber()
min!: number;
@IsIn(['all_debtors', 'range'])
mode!: 'all_debtors' | 'range';
@ValidateIf((o: AccountBalanceRangeBody) => o.mode === 'range')
@IsNumber()
max!: number;
min?: number;
@ValidateIf((o: AccountBalanceRangeBody) => o.mode === 'range')
@IsNumber()
max?: number;
}
export class UpdateAccountBalanceSettingsDto {