Merge branch 'main' of git.targo.ca:Targo/targo_backend into dev/matthieu/refactor

This commit is contained in:
Matthieu Haineault 2025-10-20 08:55:21 -04:00
parent fad4f6f3d6
commit bba6c84b6f
5 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,13 @@
//newer version that uses Express session data
import { Controller } from "@nestjs/common";
import { ShiftService } from "../services/shift.service";
@Controller('shifts')
export class ShiftController {
constructor(private readonly service: ShiftService){}
}

View File

@ -0,0 +1,22 @@
//newer version that uses Express session data
import { IsBoolean, IsOptional, IsString, MaxLength } from "class-validator";
export class createShift {
timesheet_id: number;
bank_code_id: number;
date: string;
start_time: string;
end_time: string;
@IsBoolean()
is_remote: boolean;
@IsBoolean()
is_approved: boolean;
@IsOptional()
@IsString()
@MaxLength(280)
comment?: string;
}

View File

@ -0,0 +1,14 @@
//newer version that uses Express session data
export class getShift {
shift_id?: number;
timesheet_id?: number;
bank_code_id?: number;
date?: string;
start_time?: string;
end_time?: string;
is_remote?: boolean;
is_approved?: boolean;
comment?: string;
}

View File

@ -0,0 +1,9 @@
//newer version that uses Express session data
export class updateShift {
date!: string;
start_time!: string;
end_time!: string;
}

View File

@ -0,0 +1,9 @@
//newer version that uses Express session data
import { Injectable } from "@nestjs/common";
import { PrismaService } from "src/prisma/prisma.service";
@Injectable()
export class ShiftService {
constructor(private readonly prisma: PrismaService){}
}