improvement: sorts and filters updated for tasks feature.
This commit is contained in:
@@ -57,6 +57,12 @@ export class ListLabTasksDto {
|
||||
@IsBoolean()
|
||||
important?: boolean;
|
||||
|
||||
/** When true, important lab cases are listed before others (does not hide non-important). */
|
||||
@IsOptional()
|
||||
@Transform(toBoolean)
|
||||
@IsBoolean()
|
||||
pinImportant?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
sentFrom?: string;
|
||||
@@ -70,6 +76,11 @@ export class ListLabTasksDto {
|
||||
@IsString()
|
||||
stepCompleted?: string;
|
||||
|
||||
/** Narrow list to a single lab case (e.g. show-in-case navigation). */
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
labCaseId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['date', 'status', 'clinic', 'patient', 'important', 'prosthesis', 'taskType'])
|
||||
sortBy?: TaskSortField;
|
||||
@@ -91,3 +102,63 @@ export class ListLabTasksDto {
|
||||
@Max(100)
|
||||
limit = 50;
|
||||
}
|
||||
|
||||
/** Same filters as list (no page) — used to find which page contains a task. */
|
||||
export class LocateTaskPageDto {
|
||||
@IsUUID()
|
||||
taskId: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
q?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
clinicOrganizationId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(LabTaskStatus)
|
||||
status?: LabTaskStatus;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(toBoolean)
|
||||
@IsBoolean()
|
||||
completed?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(toBoolean)
|
||||
@IsBoolean()
|
||||
important?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(toBoolean)
|
||||
@IsBoolean()
|
||||
pinImportant?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
sentFrom?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
sentTo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
stepCompleted?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['date', 'status', 'clinic', 'patient', 'important', 'prosthesis', 'taskType'])
|
||||
sortBy?: TaskSortField;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['asc', 'desc'])
|
||||
sortDir?: 'asc' | 'desc';
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => Number(value))
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(100)
|
||||
limit = 50;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user