improvement: time period dropdown added to appropriate dashboard charts.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsISO8601, IsInt, IsOptional, Max, Min } from 'class-validator';
|
||||
import { IsIn, IsISO8601, IsInt, IsOptional, Max, Min } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
const WEEK_MONTH = ['week', 'month'] as const;
|
||||
const WEEK_MONTH_YEAR = ['week', 'month', 'year'] as const;
|
||||
|
||||
export class TodaySummaryQueryDto {
|
||||
@ApiPropertyOptional({
|
||||
description: 'Start of the local day range (ISO 8601). Defaults to UTC midnight today.',
|
||||
@@ -30,4 +33,39 @@ export class TodaySummaryQueryDto {
|
||||
@Min(-840)
|
||||
@Max(840)
|
||||
utcOffsetMinutes?: number;
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH)
|
||||
appointmentsWeekPeriod?: 'week' | 'month';
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH)
|
||||
appointmentsWeekMinePeriod?: 'week' | 'month';
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH)
|
||||
labTaskActivityPeriod?: 'week' | 'month';
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH)
|
||||
casesDuePeriod?: 'week' | 'month';
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH_YEAR })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH_YEAR)
|
||||
treatmentMixPeriod?: 'week' | 'month' | 'year';
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH_YEAR })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH_YEAR)
|
||||
casePartnersPeriod?: 'week' | 'month' | 'year';
|
||||
|
||||
@ApiPropertyOptional({ enum: WEEK_MONTH_YEAR })
|
||||
@IsOptional()
|
||||
@IsIn(WEEK_MONTH_YEAR)
|
||||
efficiencyPeriod?: 'week' | 'month' | 'year';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user