From 1f44155a7b60d3b85ee0030822fe7ad2c142f9db Mon Sep 17 00:00:00 2001 From: Andre Mesquita Date: Sat, 7 Dec 2024 12:50:21 +0000 Subject: [PATCH] npm run format --- .../Specification/IsMaximumTimeSpentReached.ts | 5 +---- src/Infrastructure/Common/DTO/IdDTO.ts | 2 +- src/Infrastructure/Common/DTO/PaginationDTO.ts | 2 +- src/Infrastructure/Customer/DTO/CustomerDTO.ts | 2 +- .../FairCalendar/DTO/AbstractEventDTO.ts | 2 +- .../FairCalendar/DTO/AddEventControllerDTO.ts | 2 +- src/Infrastructure/FairCalendar/DTO/AddEventDTO.ts | 3 +-- .../FairCalendar/DTO/FairCalendarControllerDTO.ts | 2 +- .../HumanResource/Leave/DTO/LeaveRequestDTO.ts | 2 +- .../Leave/DTO/ListLeaveRequestsControllerDTO.ts | 2 +- .../HumanResource/Leave/DTO/ModerationDTO.ts | 2 +- .../MealTicket/DTO/MealTicketRemovalDTO.ts | 2 +- .../DTO/GetPayrollElementsControllerDTO.ts | 2 +- .../HumanResource/Savings/DTO/UserSavingsRecordDTO.ts | 2 +- src/Infrastructure/HumanResource/User/DTO/LoginDTO.ts | 2 +- .../HumanResource/User/DTO/ProfileDTO.ts | 2 +- .../HumanResource/User/DTO/UserAdministrativeDTO.ts | 2 +- src/Infrastructure/HumanResource/User/DTO/UserDTO.ts | 2 +- src/Infrastructure/Project/DTO/ProjectDTO.ts | 2 +- src/Infrastructure/Task/DTO/TaskDTO.ts | 2 +- src/main.ts | 11 +++++++---- 21 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/Domain/FairCalendar/Specification/IsMaximumTimeSpentReached.ts b/src/Domain/FairCalendar/Specification/IsMaximumTimeSpentReached.ts index b2e62794..a758afa3 100644 --- a/src/Domain/FairCalendar/Specification/IsMaximumTimeSpentReached.ts +++ b/src/Domain/FairCalendar/Specification/IsMaximumTimeSpentReached.ts @@ -11,10 +11,7 @@ export class IsMaximumTimeSpentReached { private readonly leaveRepository: ILeaveRepository ) {} - public async isSatisfiedBy( - event: Event, - newTime = 0 - ): Promise { + public async isSatisfiedBy(event: Event, newTime = 0): Promise { const user = event.getUser(); const date = event.getDate(); diff --git a/src/Infrastructure/Common/DTO/IdDTO.ts b/src/Infrastructure/Common/DTO/IdDTO.ts index 0a434ebf..9517fefa 100644 --- a/src/Infrastructure/Common/DTO/IdDTO.ts +++ b/src/Infrastructure/Common/DTO/IdDTO.ts @@ -1,5 +1,5 @@ import { IsNotEmpty, IsUUID } from 'class-validator'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class IdDTO { @ApiProperty() diff --git a/src/Infrastructure/Common/DTO/PaginationDTO.ts b/src/Infrastructure/Common/DTO/PaginationDTO.ts index e683b119..6ef27707 100644 --- a/src/Infrastructure/Common/DTO/PaginationDTO.ts +++ b/src/Infrastructure/Common/DTO/PaginationDTO.ts @@ -1,6 +1,6 @@ import { Transform } from 'class-transformer'; import { IsNumber, IsOptional, Max, Min } from 'class-validator'; -import { ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiPropertyOptional } from '@nestjs/swagger'; export class PaginationDTO { @ApiPropertyOptional() diff --git a/src/Infrastructure/Customer/DTO/CustomerDTO.ts b/src/Infrastructure/Customer/DTO/CustomerDTO.ts index a0889094..f99807e3 100644 --- a/src/Infrastructure/Customer/DTO/CustomerDTO.ts +++ b/src/Infrastructure/Customer/DTO/CustomerDTO.ts @@ -1,5 +1,5 @@ import { IsNotEmpty } from 'class-validator'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class CustomerDTO { @ApiProperty() diff --git a/src/Infrastructure/FairCalendar/DTO/AbstractEventDTO.ts b/src/Infrastructure/FairCalendar/DTO/AbstractEventDTO.ts index 115db1a2..53a73aaa 100644 --- a/src/Infrastructure/FairCalendar/DTO/AbstractEventDTO.ts +++ b/src/Infrastructure/FairCalendar/DTO/AbstractEventDTO.ts @@ -9,7 +9,7 @@ import { } from 'class-validator'; import { EventType } from 'src/Domain/FairCalendar/Event.entity'; import { ArrayUtils } from 'src/Infrastructure/Common/Utils/ArrayUtils'; -import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export abstract class AbstractEventDTO { @ApiProperty() diff --git a/src/Infrastructure/FairCalendar/DTO/AddEventControllerDTO.ts b/src/Infrastructure/FairCalendar/DTO/AddEventControllerDTO.ts index 886881f9..4e3baaff 100644 --- a/src/Infrastructure/FairCalendar/DTO/AddEventControllerDTO.ts +++ b/src/Infrastructure/FairCalendar/DTO/AddEventControllerDTO.ts @@ -1,5 +1,5 @@ import { IsISO8601, IsNotEmpty } from 'class-validator'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class AddEventControllerDTO { @ApiProperty() diff --git a/src/Infrastructure/FairCalendar/DTO/AddEventDTO.ts b/src/Infrastructure/FairCalendar/DTO/AddEventDTO.ts index 15694825..23518064 100644 --- a/src/Infrastructure/FairCalendar/DTO/AddEventDTO.ts +++ b/src/Infrastructure/FairCalendar/DTO/AddEventDTO.ts @@ -1,10 +1,9 @@ import { IsNotEmpty, IsDateString } from 'class-validator'; import { DateGreaterOrEqualThan } from 'src/Infrastructure/Common/Validator/DateGreaterOrEqualThan'; import { AbstractEventDTO } from './AbstractEventDTO'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class AddEventDTO extends AbstractEventDTO { - @ApiProperty() @IsNotEmpty() @IsDateString() diff --git a/src/Infrastructure/FairCalendar/DTO/FairCalendarControllerDTO.ts b/src/Infrastructure/FairCalendar/DTO/FairCalendarControllerDTO.ts index dce3419d..ab57978c 100644 --- a/src/Infrastructure/FairCalendar/DTO/FairCalendarControllerDTO.ts +++ b/src/Infrastructure/FairCalendar/DTO/FairCalendarControllerDTO.ts @@ -1,5 +1,5 @@ import { IsOptional, IsUUID, IsNumber } from 'class-validator'; -import { ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiPropertyOptional } from '@nestjs/swagger'; // TODO test export class FairCalendarControllerDTO { diff --git a/src/Infrastructure/HumanResource/Leave/DTO/LeaveRequestDTO.ts b/src/Infrastructure/HumanResource/Leave/DTO/LeaveRequestDTO.ts index e352df7d..1c5b5b63 100644 --- a/src/Infrastructure/HumanResource/Leave/DTO/LeaveRequestDTO.ts +++ b/src/Infrastructure/HumanResource/Leave/DTO/LeaveRequestDTO.ts @@ -8,7 +8,7 @@ import { } from 'class-validator'; import { Type } from 'src/Domain/HumanResource/Leave/LeaveRequest.entity'; import { DateGreaterOrEqualThan } from 'src/Infrastructure/Common/Validator/DateGreaterOrEqualThan'; -import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class LeaveRequestDTO { @ApiProperty() diff --git a/src/Infrastructure/HumanResource/Leave/DTO/ListLeaveRequestsControllerDTO.ts b/src/Infrastructure/HumanResource/Leave/DTO/ListLeaveRequestsControllerDTO.ts index 6b2bc66e..a8b4d9ff 100644 --- a/src/Infrastructure/HumanResource/Leave/DTO/ListLeaveRequestsControllerDTO.ts +++ b/src/Infrastructure/HumanResource/Leave/DTO/ListLeaveRequestsControllerDTO.ts @@ -1,6 +1,6 @@ import { IsUUID, IsOptional } from 'class-validator'; import { PaginationDTO } from 'src/Infrastructure/Common/DTO/PaginationDTO'; -import { ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiPropertyOptional } from '@nestjs/swagger'; export class ListLeaveRequestsControllerDTO extends PaginationDTO { @ApiPropertyOptional() diff --git a/src/Infrastructure/HumanResource/Leave/DTO/ModerationDTO.ts b/src/Infrastructure/HumanResource/Leave/DTO/ModerationDTO.ts index 5f9f4a5d..714d89bb 100644 --- a/src/Infrastructure/HumanResource/Leave/DTO/ModerationDTO.ts +++ b/src/Infrastructure/HumanResource/Leave/DTO/ModerationDTO.ts @@ -1,5 +1,5 @@ import { IsEnum, IsNotEmpty, IsOptional } from 'class-validator'; -import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export enum ModerationAction { ACCEPT = 'accept', diff --git a/src/Infrastructure/HumanResource/MealTicket/DTO/MealTicketRemovalDTO.ts b/src/Infrastructure/HumanResource/MealTicket/DTO/MealTicketRemovalDTO.ts index 33660054..b67a4101 100644 --- a/src/Infrastructure/HumanResource/MealTicket/DTO/MealTicketRemovalDTO.ts +++ b/src/Infrastructure/HumanResource/MealTicket/DTO/MealTicketRemovalDTO.ts @@ -1,5 +1,5 @@ import { IsNotEmpty, IsISO8601, IsOptional } from 'class-validator'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class MealTicketRemovalDTO { @ApiProperty() diff --git a/src/Infrastructure/HumanResource/PayrollElements/DTO/GetPayrollElementsControllerDTO.ts b/src/Infrastructure/HumanResource/PayrollElements/DTO/GetPayrollElementsControllerDTO.ts index 1f9c54f3..f0465e0a 100644 --- a/src/Infrastructure/HumanResource/PayrollElements/DTO/GetPayrollElementsControllerDTO.ts +++ b/src/Infrastructure/HumanResource/PayrollElements/DTO/GetPayrollElementsControllerDTO.ts @@ -1,5 +1,5 @@ import { IsNumber, IsOptional } from 'class-validator'; -import { ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiPropertyOptional } from '@nestjs/swagger'; export class GetPayrollElementsControllerDTO { @ApiPropertyOptional() diff --git a/src/Infrastructure/HumanResource/Savings/DTO/UserSavingsRecordDTO.ts b/src/Infrastructure/HumanResource/Savings/DTO/UserSavingsRecordDTO.ts index be145024..8782f2c8 100644 --- a/src/Infrastructure/HumanResource/Savings/DTO/UserSavingsRecordDTO.ts +++ b/src/Infrastructure/HumanResource/Savings/DTO/UserSavingsRecordDTO.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsUUID, IsNumber } from 'class-validator'; -export class UserSavingsRecordDTO { +export class UserSavingsRecordDTO { @IsNotEmpty() @IsUUID() @ApiProperty() diff --git a/src/Infrastructure/HumanResource/User/DTO/LoginDTO.ts b/src/Infrastructure/HumanResource/User/DTO/LoginDTO.ts index bca70642..e938ab41 100644 --- a/src/Infrastructure/HumanResource/User/DTO/LoginDTO.ts +++ b/src/Infrastructure/HumanResource/User/DTO/LoginDTO.ts @@ -1,5 +1,5 @@ import { IsEmail, IsNotEmpty } from 'class-validator'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class LoginDTO { @ApiProperty() diff --git a/src/Infrastructure/HumanResource/User/DTO/ProfileDTO.ts b/src/Infrastructure/HumanResource/User/DTO/ProfileDTO.ts index 28f3e402..539ed1e8 100644 --- a/src/Infrastructure/HumanResource/User/DTO/ProfileDTO.ts +++ b/src/Infrastructure/HumanResource/User/DTO/ProfileDTO.ts @@ -1,5 +1,5 @@ import { IsEmail, IsNotEmpty, IsOptional } from 'class-validator'; -import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class ProfileDTO { @ApiProperty() diff --git a/src/Infrastructure/HumanResource/User/DTO/UserAdministrativeDTO.ts b/src/Infrastructure/HumanResource/User/DTO/UserAdministrativeDTO.ts index 466f5e7c..58cea0d2 100644 --- a/src/Infrastructure/HumanResource/User/DTO/UserAdministrativeDTO.ts +++ b/src/Infrastructure/HumanResource/User/DTO/UserAdministrativeDTO.ts @@ -16,7 +16,7 @@ import { } from 'src/Domain/HumanResource/User/UserAdministrative.entity'; import { UserRole } from 'src/Domain/HumanResource/User/User.entity'; import { Transform } from 'class-transformer'; -import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class UserAdministrativeDTO { @ApiProperty() diff --git a/src/Infrastructure/HumanResource/User/DTO/UserDTO.ts b/src/Infrastructure/HumanResource/User/DTO/UserDTO.ts index 32dfe7cf..21d088df 100644 --- a/src/Infrastructure/HumanResource/User/DTO/UserDTO.ts +++ b/src/Infrastructure/HumanResource/User/DTO/UserDTO.ts @@ -1,6 +1,6 @@ import { IsEmail, IsNotEmpty } from 'class-validator'; import { UserAdministrativeDTO } from './UserAdministrativeDTO'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class UserDTO extends UserAdministrativeDTO { @ApiProperty() diff --git a/src/Infrastructure/Project/DTO/ProjectDTO.ts b/src/Infrastructure/Project/DTO/ProjectDTO.ts index 1de739e5..ab87b0f1 100644 --- a/src/Infrastructure/Project/DTO/ProjectDTO.ts +++ b/src/Infrastructure/Project/DTO/ProjectDTO.ts @@ -1,6 +1,6 @@ import { Transform } from 'class-transformer'; import { IsBoolean, IsNotEmpty, IsOptional, IsUUID } from 'class-validator'; -import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class ProjectDTO { @ApiProperty() diff --git a/src/Infrastructure/Task/DTO/TaskDTO.ts b/src/Infrastructure/Task/DTO/TaskDTO.ts index a2ae2be8..005635aa 100644 --- a/src/Infrastructure/Task/DTO/TaskDTO.ts +++ b/src/Infrastructure/Task/DTO/TaskDTO.ts @@ -1,5 +1,5 @@ import { IsNotEmpty } from 'class-validator'; -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty } from '@nestjs/swagger'; export class TaskDTO { @ApiProperty() diff --git a/src/main.ts b/src/main.ts index 3ddea724..7df9d465 100644 --- a/src/main.ts +++ b/src/main.ts @@ -41,14 +41,17 @@ async function bootstrap() { const swaggerCustomOptions = { explorer: false, - customCss: '.swagger-ui .topbar { background-color: black; } .swagger-ui img { display: none; }', + customCss: + '.swagger-ui .topbar { background-color: black; } .swagger-ui img { display: none; }', customSiteTitle: 'Permacoop API', - customfavIcon: "" - } + customfavIcon: '' + }; const swaggerOptions = new DocumentBuilder() .setTitle('Permacoop API') - .setDescription('Permacoop is an open source and eco design ERP solution reserved for worker-owned business.') + .setDescription( + 'Permacoop is an open source and eco design ERP solution reserved for worker-owned business.' + ) .setVersion('1.0') .addBearerAuth() .build();