From c294d491d104b473a2e00565c30d90782dd225ab Mon Sep 17 00:00:00 2001 From: Matthieu Haineault Date: Wed, 14 Jan 2026 14:44:41 -0500 Subject: [PATCH 1/3] feat(banking): added columns to table Employees and timesheets for future update on banking hour options --- prisma/schema.prisma | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 905d890..c6d86f9 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -50,6 +50,7 @@ model Employees { supervisor_id Int? job_title String? is_supervisor Boolean @default(false) + banked_hour_limit Int @default(0) //will need to be implemented in the future schedule_preset_id Int? schedule_preset SchedulePresets? @relation("EmployeesSchedulePreset", fields: [schedule_preset_id], references: [id]) supervisor Employees? @relation("EmployeeSupervisor", fields: [supervisor_id], references: [id]) @@ -99,16 +100,16 @@ model LeaveRequestsArchive { } model Timesheets { - id Int @id @default(autoincrement()) - employee_id Int - is_approved Boolean @default(false) - start_date DateTime @db.Date - expense Expenses[] @relation("ExpensesTimesheet") - shift Shifts[] @relation("ShiftTimesheet") - employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id]) - archive TimesheetsArchive[] @relation("TimesheetsToArchive") + id Int @id @default(autoincrement()) + employee_id Int + is_approved Boolean @default(false) + start_date DateTime @db.Date + hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future + expense Expenses[] @relation("ExpensesTimesheet") + shift Shifts[] @relation("ShiftTimesheet") + employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id]) + archive TimesheetsArchive[] @relation("TimesheetsToArchive") - // @@unique([employee_id, start_date], name: "employee_id_start_date") @@map("timesheets") } @@ -324,12 +325,12 @@ model Preferences { } model PaidTimeOff { - id Int @id @default(autoincrement()) - employee_id Int @unique - vacation_hours Decimal @default(0) @db.Decimal(12, 2) - banked_hours Decimal @default(0) @db.Decimal(12, 2) - sick_hours Decimal @default(0) @db.Decimal(12, 2) - last_updated DateTime? @db.Date + id Int @id @default(autoincrement()) + employee_id Int @unique + vacation_hours Decimal @default(0) @db.Decimal(12, 2) + banked_hours Decimal @default(0) @db.Decimal(12, 2) + sick_hours Decimal @default(0) @db.Decimal(12, 2) + last_updated DateTime? @db.Date employee Employees @relation("EmployeePaidTimeOff", fields: [employee_id], references: [id]) From 58055490582ce3e7165295b6edf27c93d3b6332a Mon Sep 17 00:00:00 2001 From: Matthieu Haineault Date: Wed, 14 Jan 2026 15:31:50 -0500 Subject: [PATCH 2/3] fix(prisma): commented unused column --- prisma/schema.prisma | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c6d86f9..f5225ed 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -50,7 +50,7 @@ model Employees { supervisor_id Int? job_title String? is_supervisor Boolean @default(false) - banked_hour_limit Int @default(0) //will need to be implemented in the future + // banked_hour_limit Int @default(0) //will need to be implemented in the future schedule_preset_id Int? schedule_preset SchedulePresets? @relation("EmployeesSchedulePreset", fields: [schedule_preset_id], references: [id]) supervisor Employees? @relation("EmployeeSupervisor", fields: [supervisor_id], references: [id]) @@ -100,16 +100,17 @@ model LeaveRequestsArchive { } model Timesheets { - id Int @id @default(autoincrement()) - employee_id Int - is_approved Boolean @default(false) - start_date DateTime @db.Date - hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future - expense Expenses[] @relation("ExpensesTimesheet") - shift Shifts[] @relation("ShiftTimesheet") - employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id]) - archive TimesheetsArchive[] @relation("TimesheetsToArchive") + id Int @id @default(autoincrement()) + employee_id Int + is_approved Boolean @default(false) + start_date DateTime @db.Date + // hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future + expense Expenses[] @relation("ExpensesTimesheet") + shift Shifts[] @relation("ShiftTimesheet") + employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id]) + archive TimesheetsArchive[] @relation("TimesheetsToArchive") + // @@unique([employee_id, start_date], name: "employee_id_start_date") @@map("timesheets") } From 78798c917322b403da3e90c71eaf262c7d1e7f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick=20Pruneau?= Date: Wed, 14 Jan 2026 15:37:30 -0500 Subject: [PATCH 3/3] added app2.targo.ca in CORS --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index feb3352..70c84b6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,7 +56,7 @@ async function bootstrap() { // Enable CORS app.enableCors({ - origin: ['http://10.100.251.2:9011', 'http://10.100.251.2:9012', 'http://10.100.251.2:9013', 'http://localhost:9000', 'https://app.targo.ca', 'https://staging.app.targo.ca'], + origin: ['http://10.100.251.2:9011', 'http://10.100.251.2:9012', 'http://10.100.251.2:9013', 'http://localhost:9000', 'https://app.targo.ca', 'https://app2.targo.ca','https://staging.app.targo.ca'], credentials: true, });