fix(preferences): ran a migration command so is_dark_mode = null is accepted in DB
This commit is contained in:
parent
35a71d217a
commit
5b0e0ce869
|
|
@ -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;
|
||||||
|
|
@ -53,7 +53,7 @@ model Employees {
|
||||||
supervisor Employees? @relation("EmployeeSupervisor", fields: [supervisor_id], references: [id])
|
supervisor Employees? @relation("EmployeeSupervisor", fields: [supervisor_id], references: [id])
|
||||||
supervisor_id Int?
|
supervisor_id Int?
|
||||||
|
|
||||||
external_payroll_id Int @default(autoincrement())
|
external_payroll_id Int @default(autoincrement())
|
||||||
company_code Int
|
company_code Int
|
||||||
first_work_day DateTime @db.Date
|
first_work_day DateTime @db.Date
|
||||||
last_work_day DateTime? @db.Date
|
last_work_day DateTime? @db.Date
|
||||||
|
|
@ -347,12 +347,12 @@ model Preferences {
|
||||||
user Users @relation("UserPreferences", fields: [user_id], references: [id])
|
user Users @relation("UserPreferences", fields: [user_id], references: [id])
|
||||||
user_id String @unique @db.Uuid
|
user_id String @unique @db.Uuid
|
||||||
|
|
||||||
notifications Boolean @default(true)
|
notifications Boolean @default(true)
|
||||||
is_dark_mode Boolean? @default(false)
|
is_dark_mode Boolean? @default(false)
|
||||||
display_language String @default("fr-FR") //'fr-FR' | 'en-CA';
|
display_language String @default("fr-FR") //'fr-FR' | 'en-CA';
|
||||||
is_lefty_mode Boolean @default(false)
|
is_lefty_mode Boolean @default(false)
|
||||||
is_employee_list_grid Boolean @default(true)
|
is_employee_list_grid Boolean @default(true)
|
||||||
is_timesheet_approval_grid Boolean @default(true)
|
is_timesheet_approval_grid Boolean @default(true)
|
||||||
|
|
||||||
@@map("preferences")
|
@@map("preferences")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user