feature: users with treatment edit permission should now have working hours defined. the appointment grid is now being drawn based on the doctor's working hours.

This commit is contained in:
2026-06-10 19:44:09 +03:30
parent 468572a50f
commit 48ecfd05e1
22 changed files with 1571 additions and 116 deletions

View File

@@ -0,0 +1,44 @@
import { Type } from 'class-transformer';
import {
ArrayMaxSize,
IsArray,
IsBoolean,
IsInt,
IsOptional,
Max,
Min,
ValidateNested,
} from 'class-validator';
export class WorkingHoursBlockDto {
@IsInt()
@Min(0)
@Max(6)
dayOfWeek: number;
@IsInt()
@Min(0)
@Max(1439)
startMinute: number;
@IsInt()
@Min(1)
@Max(1440)
endMinute: number;
@IsOptional()
@IsInt()
@Min(0)
sortOrder?: number;
}
export class UpsertWorkingHoursDto {
@IsBoolean()
autoRepeatWeekly: boolean;
@IsArray()
@ArrayMaxSize(42)
@ValidateNested({ each: true })
@Type(() => WorkingHoursBlockDto)
blocks: WorkingHoursBlockDto[];
}