improvement: UI/UX improved for v1 standalone treatments/cases feature.
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
import { Transform } from 'class-transformer';
|
||||
import { LabTaskStatus } from '@prisma/client';
|
||||
import { LabTaskStatus, LabCaseOrigin } from '@prisma/client';
|
||||
|
||||
const toBoolean = ({ value }: { value: unknown }) => {
|
||||
if (typeof value === 'boolean') return value;
|
||||
@@ -105,6 +105,11 @@ export class ListLabTasksDto {
|
||||
@IsString()
|
||||
prosthesisTypeCode?: string;
|
||||
|
||||
/** CLINIC_DISPATCH = received from clinic; LAB_INTERNAL = generated in the lab. */
|
||||
@IsOptional()
|
||||
@IsEnum(LabCaseOrigin)
|
||||
origin?: LabCaseOrigin;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['date', 'status', 'clinic', 'patient', 'important', 'prosthesis', 'taskType', 'dueDate'])
|
||||
sortBy?: TaskSortField;
|
||||
@@ -194,6 +199,10 @@ export class LocateTaskPageDto {
|
||||
@IsString()
|
||||
prosthesisTypeCode?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(LabCaseOrigin)
|
||||
origin?: LabCaseOrigin;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['date', 'status', 'clinic', 'patient', 'important', 'prosthesis', 'taskType', 'dueDate'])
|
||||
sortBy?: TaskSortField;
|
||||
|
||||
@@ -466,6 +466,7 @@ export class TasksService {
|
||||
} satisfies Prisma.LabCaseWhereInput,
|
||||
]
|
||||
: []),
|
||||
...(query.origin ? [{ origin: query.origin } satisfies Prisma.LabCaseWhereInput] : []),
|
||||
...(query.q?.trim() ? [this.buildTaskSearchWhere(query.q.trim())] : []),
|
||||
],
|
||||
};
|
||||
@@ -537,6 +538,7 @@ export class TasksService {
|
||||
overdue: query.overdue,
|
||||
unassignedOnly: query.unassignedOnly,
|
||||
prosthesisTypeCode: query.prosthesisTypeCode,
|
||||
origin: query.origin,
|
||||
sortBy: query.sortBy,
|
||||
sortDir: query.sortDir,
|
||||
limit: query.limit,
|
||||
@@ -797,6 +799,7 @@ export class TasksService {
|
||||
: null,
|
||||
createdAt: task.createdAt.toISOString(),
|
||||
caseSentAt: (task.labCase.sentAt ?? task.labCase.startedAt)?.toISOString() ?? null,
|
||||
origin: task.labCase.origin,
|
||||
clinic,
|
||||
patient,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user