Skip to content

Commit

Permalink
npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
avmesquita committed Dec 7, 2024
1 parent 5e45ecf commit 1f44155
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ export class IsMaximumTimeSpentReached {
private readonly leaveRepository: ILeaveRepository
) {}

public async isSatisfiedBy(
event: Event,
newTime = 0
): Promise<boolean> {
public async isSatisfiedBy(event: Event, newTime = 0): Promise<boolean> {
const user = event.getUser();
const date = event.getDate();

Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Common/DTO/IdDTO.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsNotEmpty, IsUUID } from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";
import { ApiProperty } from '@nestjs/swagger';

export class IdDTO {
@ApiProperty()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Common/DTO/PaginationDTO.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Customer/DTO/CustomerDTO.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsNotEmpty } from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";
import { ApiProperty } from '@nestjs/swagger';

export class CustomerDTO {
@ApiProperty()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/FairCalendar/DTO/AbstractEventDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsISO8601, IsNotEmpty } from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";
import { ApiProperty } from '@nestjs/swagger';

export class AddEventControllerDTO {
@ApiProperty()
Expand Down
3 changes: 1 addition & 2 deletions src/Infrastructure/FairCalendar/DTO/AddEventDTO.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsNumber, IsOptional } from 'class-validator';
import { ApiPropertyOptional } from "@nestjs/swagger";
import { ApiPropertyOptional } from '@nestjs/swagger';

export class GetPayrollElementsControllerDTO {
@ApiPropertyOptional()
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/HumanResource/User/DTO/LoginDTO.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsEmail, IsNotEmpty } from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";
import { ApiProperty } from '@nestjs/swagger';

export class LoginDTO {
@ApiProperty()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/HumanResource/User/DTO/ProfileDTO.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/HumanResource/User/DTO/UserDTO.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Project/DTO/ProjectDTO.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Task/DTO/TaskDTO.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsNotEmpty } from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";
import { ApiProperty } from '@nestjs/swagger';

export class TaskDTO {
@ApiProperty()
Expand Down
11 changes: 7 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1f44155

Please sign in to comment.