fix(preferences): ran a migration command so is_dark_mode = null is accepted in DB

This commit is contained in:
Matthieu Haineault 2025-12-03 14:23:59 -05:00
parent 35a71d217a
commit 5b0e0ce869
3 changed files with 12 additions and 7 deletions

View File

@ -0,0 +1,5 @@
-- CreateEnum
CREATE TYPE "modules" AS ENUM ('timesheets', 'timesheets_approval', 'employee_list', 'employee_management', 'personal_profile', 'dashboard');
-- AlterTable
ALTER TABLE "preferences" ALTER COLUMN "is_dark_mode" DROP NOT NULL;

View File

@ -8,7 +8,7 @@ export enum DisplayLanguage {
export class PreferencesDto { export class PreferencesDto {
@IsInt() id: number; @IsInt() id: number;
@IsBoolean() notifications: boolean; @IsBoolean() notifications: boolean;
@IsOptional() @IsBoolean() is_dark_mode?: boolean; @IsOptional() @IsBoolean() is_dark_mode?: boolean | null;
@IsEnum(DisplayLanguage) display_language: string; @IsEnum(DisplayLanguage) display_language: string;
@IsBoolean() is_lefty_mode: boolean; @IsBoolean() is_lefty_mode: boolean;
@IsBoolean() is_employee_list_grid: boolean; @IsBoolean() is_employee_list_grid: boolean;