From 20cefb66fe1a68744473ec91ac0b7563f4a5cc76 Mon Sep 17 00:00:00 2001 From: Nic D Date: Mon, 16 Mar 2026 09:52:18 -0400 Subject: [PATCH] fix(timesheets): fix issue with expense amounts not tabulated properly --- .gitignore | 7 +- .../generated/prisma/client/postgres/enums.ts | 9 ++ .../prisma/client/postgres/internal/class.ts | 4 +- .../postgres/internal/prismaNamespace.ts | 19 ++- .../internal/prismaNamespaceBrowser.ts | 5 +- .../client/postgres/models/Employees.ts | 112 ++++++++++++++---- .../postgres/models/userModuleAccess.ts | 66 ++++++++++- .../timesheets/timesheet.mapper.ts | 4 +- 8 files changed, 195 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 621dc53..c7b7bb2 100644 --- a/.gitignore +++ b/.gitignore @@ -56,9 +56,8 @@ pids report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Generated prisma folders (from -> npm run prisma:generated) -/generated/prisma -/prisma/mariadb/generated/ -/prisma/postgres/generated/ -/prisma/prisma-legacy/generated/ +prisma/mariadb/generated/prisma/client/mariadb/ +prisma/postgres/generated/prisma/client/postgres/ +prisma/prisma-legacy/generated/prisma/client/legacy/ !swagger-spec.json diff --git a/prisma/postgres/generated/prisma/client/postgres/enums.ts b/prisma/postgres/generated/prisma/client/postgres/enums.ts index 8b2c871..e7a7389 100644 --- a/prisma/postgres/generated/prisma/client/postgres/enums.ts +++ b/prisma/postgres/generated/prisma/client/postgres/enums.ts @@ -89,3 +89,12 @@ export const Weekday = { } as const export type Weekday = (typeof Weekday)[keyof typeof Weekday] + + +export const ApplicableOvertime = { + DAILY: 'DAILY', + WEEKLY: 'WEEKLY', + PAYPERIOD: 'PAYPERIOD' +} as const + +export type ApplicableOvertime = (typeof ApplicableOvertime)[keyof typeof ApplicableOvertime] diff --git a/prisma/postgres/generated/prisma/client/postgres/internal/class.ts b/prisma/postgres/generated/prisma/client/postgres/internal/class.ts index 95e4244..92b536c 100644 --- a/prisma/postgres/generated/prisma/client/postgres/internal/class.ts +++ b/prisma/postgres/generated/prisma/client/postgres/internal/class.ts @@ -22,7 +22,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.3.0", "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735", "activeProvider": "postgresql", - "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated/prisma/client/postgres\"\n previewFeatures = [\"views\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Users {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n first_name String\n last_name String\n email String @unique\n phone_number String\n residence String?\n role Roles @default(EMPLOYEE)\n notifications Notifications? @relation(\"UserNotification\")\n employee Employees? @relation(\"UserEmployee\")\n oauth_sessions OAuthSessions[] @relation(\"UserOAuthSessions\")\n preferences Preferences? @relation(\"UserPreferences\")\n user_module_access userModuleAccess? @relation(\"UserModuleAccess\")\n\n @@map(\"users\")\n}\n\nmodel Notifications {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n affected_module Modules\n subject String\n description String\n metadata Json @db.JsonB\n created_at DateTime @default(now())\n viewed_at DateTime?\n user Users @relation(\"UserNotification\", fields: [user_id], references: [id])\n\n @@map(\"notifications\")\n}\n\nmodel userModuleAccess {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n timesheets Boolean @default(true)\n timesheets_approval Boolean @default(false)\n employee_list Boolean @default(true)\n employee_management Boolean @default(false)\n personal_profile Boolean @default(true)\n dashboard Boolean @default(true)\n chatbot Boolean @default(false)\n user Users @relation(\"UserModuleAccess\", fields: [user_id], references: [id])\n\n @@map(\"user_module_access\")\n}\n\nmodel Employees {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n external_payroll_id Int\n company_code Int\n daily_expected_hours Int\n first_work_day DateTime @db.Date\n last_work_day DateTime? @db.Date\n supervisor_id Int?\n job_title String?\n is_supervisor Boolean @default(false)\n // banked_hour_limit Int @default(0) //will need to be implemented in the future\n schedule_preset_id Int?\n schedule_preset SchedulePresets? @relation(\"EmployeesSchedulePreset\", fields: [schedule_preset_id], references: [id])\n supervisor Employees? @relation(\"EmployeeSupervisor\", fields: [supervisor_id], references: [id])\n crew Employees[] @relation(\"EmployeeSupervisor\")\n user Users @relation(\"UserEmployee\", fields: [user_id], references: [id])\n leave_request LeaveRequests[] @relation(\"LeaveRequestEmployee\")\n timesheet Timesheets[] @relation(\"TimesheetEmployee\")\n paid_time_off PaidTimeOff? @relation(\"EmployeePaidTimeOff\")\n\n @@map(\"employees\")\n}\n\nmodel LeaveRequests {\n id Int @id @default(autoincrement())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus @default(PENDING)\n bank_code_id Int\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n dates DateTime[] @db.Date\n bank_code BankCodes @relation(\"LeaveRequestBankCodes\", fields: [bank_code_id], references: [id])\n employee Employees @relation(\"LeaveRequestEmployee\", fields: [employee_id], references: [id])\n archive LeaveRequestsArchive? @relation(\"LeaveRequestToArchive\")\n\n @@unique([employee_id, leave_type, dates], name: \"leave_per_employee_date\")\n @@index([employee_id, dates])\n @@map(\"leave_requests\")\n}\n\nmodel LeaveRequestsArchive {\n id Int @id @default(autoincrement())\n leave_request_id Int @unique\n archived_at DateTime @default(now())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus\n date DateTime @db.Date\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n leave_request LeaveRequests @relation(\"LeaveRequestToArchive\", fields: [leave_request_id], references: [id])\n\n @@index([employee_id, date])\n @@map(\"leave_requests_archive\")\n}\n\nmodel Timesheets {\n id Int @id @default(autoincrement())\n employee_id Int\n is_approved Boolean @default(false)\n start_date DateTime @db.Date\n // hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future\n expense Expenses[] @relation(\"ExpensesTimesheet\")\n shift Shifts[] @relation(\"ShiftTimesheet\")\n employee Employees @relation(\"TimesheetEmployee\", fields: [employee_id], references: [id])\n archive TimesheetsArchive[] @relation(\"TimesheetsToArchive\")\n\n // @@unique([employee_id, start_date], name: \"employee_id_start_date\")\n @@map(\"timesheets\")\n}\n\nmodel TimesheetsArchive {\n id Int @id @default(autoincrement())\n timesheet_id Int\n archive_at DateTime @default(now())\n employee_id Int\n is_approved Boolean\n timesheet Timesheets @relation(\"TimesheetsToArchive\", fields: [timesheet_id], references: [id])\n\n @@map(\"timesheets_archive\")\n}\n\nmodel SchedulePresets {\n id Int @id @default(autoincrement())\n name String\n is_default Boolean @default(false)\n employees Employees[] @relation(\"EmployeesSchedulePreset\")\n shifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsSchedulePreset\")\n\n @@map(\"schedule_presets\")\n}\n\nmodel SchedulePresetShifts {\n id Int @id @default(autoincrement())\n preset_id Int\n bank_code_id Int\n\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n is_remote Boolean @default(false)\n week_day Weekday\n bank_code BankCodes @relation(\"SchedulePresetShiftsBankCodes\", fields: [bank_code_id], references: [id])\n preset SchedulePresets @relation(\"SchedulePresetShiftsSchedulePreset\", fields: [preset_id], references: [id])\n\n @@index([preset_id, week_day])\n @@map(\"schedule_preset_shifts\")\n}\n\nmodel Shifts {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n is_approved Boolean @default(false)\n is_remote Boolean @default(false)\n comment String?\n bank_code BankCodes @relation(\"ShiftBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ShiftTimesheet\", fields: [timesheet_id], references: [id])\n archive ShiftsArchive[] @relation(\"ShiftsToArchive\")\n\n // @@unique([timesheet_id, date, start_time], name: \"unique_ts_id_date_start_time\")\n @@map(\"shifts\")\n}\n\nmodel ShiftsArchive {\n id Int @id @default(autoincrement())\n shift_id Int\n archive_at DateTime @default(now())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n comment String?\n shift Shifts @relation(\"ShiftsToArchive\", fields: [shift_id], references: [id])\n\n @@map(\"shifts_archive\")\n}\n\nmodel BankCodes {\n id Int @id @default(autoincrement())\n type String\n categorie String\n modifier Float\n bank_code String\n expenses Expenses[] @relation(\"ExpenseBankCodes\")\n leaveRequests LeaveRequests[] @relation(\"LeaveRequestBankCodes\")\n SchedulePresetShifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsBankCodes\")\n shifts Shifts[] @relation(\"ShiftBankCodes\")\n\n @@map(\"bank_codes\")\n}\n\nmodel Expenses {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean @default(false)\n supervisor_comment String?\n bank_code_id Int\n comment String\n attachment_key String?\n attachment_name String?\n mileage Decimal? @db.Decimal(12, 2)\n bank_code BankCodes @relation(\"ExpenseBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ExpensesTimesheet\", fields: [timesheet_id], references: [id])\n archive ExpensesArchive[] @relation(\"ExpensesToArchive\")\n\n @@unique([timesheet_id, date, amount, mileage], name: \"unique_ts_id_date_amount_mileage\")\n @@map(\"expenses\")\n}\n\nmodel ExpensesArchive {\n id Int @id @default(autoincrement())\n expense_id Int\n timesheet_id Int\n archived_at DateTime @default(now())\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean\n supervisor_comment String?\n bank_code_id Int\n comment String?\n mileage Decimal? @db.Decimal(12, 2)\n expense Expenses @relation(\"ExpensesToArchive\", fields: [expense_id], references: [id])\n\n @@map(\"expenses_archive\")\n}\n\nmodel OAuthSessions {\n id String @id @default(cuid())\n user_id String @db.Uuid\n application String\n access_token String @unique\n refresh_token String @unique\n access_token_expiry DateTime\n refresh_token_expiry DateTime?\n is_revoked Boolean @default(false)\n scopes Json @default(\"[]\")\n created_at DateTime @default(now())\n updated_at DateTime?\n sid String @unique\n user Users @relation(\"UserOAuthSessions\", fields: [user_id], references: [id])\n\n @@map(\"oauth_sessions\")\n}\n\nmodel Sessions {\n id String @id\n sid String @unique\n data String\n expiresAt DateTime\n\n @@map(\"sessions\")\n}\n\nmodel Preferences {\n user_id String @unique @db.Uuid\n id Int @id @default(autoincrement())\n display_language String @default(\"fr-FR\")\n is_dark_mode Boolean? @default(false)\n is_employee_list_grid Boolean @default(true)\n is_lefty_mode Boolean @default(false)\n is_timesheet_approval_grid Boolean @default(true)\n notifications Boolean @default(true)\n user Users @relation(\"UserPreferences\", fields: [user_id], references: [id])\n\n @@map(\"preferences\")\n}\n\nmodel PaidTimeOff {\n id Int @id @default(autoincrement())\n employee_id Int @unique\n vacation_hours Decimal @default(0) @db.Decimal(12, 2)\n banked_hours Decimal @default(0) @db.Decimal(12, 2)\n sick_hours Decimal @default(0) @db.Decimal(12, 2)\n last_updated DateTime? @db.Date\n\n employee Employees @relation(\"EmployeePaidTimeOff\", fields: [employee_id], references: [id])\n\n @@map(\"paid_time_off\")\n}\n\nview PayPeriods {\n pay_year Int\n pay_period_no Int\n period_start DateTime @db.Date\n period_end DateTime @db.Date\n payday DateTime @db.Date\n label String\n\n @@map(\"pay_period\")\n}\n\nenum AttachmentStatus {\n ACTIVE\n DELETED\n}\n\nenum RetentionPolicy {\n EXPENSE_7Y\n TICKET_2Y\n PROFILE_KEEP_LAST3\n}\n\nenum Roles {\n ADMIN\n SUPERVISOR\n HR\n ACCOUNTING\n EMPLOYEE\n DEALER\n CUSTOMER\n GUEST\n\n @@map(\"roles\")\n}\n\nenum Modules {\n timesheets\n timesheets_approval\n employee_list\n employee_management\n personal_profile\n dashboard\n chatbot\n\n @@map(\"modules\")\n}\n\nenum LeaveTypes {\n SICK\n VACATION\n UNPAID\n BEREAVEMENT\n PARENTAL\n LEGAL\n WEDDING\n HOLIDAY\n\n @@map(\"leave_types\")\n}\n\nenum LeaveApprovalStatus {\n PENDING\n APPROVED\n DENIED\n CANCELLED\n ESCALATED\n\n @@map(\"leave_approval_status\")\n}\n\nenum Weekday {\n SUN\n MON\n TUE\n WED\n THU\n FRI\n SAT\n}\n", + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated/prisma/client/postgres\"\n previewFeatures = [\"views\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Users {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n first_name String\n last_name String\n email String @unique\n phone_number String\n residence String?\n role Roles @default(EMPLOYEE)\n notifications Notifications? @relation(\"UserNotification\")\n employee Employees? @relation(\"UserEmployee\")\n oauth_sessions OAuthSessions[] @relation(\"UserOAuthSessions\")\n preferences Preferences? @relation(\"UserPreferences\")\n user_module_access userModuleAccess? @relation(\"UserModuleAccess\")\n\n @@map(\"users\")\n}\n\nmodel Notifications {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n affected_module Modules\n subject String\n description String\n metadata Json @db.JsonB\n created_at DateTime @default(now())\n viewed_at DateTime?\n user Users @relation(\"UserNotification\", fields: [user_id], references: [id])\n\n @@map(\"notifications\")\n}\n\nmodel userModuleAccess {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n timesheets Boolean @default(true)\n timesheets_approval Boolean @default(false)\n employee_list Boolean @default(true)\n employee_management Boolean @default(false)\n personal_profile Boolean @default(true)\n dashboard Boolean @default(true)\n chatbot Boolean @default(false)\n ticket Boolean @default(false)\n ticket_management Boolean @default(false)\n user Users @relation(\"UserModuleAccess\", fields: [user_id], references: [id])\n\n @@map(\"user_module_access\")\n}\n\nmodel Employees {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n external_payroll_id Int\n company_code Int\n daily_expected_hours Int @default(24)\n first_work_day DateTime @db.Date\n last_work_day DateTime? @db.Date\n supervisor_id Int?\n job_title String?\n is_supervisor Boolean @default(false)\n applicable_overtime ApplicableOvertime[] @default([WEEKLY])\n schedule_preset_id Int?\n schedule_preset SchedulePresets? @relation(\"EmployeesSchedulePreset\", fields: [schedule_preset_id], references: [id])\n supervisor Employees? @relation(\"EmployeeSupervisor\", fields: [supervisor_id], references: [id])\n crew Employees[] @relation(\"EmployeeSupervisor\")\n user Users @relation(\"UserEmployee\", fields: [user_id], references: [id])\n leave_request LeaveRequests[] @relation(\"LeaveRequestEmployee\")\n timesheet Timesheets[] @relation(\"TimesheetEmployee\")\n paid_time_off PaidTimeOff? @relation(\"EmployeePaidTimeOff\")\n\n @@map(\"employees\")\n}\n\nmodel LeaveRequests {\n id Int @id @default(autoincrement())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus @default(PENDING)\n bank_code_id Int\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n dates DateTime[] @db.Date\n bank_code BankCodes @relation(\"LeaveRequestBankCodes\", fields: [bank_code_id], references: [id])\n employee Employees @relation(\"LeaveRequestEmployee\", fields: [employee_id], references: [id])\n archive LeaveRequestsArchive? @relation(\"LeaveRequestToArchive\")\n\n @@unique([employee_id, leave_type, dates], name: \"leave_per_employee_date\")\n @@index([employee_id, dates])\n @@map(\"leave_requests\")\n}\n\nmodel LeaveRequestsArchive {\n id Int @id @default(autoincrement())\n leave_request_id Int @unique\n archived_at DateTime @default(now())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus\n date DateTime @db.Date\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n leave_request LeaveRequests @relation(\"LeaveRequestToArchive\", fields: [leave_request_id], references: [id])\n\n @@index([employee_id, date])\n @@map(\"leave_requests_archive\")\n}\n\nmodel Timesheets {\n id Int @id @default(autoincrement())\n employee_id Int\n is_approved Boolean @default(false)\n start_date DateTime @db.Date\n // hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future\n expense Expenses[] @relation(\"ExpensesTimesheet\")\n shift Shifts[] @relation(\"ShiftTimesheet\")\n employee Employees @relation(\"TimesheetEmployee\", fields: [employee_id], references: [id])\n archive TimesheetsArchive[] @relation(\"TimesheetsToArchive\")\n\n // @@unique([employee_id, start_date], name: \"employee_id_start_date\")\n @@map(\"timesheets\")\n}\n\nmodel TimesheetsArchive {\n id Int @id @default(autoincrement())\n timesheet_id Int\n archive_at DateTime @default(now())\n employee_id Int\n is_approved Boolean\n timesheet Timesheets @relation(\"TimesheetsToArchive\", fields: [timesheet_id], references: [id])\n\n @@map(\"timesheets_archive\")\n}\n\nmodel SchedulePresets {\n id Int @id @default(autoincrement())\n name String\n is_default Boolean @default(false)\n employees Employees[] @relation(\"EmployeesSchedulePreset\")\n shifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsSchedulePreset\")\n\n @@map(\"schedule_presets\")\n}\n\nmodel SchedulePresetShifts {\n id Int @id @default(autoincrement())\n preset_id Int\n bank_code_id Int\n\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n is_remote Boolean @default(false)\n week_day Weekday\n bank_code BankCodes @relation(\"SchedulePresetShiftsBankCodes\", fields: [bank_code_id], references: [id])\n preset SchedulePresets @relation(\"SchedulePresetShiftsSchedulePreset\", fields: [preset_id], references: [id])\n\n @@index([preset_id, week_day])\n @@map(\"schedule_preset_shifts\")\n}\n\nmodel Shifts {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n is_approved Boolean @default(false)\n is_remote Boolean @default(false)\n comment String?\n bank_code BankCodes @relation(\"ShiftBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ShiftTimesheet\", fields: [timesheet_id], references: [id])\n archive ShiftsArchive[] @relation(\"ShiftsToArchive\")\n\n // @@unique([timesheet_id, date, start_time], name: \"unique_ts_id_date_start_time\")\n @@map(\"shifts\")\n}\n\nmodel ShiftsArchive {\n id Int @id @default(autoincrement())\n shift_id Int\n archive_at DateTime @default(now())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n comment String?\n shift Shifts @relation(\"ShiftsToArchive\", fields: [shift_id], references: [id])\n\n @@map(\"shifts_archive\")\n}\n\nmodel BankCodes {\n id Int @id @default(autoincrement())\n type String\n categorie String\n modifier Float\n bank_code String\n expenses Expenses[] @relation(\"ExpenseBankCodes\")\n leaveRequests LeaveRequests[] @relation(\"LeaveRequestBankCodes\")\n SchedulePresetShifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsBankCodes\")\n shifts Shifts[] @relation(\"ShiftBankCodes\")\n\n @@map(\"bank_codes\")\n}\n\nmodel Expenses {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean @default(false)\n supervisor_comment String?\n bank_code_id Int\n comment String\n attachment_key String?\n attachment_name String?\n mileage Decimal? @db.Decimal(12, 2)\n bank_code BankCodes @relation(\"ExpenseBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ExpensesTimesheet\", fields: [timesheet_id], references: [id])\n archive ExpensesArchive[] @relation(\"ExpensesToArchive\")\n\n @@unique([timesheet_id, date, amount, mileage], name: \"unique_ts_id_date_amount_mileage\")\n @@map(\"expenses\")\n}\n\nmodel ExpensesArchive {\n id Int @id @default(autoincrement())\n expense_id Int\n timesheet_id Int\n archived_at DateTime @default(now())\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean\n supervisor_comment String?\n bank_code_id Int\n comment String?\n mileage Decimal? @db.Decimal(12, 2)\n expense Expenses @relation(\"ExpensesToArchive\", fields: [expense_id], references: [id])\n\n @@map(\"expenses_archive\")\n}\n\nmodel OAuthSessions {\n id String @id @default(cuid())\n user_id String @db.Uuid\n application String\n access_token String @unique\n refresh_token String @unique\n access_token_expiry DateTime\n refresh_token_expiry DateTime?\n is_revoked Boolean @default(false)\n scopes Json @default(\"[]\")\n created_at DateTime @default(now())\n updated_at DateTime?\n sid String @unique\n user Users @relation(\"UserOAuthSessions\", fields: [user_id], references: [id])\n\n @@map(\"oauth_sessions\")\n}\n\nmodel Sessions {\n id String @id\n sid String @unique\n data String\n expiresAt DateTime\n\n @@map(\"sessions\")\n}\n\nmodel Preferences {\n user_id String @unique @db.Uuid\n id Int @id @default(autoincrement())\n display_language String @default(\"fr-FR\")\n is_dark_mode Boolean? @default(false)\n is_employee_list_grid Boolean @default(true)\n is_lefty_mode Boolean @default(false)\n is_timesheet_approval_grid Boolean @default(true)\n notifications Boolean @default(true)\n user Users @relation(\"UserPreferences\", fields: [user_id], references: [id])\n\n @@map(\"preferences\")\n}\n\nmodel PaidTimeOff {\n id Int @id @default(autoincrement())\n employee_id Int @unique\n vacation_hours Decimal @default(0) @db.Decimal(12, 2)\n banked_hours Decimal @default(0) @db.Decimal(12, 2)\n sick_hours Decimal @default(0) @db.Decimal(12, 2)\n last_updated DateTime? @db.Date\n\n employee Employees @relation(\"EmployeePaidTimeOff\", fields: [employee_id], references: [id])\n\n @@map(\"paid_time_off\")\n}\n\nview PayPeriods {\n pay_year Int\n pay_period_no Int\n period_start DateTime @db.Date\n period_end DateTime @db.Date\n payday DateTime @db.Date\n label String\n\n @@map(\"pay_period\")\n}\n\nenum AttachmentStatus {\n ACTIVE\n DELETED\n}\n\nenum RetentionPolicy {\n EXPENSE_7Y\n TICKET_2Y\n PROFILE_KEEP_LAST3\n}\n\nenum Roles {\n ADMIN\n SUPERVISOR\n HR\n ACCOUNTING\n EMPLOYEE\n DEALER\n CUSTOMER\n GUEST\n\n @@map(\"roles\")\n}\n\nenum Modules {\n timesheets\n timesheets_approval\n employee_list\n employee_management\n personal_profile\n dashboard\n chatbot\n\n @@map(\"modules\")\n}\n\nenum LeaveTypes {\n SICK\n VACATION\n UNPAID\n BEREAVEMENT\n PARENTAL\n LEGAL\n WEDDING\n HOLIDAY\n\n @@map(\"leave_types\")\n}\n\nenum LeaveApprovalStatus {\n PENDING\n APPROVED\n DENIED\n CANCELLED\n ESCALATED\n\n @@map(\"leave_approval_status\")\n}\n\nenum Weekday {\n SUN\n MON\n TUE\n WED\n THU\n FRI\n SAT\n}\n\nenum ApplicableOvertime {\n DAILY\n WEEKLY\n PAYPERIOD\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -30,7 +30,7 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"Users\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"residence\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Roles\"},{\"name\":\"notifications\",\"kind\":\"object\",\"type\":\"Notifications\",\"relationName\":\"UserNotification\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"UserEmployee\"},{\"name\":\"oauth_sessions\",\"kind\":\"object\",\"type\":\"OAuthSessions\",\"relationName\":\"UserOAuthSessions\"},{\"name\":\"preferences\",\"kind\":\"object\",\"type\":\"Preferences\",\"relationName\":\"UserPreferences\"},{\"name\":\"user_module_access\",\"kind\":\"object\",\"type\":\"userModuleAccess\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"users\"},\"Notifications\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"affected_module\",\"kind\":\"enum\",\"type\":\"Modules\"},{\"name\":\"subject\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"viewed_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserNotification\"}],\"dbName\":\"notifications\"},\"userModuleAccess\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timesheets\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheets_approval\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_list\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_management\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"personal_profile\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"dashboard\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"chatbot\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"user_module_access\"},\"Employees\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"external_payroll_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"company_code\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"daily_expected_hours\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"first_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"last_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"supervisor_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"job_title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_supervisor\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"schedule_preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"schedule_preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"crew\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserEmployee\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"paid_time_off\",\"kind\":\"object\",\"type\":\"PaidTimeOff\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"employees\"},\"LeaveRequests\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"dates\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"LeaveRequestsArchive\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests\"},\"LeaveRequestsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_request_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests_archive\"},\"Timesheets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"start_date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"TimesheetsArchive\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets\"},\"TimesheetsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets_archive\"},\"SchedulePresets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_default\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employees\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_presets\"},\"SchedulePresetShifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"week_day\",\"kind\":\"enum\",\"type\":\"Weekday\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_preset_shifts\"},\"Shifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ShiftBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ShiftsArchive\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts\"},\"ShiftsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"shift_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts_archive\"},\"BankCodes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"categorie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"modifier\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"bank_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expenses\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"leaveRequests\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"SchedulePresetShifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftBankCodes\"}],\"dbName\":\"bank_codes\"},\"Expenses\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment_key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ExpensesArchive\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses\"},\"ExpensesArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expense_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses_archive\"},\"OAuthSessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"application\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"refresh_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_revoked\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"scopes\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserOAuthSessions\"}],\"dbName\":\"oauth_sessions\"},\"Sessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"sessions\"},\"Preferences\":{\"fields\":[{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"display_language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_dark_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_employee_list_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_lefty_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_timesheet_approval_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"notifications\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserPreferences\"}],\"dbName\":\"preferences\"},\"PaidTimeOff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vacation_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"banked_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"sick_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"paid_time_off\"},\"PayPeriods\":{\"fields\":[{\"name\":\"pay_year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pay_period_no\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"period_start\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"period_end\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payday\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"label\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"pay_period\"}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"Users\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"residence\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Roles\"},{\"name\":\"notifications\",\"kind\":\"object\",\"type\":\"Notifications\",\"relationName\":\"UserNotification\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"UserEmployee\"},{\"name\":\"oauth_sessions\",\"kind\":\"object\",\"type\":\"OAuthSessions\",\"relationName\":\"UserOAuthSessions\"},{\"name\":\"preferences\",\"kind\":\"object\",\"type\":\"Preferences\",\"relationName\":\"UserPreferences\"},{\"name\":\"user_module_access\",\"kind\":\"object\",\"type\":\"userModuleAccess\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"users\"},\"Notifications\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"affected_module\",\"kind\":\"enum\",\"type\":\"Modules\"},{\"name\":\"subject\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"viewed_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserNotification\"}],\"dbName\":\"notifications\"},\"userModuleAccess\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timesheets\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheets_approval\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_list\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_management\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"personal_profile\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"dashboard\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"chatbot\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ticket\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"ticket_management\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"user_module_access\"},\"Employees\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"external_payroll_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"company_code\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"daily_expected_hours\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"first_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"last_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"supervisor_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"job_title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_supervisor\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"applicable_overtime\",\"kind\":\"enum\",\"type\":\"ApplicableOvertime\"},{\"name\":\"schedule_preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"schedule_preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"crew\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserEmployee\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"paid_time_off\",\"kind\":\"object\",\"type\":\"PaidTimeOff\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"employees\"},\"LeaveRequests\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"dates\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"LeaveRequestsArchive\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests\"},\"LeaveRequestsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_request_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests_archive\"},\"Timesheets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"start_date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"TimesheetsArchive\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets\"},\"TimesheetsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets_archive\"},\"SchedulePresets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_default\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employees\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_presets\"},\"SchedulePresetShifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"week_day\",\"kind\":\"enum\",\"type\":\"Weekday\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_preset_shifts\"},\"Shifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ShiftBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ShiftsArchive\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts\"},\"ShiftsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"shift_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts_archive\"},\"BankCodes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"categorie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"modifier\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"bank_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expenses\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"leaveRequests\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"SchedulePresetShifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftBankCodes\"}],\"dbName\":\"bank_codes\"},\"Expenses\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment_key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ExpensesArchive\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses\"},\"ExpensesArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expense_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses_archive\"},\"OAuthSessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"application\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"refresh_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_revoked\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"scopes\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserOAuthSessions\"}],\"dbName\":\"oauth_sessions\"},\"Sessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"sessions\"},\"Preferences\":{\"fields\":[{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"display_language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_dark_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_employee_list_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_lefty_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_timesheet_approval_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"notifications\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserPreferences\"}],\"dbName\":\"preferences\"},\"PaidTimeOff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vacation_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"banked_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"sick_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"paid_time_off\"},\"PayPeriods\":{\"fields\":[{\"name\":\"pay_year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pay_period_no\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"period_start\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"period_end\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payday\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"label\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"pay_period\"}},\"enums\":{},\"types\":{}}") async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') diff --git a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts index 54415b3..ed339c9 100644 --- a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts +++ b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts @@ -1934,7 +1934,9 @@ export const UserModuleAccessScalarFieldEnum = { employee_management: 'employee_management', personal_profile: 'personal_profile', dashboard: 'dashboard', - chatbot: 'chatbot' + chatbot: 'chatbot', + ticket: 'ticket', + ticket_management: 'ticket_management' } as const export type UserModuleAccessScalarFieldEnum = (typeof UserModuleAccessScalarFieldEnum)[keyof typeof UserModuleAccessScalarFieldEnum] @@ -1951,6 +1953,7 @@ export const EmployeesScalarFieldEnum = { supervisor_id: 'supervisor_id', job_title: 'job_title', is_supervisor: 'is_supervisor', + applicable_overtime: 'applicable_overtime', schedule_preset_id: 'schedule_preset_id' } as const @@ -2309,6 +2312,20 @@ export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, +/** + * Reference to a field of type 'ApplicableOvertime[]' + */ +export type ListEnumApplicableOvertimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ApplicableOvertime[]'> + + + +/** + * Reference to a field of type 'ApplicableOvertime' + */ +export type EnumApplicableOvertimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ApplicableOvertime'> + + + /** * Reference to a field of type 'LeaveTypes' */ diff --git a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts index fe9bbc0..41c3b57 100644 --- a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts +++ b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts @@ -125,7 +125,9 @@ export const UserModuleAccessScalarFieldEnum = { employee_management: 'employee_management', personal_profile: 'personal_profile', dashboard: 'dashboard', - chatbot: 'chatbot' + chatbot: 'chatbot', + ticket: 'ticket', + ticket_management: 'ticket_management' } as const export type UserModuleAccessScalarFieldEnum = (typeof UserModuleAccessScalarFieldEnum)[keyof typeof UserModuleAccessScalarFieldEnum] @@ -142,6 +144,7 @@ export const EmployeesScalarFieldEnum = { supervisor_id: 'supervisor_id', job_title: 'job_title', is_supervisor: 'is_supervisor', + applicable_overtime: 'applicable_overtime', schedule_preset_id: 'schedule_preset_id' } as const diff --git a/prisma/postgres/generated/prisma/client/postgres/models/Employees.ts b/prisma/postgres/generated/prisma/client/postgres/models/Employees.ts index 4a98d40..86b45a8 100644 --- a/prisma/postgres/generated/prisma/client/postgres/models/Employees.ts +++ b/prisma/postgres/generated/prisma/client/postgres/models/Employees.ts @@ -83,6 +83,7 @@ export type EmployeesCountAggregateOutputType = { supervisor_id: number job_title: number is_supervisor: number + applicable_overtime: number schedule_preset_id: number _all: number } @@ -145,6 +146,7 @@ export type EmployeesCountAggregateInputType = { supervisor_id?: true job_title?: true is_supervisor?: true + applicable_overtime?: true schedule_preset_id?: true _all?: true } @@ -246,6 +248,7 @@ export type EmployeesGroupByOutputType = { supervisor_id: number | null job_title: string | null is_supervisor: boolean + applicable_overtime: $Enums.ApplicableOvertime[] schedule_preset_id: number | null _count: EmployeesCountAggregateOutputType | null _avg: EmployeesAvgAggregateOutputType | null @@ -283,6 +286,7 @@ export type EmployeesWhereInput = { supervisor_id?: Prisma.IntNullableFilter<"Employees"> | number | null job_title?: Prisma.StringNullableFilter<"Employees"> | string | null is_supervisor?: Prisma.BoolFilter<"Employees"> | boolean + applicable_overtime?: Prisma.EnumApplicableOvertimeNullableListFilter<"Employees"> schedule_preset_id?: Prisma.IntNullableFilter<"Employees"> | number | null schedule_preset?: Prisma.XOR | null supervisor?: Prisma.XOR | null @@ -304,6 +308,7 @@ export type EmployeesOrderByWithRelationInput = { supervisor_id?: Prisma.SortOrderInput | Prisma.SortOrder job_title?: Prisma.SortOrderInput | Prisma.SortOrder is_supervisor?: Prisma.SortOrder + applicable_overtime?: Prisma.SortOrder schedule_preset_id?: Prisma.SortOrderInput | Prisma.SortOrder schedule_preset?: Prisma.SchedulePresetsOrderByWithRelationInput supervisor?: Prisma.EmployeesOrderByWithRelationInput @@ -328,6 +333,7 @@ export type EmployeesWhereUniqueInput = Prisma.AtLeast<{ supervisor_id?: Prisma.IntNullableFilter<"Employees"> | number | null job_title?: Prisma.StringNullableFilter<"Employees"> | string | null is_supervisor?: Prisma.BoolFilter<"Employees"> | boolean + applicable_overtime?: Prisma.EnumApplicableOvertimeNullableListFilter<"Employees"> schedule_preset_id?: Prisma.IntNullableFilter<"Employees"> | number | null schedule_preset?: Prisma.XOR | null supervisor?: Prisma.XOR | null @@ -349,6 +355,7 @@ export type EmployeesOrderByWithAggregationInput = { supervisor_id?: Prisma.SortOrderInput | Prisma.SortOrder job_title?: Prisma.SortOrderInput | Prisma.SortOrder is_supervisor?: Prisma.SortOrder + applicable_overtime?: Prisma.SortOrder schedule_preset_id?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.EmployeesCountOrderByAggregateInput _avg?: Prisma.EmployeesAvgOrderByAggregateInput @@ -371,17 +378,19 @@ export type EmployeesScalarWhereWithAggregatesInput = { supervisor_id?: Prisma.IntNullableWithAggregatesFilter<"Employees"> | number | null job_title?: Prisma.StringNullableWithAggregatesFilter<"Employees"> | string | null is_supervisor?: Prisma.BoolWithAggregatesFilter<"Employees"> | boolean + applicable_overtime?: Prisma.EnumApplicableOvertimeNullableListFilter<"Employees"> schedule_preset_id?: Prisma.IntNullableWithAggregatesFilter<"Employees"> | number | null } export type EmployeesCreateInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput @@ -396,12 +405,13 @@ export type EmployeesUncheckedCreateInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput @@ -417,6 +427,7 @@ export type EmployeesUpdateInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput @@ -437,6 +448,7 @@ export type EmployeesUncheckedUpdateInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -449,12 +461,13 @@ export type EmployeesCreateManyInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null } @@ -466,6 +479,7 @@ export type EmployeesUpdateManyMutationInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] } export type EmployeesUncheckedUpdateManyInput = { @@ -479,6 +493,7 @@ export type EmployeesUncheckedUpdateManyInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null } @@ -487,6 +502,14 @@ export type EmployeesNullableScalarRelationFilter = { isNot?: Prisma.EmployeesWhereInput | null } +export type EnumApplicableOvertimeNullableListFilter<$PrismaModel = never> = { + equals?: $Enums.ApplicableOvertime[] | Prisma.ListEnumApplicableOvertimeFieldRefInput<$PrismaModel> | null + has?: $Enums.ApplicableOvertime | Prisma.EnumApplicableOvertimeFieldRefInput<$PrismaModel> | null + hasEvery?: $Enums.ApplicableOvertime[] | Prisma.ListEnumApplicableOvertimeFieldRefInput<$PrismaModel> + hasSome?: $Enums.ApplicableOvertime[] | Prisma.ListEnumApplicableOvertimeFieldRefInput<$PrismaModel> + isEmpty?: boolean +} + export type EmployeesListRelationFilter = { every?: Prisma.EmployeesWhereInput some?: Prisma.EmployeesWhereInput @@ -508,6 +531,7 @@ export type EmployeesCountOrderByAggregateInput = { supervisor_id?: Prisma.SortOrder job_title?: Prisma.SortOrder is_supervisor?: Prisma.SortOrder + applicable_overtime?: Prisma.SortOrder schedule_preset_id?: Prisma.SortOrder } @@ -594,6 +618,10 @@ export type EmployeesUncheckedUpdateOneWithoutUserNestedInput = { update?: Prisma.XOR, Prisma.EmployeesUncheckedUpdateWithoutUserInput> } +export type EmployeesCreateapplicable_overtimeInput = { + set: $Enums.ApplicableOvertime[] +} + export type EmployeesCreateNestedOneWithoutCrewInput = { create?: Prisma.XOR connectOrCreate?: Prisma.EmployeesCreateOrConnectWithoutCrewInput @@ -614,6 +642,11 @@ export type EmployeesUncheckedCreateNestedManyWithoutSupervisorInput = { connect?: Prisma.EmployeesWhereUniqueInput | Prisma.EmployeesWhereUniqueInput[] } +export type EmployeesUpdateapplicable_overtimeInput = { + set?: $Enums.ApplicableOvertime[] + push?: $Enums.ApplicableOvertime | $Enums.ApplicableOvertime[] +} + export type EmployeesUpdateOneWithoutCrewNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.EmployeesCreateOrConnectWithoutCrewInput @@ -747,11 +780,12 @@ export type EmployeesUpdateOneRequiredWithoutPaid_time_offNestedInput = { export type EmployeesCreateWithoutUserInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput @@ -764,12 +798,13 @@ export type EmployeesUncheckedCreateWithoutUserInput = { id?: number external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput @@ -801,6 +836,7 @@ export type EmployeesUpdateWithoutUserInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput @@ -819,6 +855,7 @@ export type EmployeesUncheckedUpdateWithoutUserInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -829,11 +866,12 @@ export type EmployeesUncheckedUpdateWithoutUserInput = { export type EmployeesCreateWithoutCrewInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput user: Prisma.UsersCreateNestedOneWithoutEmployeeInput @@ -847,12 +885,13 @@ export type EmployeesUncheckedCreateWithoutCrewInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput timesheet?: Prisma.TimesheetsUncheckedCreateNestedManyWithoutEmployeeInput @@ -867,11 +906,12 @@ export type EmployeesCreateOrConnectWithoutCrewInput = { export type EmployeesCreateWithoutSupervisorInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput user: Prisma.UsersCreateNestedOneWithoutEmployeeInput @@ -885,11 +925,12 @@ export type EmployeesUncheckedCreateWithoutSupervisorInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput @@ -926,6 +967,7 @@ export type EmployeesUpdateWithoutCrewInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput user?: Prisma.UsersUpdateOneRequiredWithoutEmployeeNestedInput @@ -945,6 +987,7 @@ export type EmployeesUncheckedUpdateWithoutCrewInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput timesheet?: Prisma.TimesheetsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -981,17 +1024,19 @@ export type EmployeesScalarWhereInput = { supervisor_id?: Prisma.IntNullableFilter<"Employees"> | number | null job_title?: Prisma.StringNullableFilter<"Employees"> | string | null is_supervisor?: Prisma.BoolFilter<"Employees"> | boolean + applicable_overtime?: Prisma.EnumApplicableOvertimeNullableListFilter<"Employees"> schedule_preset_id?: Prisma.IntNullableFilter<"Employees"> | number | null } export type EmployeesCreateWithoutLeave_requestInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput @@ -1005,12 +1050,13 @@ export type EmployeesUncheckedCreateWithoutLeave_requestInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput timesheet?: Prisma.TimesheetsUncheckedCreateNestedManyWithoutEmployeeInput @@ -1041,6 +1087,7 @@ export type EmployeesUpdateWithoutLeave_requestInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput @@ -1060,6 +1107,7 @@ export type EmployeesUncheckedUpdateWithoutLeave_requestInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput timesheet?: Prisma.TimesheetsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -1069,11 +1117,12 @@ export type EmployeesUncheckedUpdateWithoutLeave_requestInput = { export type EmployeesCreateWithoutTimesheetInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput @@ -1087,12 +1136,13 @@ export type EmployeesUncheckedCreateWithoutTimesheetInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput @@ -1123,6 +1173,7 @@ export type EmployeesUpdateWithoutTimesheetInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput @@ -1142,6 +1193,7 @@ export type EmployeesUncheckedUpdateWithoutTimesheetInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -1151,11 +1203,12 @@ export type EmployeesUncheckedUpdateWithoutTimesheetInput = { export type EmployeesCreateWithoutSchedule_presetInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput user: Prisma.UsersCreateNestedOneWithoutEmployeeInput @@ -1169,12 +1222,13 @@ export type EmployeesUncheckedCreateWithoutSchedule_presetInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput timesheet?: Prisma.TimesheetsUncheckedCreateNestedManyWithoutEmployeeInput @@ -1210,11 +1264,12 @@ export type EmployeesUpdateManyWithWhereWithoutSchedule_presetInput = { export type EmployeesCreateWithoutPaid_time_offInput = { external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsCreateNestedOneWithoutEmployeesInput supervisor?: Prisma.EmployeesCreateNestedOneWithoutCrewInput crew?: Prisma.EmployeesCreateNestedManyWithoutSupervisorInput @@ -1228,12 +1283,13 @@ export type EmployeesUncheckedCreateWithoutPaid_time_offInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null crew?: Prisma.EmployeesUncheckedCreateNestedManyWithoutSupervisorInput leave_request?: Prisma.LeaveRequestsUncheckedCreateNestedManyWithoutEmployeeInput @@ -1264,6 +1320,7 @@ export type EmployeesUpdateWithoutPaid_time_offInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput @@ -1283,6 +1340,7 @@ export type EmployeesUncheckedUpdateWithoutPaid_time_offInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -1294,11 +1352,12 @@ export type EmployeesCreateManySupervisorInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: number | null } @@ -1310,6 +1369,7 @@ export type EmployeesUpdateWithoutSupervisorInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset?: Prisma.SchedulePresetsUpdateOneWithoutEmployeesNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput user?: Prisma.UsersUpdateOneRequiredWithoutEmployeeNestedInput @@ -1328,6 +1388,7 @@ export type EmployeesUncheckedUpdateWithoutSupervisorInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -1345,6 +1406,7 @@ export type EmployeesUncheckedUpdateManyWithoutSupervisorInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] schedule_preset_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null } @@ -1353,12 +1415,13 @@ export type EmployeesCreateManySchedule_presetInput = { user_id: string external_payroll_id: number company_code: number - daily_expected_hours: number + daily_expected_hours?: number first_work_day: Date | string last_work_day?: Date | string | null supervisor_id?: number | null job_title?: string | null is_supervisor?: boolean + applicable_overtime?: Prisma.EmployeesCreateapplicable_overtimeInput | $Enums.ApplicableOvertime[] } export type EmployeesUpdateWithoutSchedule_presetInput = { @@ -1369,6 +1432,7 @@ export type EmployeesUpdateWithoutSchedule_presetInput = { last_work_day?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] supervisor?: Prisma.EmployeesUpdateOneWithoutCrewNestedInput crew?: Prisma.EmployeesUpdateManyWithoutSupervisorNestedInput user?: Prisma.UsersUpdateOneRequiredWithoutEmployeeNestedInput @@ -1388,6 +1452,7 @@ export type EmployeesUncheckedUpdateWithoutSchedule_presetInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] crew?: Prisma.EmployeesUncheckedUpdateManyWithoutSupervisorNestedInput leave_request?: Prisma.LeaveRequestsUncheckedUpdateManyWithoutEmployeeNestedInput timesheet?: Prisma.TimesheetsUncheckedUpdateManyWithoutEmployeeNestedInput @@ -1405,6 +1470,7 @@ export type EmployeesUncheckedUpdateManyWithoutSchedule_presetInput = { supervisor_id?: Prisma.NullableIntFieldUpdateOperationsInput | number | null job_title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null is_supervisor?: Prisma.BoolFieldUpdateOperationsInput | boolean + applicable_overtime?: Prisma.EmployeesUpdateapplicable_overtimeInput | $Enums.ApplicableOvertime[] } @@ -1467,6 +1533,7 @@ export type EmployeesSelect supervisor?: boolean | Prisma.Employees$supervisorArgs @@ -1489,6 +1556,7 @@ export type EmployeesSelectCreateManyAndReturn supervisor?: boolean | Prisma.Employees$supervisorArgs @@ -1506,6 +1574,7 @@ export type EmployeesSelectUpdateManyAndReturn supervisor?: boolean | Prisma.Employees$supervisorArgs @@ -1523,10 +1592,11 @@ export type EmployeesSelectScalar = { supervisor_id?: boolean job_title?: boolean is_supervisor?: boolean + applicable_overtime?: boolean schedule_preset_id?: boolean } -export type EmployeesOmit = runtime.Types.Extensions.GetOmit<"id" | "user_id" | "external_payroll_id" | "company_code" | "daily_expected_hours" | "first_work_day" | "last_work_day" | "supervisor_id" | "job_title" | "is_supervisor" | "schedule_preset_id", ExtArgs["result"]["employees"]> +export type EmployeesOmit = runtime.Types.Extensions.GetOmit<"id" | "user_id" | "external_payroll_id" | "company_code" | "daily_expected_hours" | "first_work_day" | "last_work_day" | "supervisor_id" | "job_title" | "is_supervisor" | "applicable_overtime" | "schedule_preset_id", ExtArgs["result"]["employees"]> export type EmployeesInclude = { schedule_preset?: boolean | Prisma.Employees$schedule_presetArgs supervisor?: boolean | Prisma.Employees$supervisorArgs @@ -1570,6 +1640,7 @@ export type $EmployeesPayload composites: {} @@ -2011,6 +2082,7 @@ export interface EmployeesFieldRefs { readonly supervisor_id: Prisma.FieldRef<"Employees", 'Int'> readonly job_title: Prisma.FieldRef<"Employees", 'String'> readonly is_supervisor: Prisma.FieldRef<"Employees", 'Boolean'> + readonly applicable_overtime: Prisma.FieldRef<"Employees", 'ApplicableOvertime[]'> readonly schedule_preset_id: Prisma.FieldRef<"Employees", 'Int'> } diff --git a/prisma/postgres/generated/prisma/client/postgres/models/userModuleAccess.ts b/prisma/postgres/generated/prisma/client/postgres/models/userModuleAccess.ts index d6474f5..8195c19 100644 --- a/prisma/postgres/generated/prisma/client/postgres/models/userModuleAccess.ts +++ b/prisma/postgres/generated/prisma/client/postgres/models/userModuleAccess.ts @@ -44,6 +44,8 @@ export type UserModuleAccessMinAggregateOutputType = { personal_profile: boolean | null dashboard: boolean | null chatbot: boolean | null + ticket: boolean | null + ticket_management: boolean | null } export type UserModuleAccessMaxAggregateOutputType = { @@ -56,6 +58,8 @@ export type UserModuleAccessMaxAggregateOutputType = { personal_profile: boolean | null dashboard: boolean | null chatbot: boolean | null + ticket: boolean | null + ticket_management: boolean | null } export type UserModuleAccessCountAggregateOutputType = { @@ -68,6 +72,8 @@ export type UserModuleAccessCountAggregateOutputType = { personal_profile: number dashboard: number chatbot: number + ticket: number + ticket_management: number _all: number } @@ -90,6 +96,8 @@ export type UserModuleAccessMinAggregateInputType = { personal_profile?: true dashboard?: true chatbot?: true + ticket?: true + ticket_management?: true } export type UserModuleAccessMaxAggregateInputType = { @@ -102,6 +110,8 @@ export type UserModuleAccessMaxAggregateInputType = { personal_profile?: true dashboard?: true chatbot?: true + ticket?: true + ticket_management?: true } export type UserModuleAccessCountAggregateInputType = { @@ -114,6 +124,8 @@ export type UserModuleAccessCountAggregateInputType = { personal_profile?: true dashboard?: true chatbot?: true + ticket?: true + ticket_management?: true _all?: true } @@ -213,6 +225,8 @@ export type UserModuleAccessGroupByOutputType = { personal_profile: boolean dashboard: boolean chatbot: boolean + ticket: boolean + ticket_management: boolean _count: UserModuleAccessCountAggregateOutputType | null _avg: UserModuleAccessAvgAggregateOutputType | null _sum: UserModuleAccessSumAggregateOutputType | null @@ -248,6 +262,8 @@ export type userModuleAccessWhereInput = { personal_profile?: Prisma.BoolFilter<"userModuleAccess"> | boolean dashboard?: Prisma.BoolFilter<"userModuleAccess"> | boolean chatbot?: Prisma.BoolFilter<"userModuleAccess"> | boolean + ticket?: Prisma.BoolFilter<"userModuleAccess"> | boolean + ticket_management?: Prisma.BoolFilter<"userModuleAccess"> | boolean user?: Prisma.XOR } @@ -261,6 +277,8 @@ export type userModuleAccessOrderByWithRelationInput = { personal_profile?: Prisma.SortOrder dashboard?: Prisma.SortOrder chatbot?: Prisma.SortOrder + ticket?: Prisma.SortOrder + ticket_management?: Prisma.SortOrder user?: Prisma.UsersOrderByWithRelationInput } @@ -277,6 +295,8 @@ export type userModuleAccessWhereUniqueInput = Prisma.AtLeast<{ personal_profile?: Prisma.BoolFilter<"userModuleAccess"> | boolean dashboard?: Prisma.BoolFilter<"userModuleAccess"> | boolean chatbot?: Prisma.BoolFilter<"userModuleAccess"> | boolean + ticket?: Prisma.BoolFilter<"userModuleAccess"> | boolean + ticket_management?: Prisma.BoolFilter<"userModuleAccess"> | boolean user?: Prisma.XOR }, "id" | "user_id"> @@ -290,6 +310,8 @@ export type userModuleAccessOrderByWithAggregationInput = { personal_profile?: Prisma.SortOrder dashboard?: Prisma.SortOrder chatbot?: Prisma.SortOrder + ticket?: Prisma.SortOrder + ticket_management?: Prisma.SortOrder _count?: Prisma.userModuleAccessCountOrderByAggregateInput _avg?: Prisma.userModuleAccessAvgOrderByAggregateInput _max?: Prisma.userModuleAccessMaxOrderByAggregateInput @@ -310,6 +332,8 @@ export type userModuleAccessScalarWhereWithAggregatesInput = { personal_profile?: Prisma.BoolWithAggregatesFilter<"userModuleAccess"> | boolean dashboard?: Prisma.BoolWithAggregatesFilter<"userModuleAccess"> | boolean chatbot?: Prisma.BoolWithAggregatesFilter<"userModuleAccess"> | boolean + ticket?: Prisma.BoolWithAggregatesFilter<"userModuleAccess"> | boolean + ticket_management?: Prisma.BoolWithAggregatesFilter<"userModuleAccess"> | boolean } export type userModuleAccessCreateInput = { @@ -320,6 +344,8 @@ export type userModuleAccessCreateInput = { personal_profile?: boolean dashboard?: boolean chatbot?: boolean + ticket?: boolean + ticket_management?: boolean user: Prisma.UsersCreateNestedOneWithoutUser_module_accessInput } @@ -333,6 +359,8 @@ export type userModuleAccessUncheckedCreateInput = { personal_profile?: boolean dashboard?: boolean chatbot?: boolean + ticket?: boolean + ticket_management?: boolean } export type userModuleAccessUpdateInput = { @@ -343,6 +371,8 @@ export type userModuleAccessUpdateInput = { personal_profile?: Prisma.BoolFieldUpdateOperationsInput | boolean dashboard?: Prisma.BoolFieldUpdateOperationsInput | boolean chatbot?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket_management?: Prisma.BoolFieldUpdateOperationsInput | boolean user?: Prisma.UsersUpdateOneRequiredWithoutUser_module_accessNestedInput } @@ -356,6 +386,8 @@ export type userModuleAccessUncheckedUpdateInput = { personal_profile?: Prisma.BoolFieldUpdateOperationsInput | boolean dashboard?: Prisma.BoolFieldUpdateOperationsInput | boolean chatbot?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket_management?: Prisma.BoolFieldUpdateOperationsInput | boolean } export type userModuleAccessCreateManyInput = { @@ -368,6 +400,8 @@ export type userModuleAccessCreateManyInput = { personal_profile?: boolean dashboard?: boolean chatbot?: boolean + ticket?: boolean + ticket_management?: boolean } export type userModuleAccessUpdateManyMutationInput = { @@ -378,6 +412,8 @@ export type userModuleAccessUpdateManyMutationInput = { personal_profile?: Prisma.BoolFieldUpdateOperationsInput | boolean dashboard?: Prisma.BoolFieldUpdateOperationsInput | boolean chatbot?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket_management?: Prisma.BoolFieldUpdateOperationsInput | boolean } export type userModuleAccessUncheckedUpdateManyInput = { @@ -390,6 +426,8 @@ export type userModuleAccessUncheckedUpdateManyInput = { personal_profile?: Prisma.BoolFieldUpdateOperationsInput | boolean dashboard?: Prisma.BoolFieldUpdateOperationsInput | boolean chatbot?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket_management?: Prisma.BoolFieldUpdateOperationsInput | boolean } export type UserModuleAccessNullableScalarRelationFilter = { @@ -407,6 +445,8 @@ export type userModuleAccessCountOrderByAggregateInput = { personal_profile?: Prisma.SortOrder dashboard?: Prisma.SortOrder chatbot?: Prisma.SortOrder + ticket?: Prisma.SortOrder + ticket_management?: Prisma.SortOrder } export type userModuleAccessAvgOrderByAggregateInput = { @@ -423,6 +463,8 @@ export type userModuleAccessMaxOrderByAggregateInput = { personal_profile?: Prisma.SortOrder dashboard?: Prisma.SortOrder chatbot?: Prisma.SortOrder + ticket?: Prisma.SortOrder + ticket_management?: Prisma.SortOrder } export type userModuleAccessMinOrderByAggregateInput = { @@ -435,6 +477,8 @@ export type userModuleAccessMinOrderByAggregateInput = { personal_profile?: Prisma.SortOrder dashboard?: Prisma.SortOrder chatbot?: Prisma.SortOrder + ticket?: Prisma.SortOrder + ticket_management?: Prisma.SortOrder } export type userModuleAccessSumOrderByAggregateInput = { @@ -485,6 +529,8 @@ export type userModuleAccessCreateWithoutUserInput = { personal_profile?: boolean dashboard?: boolean chatbot?: boolean + ticket?: boolean + ticket_management?: boolean } export type userModuleAccessUncheckedCreateWithoutUserInput = { @@ -496,6 +542,8 @@ export type userModuleAccessUncheckedCreateWithoutUserInput = { personal_profile?: boolean dashboard?: boolean chatbot?: boolean + ticket?: boolean + ticket_management?: boolean } export type userModuleAccessCreateOrConnectWithoutUserInput = { @@ -522,6 +570,8 @@ export type userModuleAccessUpdateWithoutUserInput = { personal_profile?: Prisma.BoolFieldUpdateOperationsInput | boolean dashboard?: Prisma.BoolFieldUpdateOperationsInput | boolean chatbot?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket_management?: Prisma.BoolFieldUpdateOperationsInput | boolean } export type userModuleAccessUncheckedUpdateWithoutUserInput = { @@ -533,6 +583,8 @@ export type userModuleAccessUncheckedUpdateWithoutUserInput = { personal_profile?: Prisma.BoolFieldUpdateOperationsInput | boolean dashboard?: Prisma.BoolFieldUpdateOperationsInput | boolean chatbot?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket?: Prisma.BoolFieldUpdateOperationsInput | boolean + ticket_management?: Prisma.BoolFieldUpdateOperationsInput | boolean } @@ -547,6 +599,8 @@ export type userModuleAccessSelect }, ExtArgs["result"]["userModuleAccess"]> @@ -560,6 +614,8 @@ export type userModuleAccessSelectCreateManyAndReturn }, ExtArgs["result"]["userModuleAccess"]> @@ -573,6 +629,8 @@ export type userModuleAccessSelectUpdateManyAndReturn }, ExtArgs["result"]["userModuleAccess"]> @@ -586,9 +644,11 @@ export type userModuleAccessSelectScalar = { personal_profile?: boolean dashboard?: boolean chatbot?: boolean + ticket?: boolean + ticket_management?: boolean } -export type userModuleAccessOmit = runtime.Types.Extensions.GetOmit<"id" | "user_id" | "timesheets" | "timesheets_approval" | "employee_list" | "employee_management" | "personal_profile" | "dashboard" | "chatbot", ExtArgs["result"]["userModuleAccess"]> +export type userModuleAccessOmit = runtime.Types.Extensions.GetOmit<"id" | "user_id" | "timesheets" | "timesheets_approval" | "employee_list" | "employee_management" | "personal_profile" | "dashboard" | "chatbot" | "ticket" | "ticket_management", ExtArgs["result"]["userModuleAccess"]> export type userModuleAccessInclude = { user?: boolean | Prisma.UsersDefaultArgs } @@ -614,6 +674,8 @@ export type $userModuleAccessPayload composites: {} } @@ -1047,6 +1109,8 @@ export interface userModuleAccessFieldRefs { readonly personal_profile: Prisma.FieldRef<"userModuleAccess", 'Boolean'> readonly dashboard: Prisma.FieldRef<"userModuleAccess", 'Boolean'> readonly chatbot: Prisma.FieldRef<"userModuleAccess", 'Boolean'> + readonly ticket: Prisma.FieldRef<"userModuleAccess", 'Boolean'> + readonly ticket_management: Prisma.FieldRef<"userModuleAccess", 'Boolean'> } diff --git a/src/time-and-attendance/timesheets/timesheet.mapper.ts b/src/time-and-attendance/timesheets/timesheet.mapper.ts index 3f1ef56..0a117ac 100644 --- a/src/time-and-attendance/timesheets/timesheet.mapper.ts +++ b/src/time-and-attendance/timesheets/timesheet.mapper.ts @@ -93,8 +93,8 @@ export const mapOneTimesheet = ( daily_expenses.mileage += Number(expense.mileage); weekly_expenses.mileage += Number(expense.mileage); } else { - daily_expenses.expenses[subgroup] += Number(expense.amount); - weekly_expenses.expenses[subgroup] += Number(expense.amount); + daily_expenses[subgroup] += Number(expense.amount); + weekly_expenses[subgroup] += Number(expense.amount); } }