feat(preferences): added display options to preferences table
This commit is contained in:
parent
2f0982c952
commit
5292f1af11
|
|
@ -0,0 +1,4 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "preferences" ADD COLUMN "employee_list_display" INTEGER NOT NULL DEFAULT 0,
|
||||||
|
ADD COLUMN "timesheet_display" INTEGER NOT NULL DEFAULT 0,
|
||||||
|
ADD COLUMN "validation_display" INTEGER NOT NULL DEFAULT 0;
|
||||||
|
|
@ -381,6 +381,10 @@ model Preferences {
|
||||||
lang_switch Int @default(0)
|
lang_switch Int @default(0)
|
||||||
lefty_mode Int @default(0)
|
lefty_mode Int @default(0)
|
||||||
|
|
||||||
|
employee_list_display Int @default(0)
|
||||||
|
validation_display Int @default(0)
|
||||||
|
timesheet_display Int @default(0)
|
||||||
|
|
||||||
@@map("preferences")
|
@@map("preferences")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,13 @@ export class PreferencesDto {
|
||||||
|
|
||||||
@IsInt()
|
@IsInt()
|
||||||
lefty_mode: number;
|
lefty_mode: number;
|
||||||
|
|
||||||
|
@IsInt()
|
||||||
|
employee_list_display: number;
|
||||||
|
|
||||||
|
@IsInt()
|
||||||
|
validation_display: number;
|
||||||
|
|
||||||
|
@IsInt()
|
||||||
|
timesheet_display: number;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Preferences } from "@prisma/client";
|
import { Preferences } from "@prisma/client";
|
||||||
import { PrismaService } from "src/prisma/prisma.service";
|
import { PrismaService } from "src/prisma/prisma.service";
|
||||||
import { PreferencesDto } from "../dtos/preferences.dto";
|
import { PreferencesDto } from "../dtos/preferences.dto";
|
||||||
|
|
@ -20,6 +20,9 @@ export class PreferencesService {
|
||||||
dark_mode: dto.dark_mode,
|
dark_mode: dto.dark_mode,
|
||||||
lang_switch: dto.lang_switch,
|
lang_switch: dto.lang_switch,
|
||||||
lefty_mode: dto.lefty_mode,
|
lefty_mode: dto.lefty_mode,
|
||||||
|
employee_list_display: dto.employee_list_display,
|
||||||
|
validation_display: dto.validation_display,
|
||||||
|
timesheet_display: dto.timesheet_display,
|
||||||
},
|
},
|
||||||
include: { user: true },
|
include: { user: true },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user