fix(prisma-client): modified imports in many files to match the new structure of the Prisma ORM. (where @prisma/client => prisma/generated/postgres/client). Added commented mariaDB variables to Dockerfile for future connections
This commit is contained in:
parent
f2ec4d9e82
commit
a3bdd41648
|
|
@ -12,6 +12,13 @@ ENV DATABASE_URL_PROD="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10
|
||||||
ENV DATABASE_URL_STAGING="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db_staging?schema=public"
|
ENV DATABASE_URL_STAGING="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db_staging?schema=public"
|
||||||
ENV DATABASE_URL_DEV="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db_dev?schema=public"
|
ENV DATABASE_URL_DEV="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10.100.0.116/app_targo_db_dev?schema=public"
|
||||||
|
|
||||||
|
# this section is for the mariadb connection setup, DEV VARIABLES ******
|
||||||
|
#ENV DATABASE_URL_MARIADB= "mysql://matthieu:targo123@10.100.80.100:3306/testgc?schema=public"
|
||||||
|
#ENV DATABASE_HOST="10.100.80.100"
|
||||||
|
#ENV DATABASE_USER="matthieu"
|
||||||
|
#ENV DATABASE_PASSWORD="targo123"
|
||||||
|
#ENV DATABASE_NAME="testgc"
|
||||||
|
|
||||||
ENV AUTHENTIK_ISSUER="https://auth.targo.ca/application/o/montargo/"
|
ENV AUTHENTIK_ISSUER="https://auth.targo.ca/application/o/montargo/"
|
||||||
ENV AUTHENTIK_CLIENT_ID="KUmSmvpu2aDDy4JfNwas7XriNFtPcj2Ka2PyLO5v"
|
ENV AUTHENTIK_CLIENT_ID="KUmSmvpu2aDDy4JfNwas7XriNFtPcj2Ka2PyLO5v"
|
||||||
ENV AUTHENTIK_CLIENT_SECRET="N55BgX1mxT7eiY99LOo5zXr5cKz9FgTsaCA9MdC7D8ZuhOGqozvqtNXVGbpY1eCg2kkYwJeJLP89sQ8R4cYybIJI7EwKijb19bzZQpUPwBosWwG3irUwdTnZOyw8yW5i"
|
ENV AUTHENTIK_CLIENT_SECRET="N55BgX1mxT7eiY99LOo5zXr5cKz9FgTsaCA9MdC7D8ZuhOGqozvqtNXVGbpY1eCg2kkYwJeJLP89sQ8R4cYybIJI7EwKijb19bzZQpUPwBosWwG3irUwdTnZOyw8yW5i"
|
||||||
|
|
|
||||||
60
package-lock.json
generated
60
package-lock.json
generated
|
|
@ -2213,9 +2213,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@isaacs/brace-expansion": {
|
"node_modules/@isaacs/brace-expansion": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz",
|
||||||
"integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
|
"integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -3167,30 +3167,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nestjs/config": {
|
"node_modules/@nestjs/config": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/config/-/config-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/config/-/config-4.0.3.tgz",
|
||||||
"integrity": "sha512-McMW6EXtpc8+CwTUwFdg6h7dYcBUpH5iUILCclAsa+MbCEvC9ZKu4dCHRlJqALuhjLw97pbQu62l4+wRwGeZqA==",
|
"integrity": "sha512-FQ3M3Ohqfl+nHAn5tp7++wUQw0f2nAk+SFKe8EpNRnIifPqvfJP6JQxPKtFLMOHbyer4X646prFG4zSRYEssQQ==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "16.4.7",
|
"dotenv": "17.2.3",
|
||||||
"dotenv-expand": "12.0.1",
|
"dotenv-expand": "12.0.3",
|
||||||
"lodash": "4.17.21"
|
"lodash": "4.17.23"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
||||||
"rxjs": "^7.1.0"
|
"rxjs": "^7.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nestjs/config/node_modules/dotenv": {
|
"node_modules/@nestjs/config/node_modules/lodash": {
|
||||||
"version": "16.4.7",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
"license": "BSD-2-Clause",
|
"license": "MIT"
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://dotenvx.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"node_modules/@nestjs/core": {
|
"node_modules/@nestjs/core": {
|
||||||
"version": "11.1.7",
|
"version": "11.1.7",
|
||||||
|
|
@ -3397,15 +3392,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nestjs/swagger": {
|
"node_modules/@nestjs/swagger": {
|
||||||
"version": "11.2.5",
|
"version": "11.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-11.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-11.2.6.tgz",
|
||||||
"integrity": "sha512-wCykbEybMqiYcvkyzPW4SbXKcwra9AGdajm0MvFgKR3W+gd1hfeKlo67g/s9QCRc/mqUU4KOE5Qtk7asMeFuiA==",
|
"integrity": "sha512-oiXOxMQqDFyv1AKAqFzSo6JPvMEs4uA36Eyz/s2aloZLxUjcLfUMELSLSNQunr61xCPTpwEOShfmO7NIufKXdA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@microsoft/tsdoc": "0.16.0",
|
"@microsoft/tsdoc": "0.16.0",
|
||||||
"@nestjs/mapped-types": "2.1.0",
|
"@nestjs/mapped-types": "2.1.0",
|
||||||
"js-yaml": "4.1.1",
|
"js-yaml": "4.1.1",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.23",
|
||||||
"path-to-regexp": "8.3.0",
|
"path-to-regexp": "8.3.0",
|
||||||
"swagger-ui-dist": "5.31.0"
|
"swagger-ui-dist": "5.31.0"
|
||||||
},
|
},
|
||||||
|
|
@ -3429,6 +3424,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@nestjs/swagger/node_modules/lodash": {
|
||||||
|
"version": "4.17.23",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@nestjs/testing": {
|
"node_modules/@nestjs/testing": {
|
||||||
"version": "11.1.7",
|
"version": "11.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-11.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-11.1.7.tgz",
|
||||||
|
|
@ -6996,7 +6997,6 @@
|
||||||
"version": "17.2.3",
|
"version": "17.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
|
||||||
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
|
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
|
||||||
"dev": true,
|
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
|
|
@ -7006,9 +7006,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dotenv-expand": {
|
"node_modules/dotenv-expand": {
|
||||||
"version": "12.0.1",
|
"version": "12.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-12.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-12.0.3.tgz",
|
||||||
"integrity": "sha512-LaKRbou8gt0RNID/9RoI+J2rvXsBRPMV7p+ElHlPhcSARbCPDYcYG2s1TIzAfWv4YSgyY5taidWzzs31lNV3yQ==",
|
"integrity": "sha512-uc47g4b+4k/M/SeaW1y4OApx+mtLWl92l5LMPP0GNXctZqELk+YGgOPIIC5elYmUH4OuoK3JLhuRUYegeySiFA==",
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^16.4.5"
|
"dotenv": "^16.4.5"
|
||||||
},
|
},
|
||||||
|
|
@ -9767,7 +9768,8 @@
|
||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"node_modules/lodash.defaults": {
|
"node_modules/lodash.defaults": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { LeaveTypes, Prisma, PrismaClient } from "@prisma/client";
|
import { Prisma, PrismaClient } from "@prisma/client";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
|
|
||||||
|
|
@ -10,9 +10,11 @@ export class BankCodesResolver {
|
||||||
constructor(private readonly prisma: PrismaPostgresService) { }
|
constructor(private readonly prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
//find id and modifier by type
|
//find id and modifier by type
|
||||||
readonly findIdAndModifierByType = async (type: string, client?: Tx
|
readonly findIdAndModifierByType = async (
|
||||||
|
type: string,
|
||||||
|
client?: Tx
|
||||||
): Promise<Result<{ id: number; modifier: number }, string>> => {
|
): Promise<Result<{ id: number; modifier: number }, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const bank = await db.bankCodes.findFirst({
|
const bank = await db.bankCodes.findFirst({
|
||||||
where: { type },
|
where: { type },
|
||||||
select: { id: true, modifier: true },
|
select: { id: true, modifier: true },
|
||||||
|
|
@ -25,7 +27,7 @@ export class BankCodesResolver {
|
||||||
//finds only id by type
|
//finds only id by type
|
||||||
readonly findBankCodeIDByType = async (type: string, client?: Tx
|
readonly findBankCodeIDByType = async (type: string, client?: Tx
|
||||||
): Promise<Result<number, string>> => {
|
): Promise<Result<number, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const bank_code = await db.bankCodes.findFirst({
|
const bank_code = await db.bankCodes.findFirst({
|
||||||
where: { type },
|
where: { type },
|
||||||
select: { id: true },
|
select: { id: true },
|
||||||
|
|
@ -37,7 +39,7 @@ export class BankCodesResolver {
|
||||||
|
|
||||||
readonly findTypeByBankCodeId = async (bank_code_id: number, client?: Tx
|
readonly findTypeByBankCodeId = async (bank_code_id: number, client?: Tx
|
||||||
): Promise<Result<string, string>> => {
|
): Promise<Result<string, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const bank_code = await db.bankCodes.findFirst({
|
const bank_code = await db.bankCodes.findFirst({
|
||||||
where: { id: bank_code_id },
|
where: { id: bank_code_id },
|
||||||
select: { type: true },
|
select: { type: true },
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export class EmailToIdResolver {
|
||||||
// find employee_id using email
|
// find employee_id using email
|
||||||
readonly findIdByEmail = async (email: string, client?: Tx
|
readonly findIdByEmail = async (email: string, client?: Tx
|
||||||
): Promise<Result<number, string>> => {
|
): Promise<Result<number, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const employee = await db.employees.findFirst({
|
const employee = await db.employees.findFirst({
|
||||||
where: { user: { email } },
|
where: { user: { email } },
|
||||||
select: { id: true },
|
select: { id: true },
|
||||||
|
|
@ -25,7 +25,7 @@ export class EmailToIdResolver {
|
||||||
// find user_id using email
|
// find user_id using email
|
||||||
readonly resolveUserIdWithEmail = async (email: string, client?: Tx
|
readonly resolveUserIdWithEmail = async (email: string, client?: Tx
|
||||||
): Promise<Result<string, string>> => {
|
): Promise<Result<string, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const user = await db.users.findFirst({
|
const user = await db.users.findFirst({
|
||||||
where: { email },
|
where: { email },
|
||||||
select: { id: true },
|
select: { id: true },
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,17 @@ type Tx = Prisma.TransactionClient | PrismaClient;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FullNameResolver {
|
export class FullNameResolver {
|
||||||
constructor(private readonly prisma: PrismaPostgresService){}
|
constructor(private readonly prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
readonly resolveFullName = async (employee_id: number, client?: Tx): Promise<Result<string, string>> =>{
|
readonly resolveFullName = async (employee_id: number, client?: Tx): Promise<Result<string, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const employee = await db.employees.findUnique({
|
const employee = await db.employees.findUnique({
|
||||||
where: { id: employee_id },
|
where: { id: employee_id },
|
||||||
select: { user: { select: {first_name: true, last_name: true} } },
|
select: { user: { select: { first_name: true, last_name: true } } },
|
||||||
});
|
});
|
||||||
if(!employee) return { success: false, error: `INVALID_EMPLOYEE`}
|
if (!employee) return { success: false, error: `INVALID_EMPLOYEE` }
|
||||||
|
|
||||||
const full_name = ( employee.user.first_name + " " + employee.user.last_name ) || " ";
|
const full_name = (employee.user.first_name + " " + employee.user.last_name) || " ";
|
||||||
return {success: true, data: full_name };
|
return { success: true, data: full_name };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
export type Modules =
|
export type Modules =
|
||||||
| 'timesheets'
|
| 'timesheets'
|
||||||
| 'timesheets_approval'
|
| 'timesheets_approval'
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export class ShiftIdResolver {
|
||||||
|
|
||||||
readonly findShiftIdByData = async (key: ShiftKey, client?: Tx
|
readonly findShiftIdByData = async (key: ShiftKey, client?: Tx
|
||||||
): Promise<Result<number, string>> => {
|
): Promise<Result<number, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const shift = await db.shifts.findFirst({
|
const shift = await db.shifts.findFirst({
|
||||||
where: {
|
where: {
|
||||||
timesheet_id: key.timesheet_id,
|
timesheet_id: key.timesheet_id,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Prisma, PrismaClient } from "@prisma/client";
|
import { Prisma, PrismaClient } from "@prisma/client";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { EmailToIdResolver } from "./email-id.mapper";
|
import { EmailToIdResolver } from "./email-id.mapper";
|
||||||
|
|
@ -16,7 +16,7 @@ export class EmployeeTimesheetResolver {
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
readonly findTimesheetIdByEmail = async (email: string, date: Date, client?: Tx): Promise<Result<{ id: number }, string>> => {
|
readonly findTimesheetIdByEmail = async (email: string, date: Date, client?: Tx): Promise<Result<{ id: number }, string>> => {
|
||||||
const db = client ?? this.prisma;
|
const db = (client ?? this.prisma) as PrismaClient;
|
||||||
const employee_id = await this.emailResolver.findIdByEmail(email);
|
const employee_id = await this.emailResolver.findIdByEmail(email);
|
||||||
if (!employee_id.success) return { success: false, error: employee_id.error }
|
if (!employee_id.success) return { success: false, error: employee_id.error }
|
||||||
const start_date = weekStartSunday(date);
|
const start_date = weekStartSunday(date);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { Prisma, PrismaClient } from '@prisma/client';
|
import { Prisma, PrismaClient } from 'prisma/generated/postgres/client';
|
||||||
import { getWeekStart, getWeekEnd, computeHours } from 'src/common/utils/date-utils';
|
import { getWeekStart, getWeekEnd, computeHours } from 'src/common/utils/date-utils';
|
||||||
import { PrismaPostgresService } from 'prisma/postgres/prisma-postgres.service';
|
import { PrismaPostgresService } from 'prisma/postgres/prisma-postgres.service';
|
||||||
import { DAILY_LIMIT_HOURS, WEEKLY_LIMIT_HOURS } from 'src/common/utils/constants.utils';
|
import { DAILY_LIMIT_HOURS, WEEKLY_LIMIT_HOURS } from 'src/common/utils/constants.utils';
|
||||||
|
|
@ -32,7 +32,7 @@ export class OvertimeService {
|
||||||
constructor(private prisma: PrismaPostgresService) { }
|
constructor(private prisma: PrismaPostgresService) { }
|
||||||
|
|
||||||
async getWeekOvertimeSummary(timesheet_id: number, date: Date, tx?: Tx): Promise<Result<WeekOvertimeSummary, string>> {
|
async getWeekOvertimeSummary(timesheet_id: number, date: Date, tx?: Tx): Promise<Result<WeekOvertimeSummary, string>> {
|
||||||
const db = tx ?? this.prisma;
|
const db = (tx ?? this.prisma) as PrismaClient;
|
||||||
|
|
||||||
const week_start = getWeekStart(date);
|
const week_start = getWeekStart(date);
|
||||||
const week_end = getWeekEnd(week_start);
|
const week_end = getWeekEnd(week_start);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { getYearStart, roundToQuarterHour } from "src/common/utils/date-utils";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Injectable, Logger } from "@nestjs/common";
|
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SickLeaveService {
|
export class SickLeaveService {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { BadRequestException, Injectable, Logger, NotFoundException } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { Injectable } from "@nestjs/common";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper";
|
import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper";
|
||||||
import { ExpenseDto } from "src/time-and-attendance/expenses/expense-create.dto";
|
import { ExpenseDto } from "src/time-and-attendance/expenses/expense-create.dto";
|
||||||
import { Prisma } from "@prisma/client";
|
|
||||||
import { normalizeAndParseExpenseDto } from "src/time-and-attendance/expenses/expense.utils";
|
import { normalizeAndParseExpenseDto } from "src/time-and-attendance/expenses/expense.utils";
|
||||||
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
||||||
|
|
||||||
|
|
@ -43,7 +42,7 @@ export class ExpenseUpdateService {
|
||||||
if (!timesheet) return { success: false, error: `TIMESHEET_NOT_FOUND` }
|
if (!timesheet) return { success: false, error: `TIMESHEET_NOT_FOUND` }
|
||||||
|
|
||||||
//checks for modifications
|
//checks for modifications
|
||||||
const data: Prisma.ExpensesUpdateInput = {
|
const data = {
|
||||||
...normed_expense.data,
|
...normed_expense.data,
|
||||||
bank_code: { connect: { id: type.data } },
|
bank_code: { connect: { id: type.data } },
|
||||||
is_approved: dto.is_approved,
|
is_approved: dto.is_approved,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Controller, Get, Param, Query, Res } from "@nestjs/common";
|
import { Controller, Get, Param, Query, Res } from "@nestjs/common";
|
||||||
import { CsvExportService } from "./services/csv-exports.service";
|
import { CsvExportService } from "./services/csv-exports.service";
|
||||||
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
||||||
import { Modules as ModulesEnum } from ".prisma/client";
|
import { Modules as ModulesEnum } from "prisma/generated/postgres/client";
|
||||||
import { Response } from "express";
|
import { Response } from "express";
|
||||||
import { CsvGeneratorService } from "src/time-and-attendance/exports/services/csv-builder.service";
|
import { CsvGeneratorService } from "src/time-and-attendance/exports/services/csv-builder.service";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { IsEmail, IsArray, IsOptional, IsString, IsNumber, IsEnum, IsDateString } from "class-validator";
|
import { IsEmail, IsArray, IsOptional, IsString, IsNumber, IsEnum, IsDateString } from "class-validator";
|
||||||
import { LeaveApprovalStatus, LeaveTypes } from "@prisma/client";
|
import { LeaveApprovalStatus, LeaveTypes } from "prisma/generated/postgres/client";
|
||||||
import { Type } from "class-transformer";
|
import { Type } from "class-transformer";
|
||||||
|
|
||||||
//sets wich types to use
|
//sets wich types to use
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "prisma/generated/postgres/client";
|
||||||
import { LeaveRequestViewDto } from "src/time-and-attendance/leave-requests/leave-request.dto";
|
import { LeaveRequestViewDto } from "src/time-and-attendance/leave-requests/leave-request.dto";
|
||||||
import { LeaveRequestArchiveRow } from "src/time-and-attendance/leave-requests/utils/leave-requests-archive.select";
|
import { LeaveRequestArchiveRow } from "src/time-and-attendance/leave-requests/utils/leave-requests-archive.select";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// import { Prisma } from "@prisma/client";
|
// import { Prisma } from "prisma/generated/postgres/client";
|
||||||
// import { LeaveRequestViewDto } from "src/time-and-attendance/leave-requests/dtos/leave-request-view.dto";
|
// import { LeaveRequestViewDto } from "src/time-and-attendance/leave-requests/dtos/leave-request-view.dto";
|
||||||
// import { mapArchiveRowToView } from "src/time-and-attendance/leave-requests/mappers/leave-requests-archive.mapper";
|
// import { mapArchiveRowToView } from "src/time-and-attendance/leave-requests/mappers/leave-requests-archive.mapper";
|
||||||
// import { mapRowToView } from "src/time-and-attendance/leave-requests/mappers/leave-requests.mapper";
|
// import { mapRowToView } from "src/time-and-attendance/leave-requests/mappers/leave-requests.mapper";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
import { BadRequestException, Injectable } from "@nestjs/common";
|
import { BadRequestException, Injectable } from "@nestjs/common";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { LeaveTypes } from "@prisma/client";
|
import { LeaveTypes } from "prisma/generated/postgres/client";
|
||||||
import { toDateFromString, toStringFromDate } from "src/common/utils/date-utils";
|
import { toDateFromString, toStringFromDate } from "src/common/utils/date-utils";
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class LeaveRequestsUtils {
|
export class LeaveRequestsUtils {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
export const leaveRequestsArchiveSelect = {
|
export const leaveRequestsArchiveSelect = {
|
||||||
id: true,
|
id: true,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { PayPeriodsQueryService } from "./services/pay-periods-query.service";
|
||||||
import { PayPeriodsCommandService } from "./services/pay-periods-command.service";
|
import { PayPeriodsCommandService } from "./services/pay-periods-command.service";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
||||||
import { Modules as ModulesEnum } from ".prisma/client";
|
import { Modules as ModulesEnum } from "prisma/generated/postgres/client";
|
||||||
import { GetOverviewService } from "src/time-and-attendance/pay-period/services/pay-periods-build-overview.service";
|
import { GetOverviewService } from "src/time-and-attendance/pay-period/services/pay-periods-build-overview.service";
|
||||||
import { map, Observable } from "rxjs";
|
import { map, Observable } from "rxjs";
|
||||||
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { PayPeriods } from "@prisma/client";
|
import { PayPeriods } from "prisma/generated/postgres/client";
|
||||||
import { PayPeriodDto } from "src/time-and-attendance/pay-period/dtos/overview-pay-period.dto";
|
import { PayPeriodDto } from "src/time-and-attendance/pay-period/dtos/overview-pay-period.dto";
|
||||||
|
|
||||||
const toDateString = (date: Date) => date.toISOString().slice(0, 10); // "YYYY-MM-DD"
|
const toDateString = (date: Date) => date.toISOString().slice(0, 10); // "YYYY-MM-DD"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Prisma } from "@prisma/client";
|
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { computeHours, computePeriod, sevenDaysFrom, toDateFromString, toStringFromDate } from "src/common/utils/date-utils";
|
import { computeHours, computePeriod, toDateFromString, toStringFromDate } from "src/common/utils/date-utils";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { EmployeePeriodOverviewDto, Overview, PayPeriodOverviewDto } from "src/time-and-attendance/pay-period/dtos/overview-pay-period.dto";
|
import { EmployeePeriodOverviewDto, Overview, PayPeriodOverviewDto } from "src/time-and-attendance/pay-period/dtos/overview-pay-period.dto";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { Injectable } from "@nestjs/common";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
|
|
||||||
//change promise to return result pattern
|
//change promise to return result pattern
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Controller, Param, Body, Get, Post, ParseIntPipe, Delete, Patch } from "@nestjs/common";
|
import { Controller, Param, Body, Get, Post, Delete, Patch } from "@nestjs/common";
|
||||||
|
|
||||||
import { SchedulePresetsCreateService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-create.service";
|
import { SchedulePresetsCreateService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-create.service";
|
||||||
import { SchedulePresetUpdateService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-update.service";
|
import { SchedulePresetUpdateService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-update.service";
|
||||||
|
|
@ -7,7 +7,7 @@ import { SchedulePresetsGetService } from "src/time-and-attendance/schedule-pres
|
||||||
import { SchedulePresetsDto } from "src/time-and-attendance/schedule-presets/schedule-presets.dto";
|
import { SchedulePresetsDto } from "src/time-and-attendance/schedule-presets/schedule-presets.dto";
|
||||||
|
|
||||||
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
||||||
import { Modules as ModulesEnum } from ".prisma/client";
|
import { Modules as ModulesEnum } from "prisma/generated/postgres/client";
|
||||||
import { Access } from "src/common/decorators/module-access.decorators";
|
import { Access } from "src/common/decorators/module-access.decorators";
|
||||||
import { SchedulePresetsApplyService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service";
|
import { SchedulePresetsApplyService } from "src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Weekday } from "@prisma/client";
|
import { Weekday } from "prisma/generated/postgres/client";
|
||||||
import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsInt, IsOptional, IsString, Matches, Min } from "class-validator";
|
import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsInt, IsOptional, IsString, Matches} from "class-validator";
|
||||||
import { HH_MM_REGEX } from "src/common/utils/constants.utils";
|
import { HH_MM_REGEX } from "src/common/utils/constants.utils";
|
||||||
|
|
||||||
export class SchedulePresetsDto {
|
export class SchedulePresetsDto {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
|
|
||||||
import { is_same_week_day, sevenDaysFrom, toDateFromString, toStringFromDate, toStringFromHHmm } from "src/common/utils/date-utils";
|
import { sevenDaysFrom, toDateFromString, toStringFromDate, toStringFromHHmm } from "src/common/utils/date-utils";
|
||||||
import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper";
|
import { BankCodesResolver } from "src/common/mappers/bank-type-id.mapper";
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
|
|
@ -10,7 +10,7 @@ import { ShiftsCreateService } from "src/time-and-attendance/shifts/services/shi
|
||||||
import { timesheet_select } from "src/time-and-attendance/utils/selects.utils";
|
import { timesheet_select } from "src/time-and-attendance/utils/selects.utils";
|
||||||
import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto";
|
import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto";
|
||||||
import { WEEKDAY_MAP } from "src/time-and-attendance/schedule-presets/schedule-presets.dto";
|
import { WEEKDAY_MAP } from "src/time-and-attendance/schedule-presets/schedule-presets.dto";
|
||||||
import { $Enums, Prisma, SchedulePresetShifts } from "@prisma/client";
|
import { $Enums, SchedulePresetShifts } from "prisma/generated/postgres/client";
|
||||||
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import { BankedHoursService } from "src/time-and-attendance/domains/services/ban
|
||||||
import { SickLeaveService } from "src/time-and-attendance/domains/services/sick-leave.service";
|
import { SickLeaveService } from "src/time-and-attendance/domains/services/sick-leave.service";
|
||||||
import { paid_time_off_types } from "src/time-and-attendance/paid-time-off/paid-time-off.dto";
|
import { paid_time_off_types } from "src/time-and-attendance/paid-time-off/paid-time-off.dto";
|
||||||
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
||||||
import { Modules } from "@prisma/client";
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ShiftsCreateService {
|
export class ShiftsCreateService {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||||
import { computeHours } from "src/common/utils/date-utils";
|
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { PaidTimeOFfBankHoursService } from "src/time-and-attendance/paid-time-off/paid-time-off.service";
|
import { PaidTimeOFfBankHoursService } from "src/time-and-attendance/paid-time-off/paid-time-off.service";
|
||||||
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
import { PayPeriodEventService } from "src/time-and-attendance/pay-period/services/pay-period-event.service";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Body, Controller, Delete, Param, Patch, Post } from "@nestjs/common";
|
import { Body, Controller, Delete, Param, Patch, Post } from "@nestjs/common";
|
||||||
import { Modules as ModulesEnum } from ".prisma/client";
|
import { Modules as ModulesEnum } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto";
|
import { ShiftDto } from "src/time-and-attendance/shifts/shift.dto";
|
||||||
import { ShiftsCreateService } from "src/time-and-attendance/shifts/services/shifts-create.service";
|
import { ShiftsCreateService } from "src/time-and-attendance/shifts/services/shifts-create.service";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { BaseApprovalService } from "src/common/shared/base-approval.service";
|
import { BaseApprovalService } from "src/common/shared/base-approval.service";
|
||||||
import { Prisma, Timesheets } from "@prisma/client";
|
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
import { Injectable, NotFoundException } from "@nestjs/common";
|
||||||
import { timesheet_select } from "src/time-and-attendance/utils/selects.utils";
|
import { timesheet_select } from "src/time-and-attendance/utils/selects.utils";
|
||||||
|
import { Prisma, Timesheets } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TimesheetApprovalService extends BaseApprovalService<Timesheets>{
|
export class TimesheetApprovalService extends BaseApprovalService<Timesheets>{
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,9 @@ import { NUMBER_OF_TIMESHEETS_TO_RETURN } from "src/common/utils/constants.utils
|
||||||
import { Injectable } from "@nestjs/common";
|
import { Injectable } from "@nestjs/common";
|
||||||
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
import { PrismaPostgresService } from "prisma/postgres/prisma-postgres.service";
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||||
import { Timesheet, Timesheets } from "src/time-and-attendance/timesheets/timesheet.dto";
|
import { Timesheets } from "src/time-and-attendance/timesheets/timesheet.dto";
|
||||||
import { Result } from "src/common/errors/result-error.factory";
|
import { Result } from "src/common/errors/result-error.factory";
|
||||||
import { Prisma } from "@prisma/client";
|
import { toDateFromString } from "src/common/utils/date-utils";
|
||||||
import { toDateFromString, sevenDaysFrom, toStringFromDate, toHHmmFromDate } from "src/common/utils/date-utils";
|
|
||||||
import { mapOneTimesheet } from "src/time-and-attendance/timesheets/timesheet.mapper";
|
import { mapOneTimesheet } from "src/time-and-attendance/timesheets/timesheet.mapper";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Body, Controller, Get, Param, ParseBoolPipe, ParseIntPipe, Patch, Query, Req, UnauthorizedException } from "@nestjs/common";
|
import { Body, Controller, Get, Param, ParseBoolPipe, ParseIntPipe, Patch, Query } from "@nestjs/common";
|
||||||
import { GetTimesheetsOverviewService } from "src/time-and-attendance/timesheets/services/timesheet-employee-overview.service";
|
import { GetTimesheetsOverviewService } from "src/time-and-attendance/timesheets/services/timesheet-employee-overview.service";
|
||||||
import { TimesheetApprovalService } from "src/time-and-attendance/timesheets/services/timesheet-approval.service";
|
import { TimesheetApprovalService } from "src/time-and-attendance/timesheets/services/timesheet-approval.service";
|
||||||
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
import { ModuleAccessAllowed } from "src/common/decorators/modules-guard.decorators";
|
||||||
import { Modules as ModulesEnum } from ".prisma/client";
|
import { Modules as ModulesEnum } from "prisma/generated/postgres/client";
|
||||||
import { Access } from "src/common/decorators/module-access.decorators";
|
import { Access } from "src/common/decorators/module-access.decorators";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "prisma/generated/postgres/client";
|
||||||
import { toDateFromString, sevenDaysFrom, toStringFromDate, toHHmmFromDate } from "src/common/utils/date-utils";
|
import { toDateFromString, sevenDaysFrom, toStringFromDate, toHHmmFromDate } from "src/common/utils/date-utils";
|
||||||
import { Timesheet } from "src/time-and-attendance/timesheets/timesheet.dto";
|
import { Timesheet } from "src/time-and-attendance/timesheets/timesheet.dto";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
export const expense_select = {
|
export const expense_select = {
|
||||||
id: true,
|
id: true,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { LeaveTypes, Prisma } from "@prisma/client";
|
import { LeaveTypes, Prisma } from "prisma/generated/postgres/client";
|
||||||
|
|
||||||
export type Normalized = {
|
export type Normalized = {
|
||||||
date: Date;
|
date: Date;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,6 @@
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"strictBindCallApply": false,
|
"strictBindCallApply": false,
|
||||||
"noFallthroughCasesInSwitch": false
|
"noFallthroughCasesInSwitch": false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user