Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions backend/src/chat/entities/chat.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ registerEnumType(MessageType, {

@ObjectType()
export class LinkPreview {
@Field({ nullable: true })
@Field(() => String, { nullable: true })
url?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
title?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
description?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
image?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
siteName?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
favicons?: string;
}

Expand Down Expand Up @@ -67,16 +67,16 @@ export class Message {
@Field(() => MessageType)
type: MessageType;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
fileUrl?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
fileName?: string;

@Field(() => Int, { nullable: true })
fileSize?: number;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
mimeType?: string;

@Field(() => String, { nullable: true })
Expand Down Expand Up @@ -112,7 +112,7 @@ export class Conversation {
@Field(() => Int)
id: number;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
name?: string;

@Field(() => ConversationType)
Expand Down
8 changes: 4 additions & 4 deletions backend/src/dashboard/dto/dashboard-stats.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class RecentActivityItem {
@Field()
timestamp: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
projectName?: string;
}

Expand All @@ -89,13 +89,13 @@ export class UpcomingDeadlineItem {
@Field()
priority: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
projectName?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
stageName?: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
stageColor?: string;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class CreateProjectStageInput {
@Field()
title: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
description?: string;

@Field({ defaultValue: '#808080' })
Expand Down
2 changes: 1 addition & 1 deletion backend/src/project-stage/entities/project-stage.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class ProjectStage {
@Field()
title: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
description?: string;

@Field()
Expand Down
8 changes: 4 additions & 4 deletions backend/src/project/dto/create-project.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class CreateProjectInput {
@IsSanitizedString()
name: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
@IsSanitizedString()
description?: string;

Expand All @@ -31,10 +31,10 @@ export class CreateProjectInput {
@Field(() => Number, { nullable: true, defaultValue: 0 })
budgetPlanned?: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
startDate?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
endDate?: Date;

@Field(() => Int, { nullable: true, defaultValue: 1 })
Expand All @@ -58,7 +58,7 @@ export class CreateProjectInput {
})
priority?: ProjectPriority;

@Field({ nullable: true, defaultValue: 'USD' })
@Field(() => String, { nullable: true, defaultValue: 'USD' })
currency?: string;

@Field(() => [String], { nullable: true })
Expand Down
8 changes: 4 additions & 4 deletions backend/src/project/dto/update-project.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ export class UpdateProjectInput extends PartialType(CreateProjectInput) {
@Field(() => Int)
id: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
actualStartDate?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
actualEndDate?: Date;

@Field(() => Number, { nullable: true })
progress?: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
archivedAt?: Date;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
key?: string;
}
12 changes: 6 additions & 6 deletions backend/src/project/entities/project.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ export class Project {
@Field(() => Number, { defaultValue: 0 })
budgetActual: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
startDate?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
endDate?: Date;

@Field(() => Int, { defaultValue: 1 })
Expand All @@ -97,7 +97,7 @@ export class Project {
@Field(() => ProjectMethodology, { defaultValue: ProjectMethodology.KANBAN })
methodology: ProjectMethodology;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
key?: string;

@Field(() => ProjectVisibility, { defaultValue: ProjectVisibility.TEAM })
Expand All @@ -106,10 +106,10 @@ export class Project {
@Field(() => ProjectPriority, { defaultValue: ProjectPriority.MEDIUM })
priority: ProjectPriority;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
actualStartDate?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
actualEndDate?: Date;

@Field(() => Number, { defaultValue: 0 })
Expand All @@ -121,7 +121,7 @@ export class Project {
@Field(() => [String], { nullable: 'items' })
tags?: string[];

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
archivedAt?: Date;

@Field(() => Number, { defaultValue: 0 })
Expand Down
2 changes: 1 addition & 1 deletion backend/src/task-stage/dto/create-task-stage.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class CreateTaskStageInput {
@Field()
title: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
description?: string;

@Field({ defaultValue: '#808080' })
Expand Down
2 changes: 1 addition & 1 deletion backend/src/task-stage/entities/task-stage.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class TaskStage {
@Field()
title: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
description?: string;

@Field()
Expand Down
6 changes: 3 additions & 3 deletions backend/src/task/dto/create-task.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class CreateTaskInput {
@IsSanitizedString()
title: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
@IsSanitizedString()
description?: string;

Expand All @@ -27,7 +27,7 @@ export class CreateTaskInput {
@Field(() => Number, { nullable: true, defaultValue: 0 })
estimatedHours?: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
dueDate?: Date;

@Field(() => TaskPriority, {
Expand All @@ -45,7 +45,7 @@ export class CreateTaskInput {
@Field(() => Int, { nullable: true })
reporterId?: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
startDate?: Date;

@Field(() => [String], { nullable: true })
Expand Down
4 changes: 2 additions & 2 deletions backend/src/task/dto/update-task.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class UpdateTaskInput extends PartialType(CreateTaskInput) {
@Field(() => Int)
id: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
completedAt?: Date;

@Field(() => Number, { nullable: true })
Expand All @@ -15,6 +15,6 @@ export class UpdateTaskInput extends PartialType(CreateTaskInput) {
@Field(() => Number, { nullable: true })
progress?: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
deletedAt?: Date;
}
10 changes: 5 additions & 5 deletions backend/src/task/entities/task.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class Task extends Base {
@Field()
title: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
description?: string;

@Field(() => Int)
Expand Down Expand Up @@ -54,7 +54,7 @@ export class Task extends Base {
@Field(() => Number, { defaultValue: 0 })
estimatedHours: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
dueDate?: Date;

@Field(() => TaskPriority, { defaultValue: TaskPriority.MEDIUM })
Expand All @@ -81,10 +81,10 @@ export class Task extends Base {
@Field(() => User, { nullable: true })
reporter?: User;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
startDate?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
completedAt?: Date;

@Field(() => Number, { defaultValue: 0 })
Expand All @@ -96,6 +96,6 @@ export class Task extends Base {
@Field(() => [String], { nullable: 'items' })
tags?: string[];

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
deletedAt?: Date;
}
6 changes: 3 additions & 3 deletions backend/src/timesheet/dto/create-timesheet.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export class CreateTimesheetInput {
@Field(() => Int)
taskId: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
startTime?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
endTime?: Date;

@Field({ nullable: true, defaultValue: true })
@Field(() => Boolean, { nullable: true, defaultValue: true })
billable?: boolean;

@Field(() => Number, { nullable: true })
Expand Down
2 changes: 1 addition & 1 deletion backend/src/timesheet/dto/update-timesheet.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class UpdateTimesheetInput extends PartialType(CreateTimesheetInput) {
@Field(() => Int, { nullable: true })
approvedById?: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
approvedAt?: Date;

@Field(() => Number, { nullable: true })
Expand Down
6 changes: 3 additions & 3 deletions backend/src/timesheet/entities/timesheet.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export class Timesheet extends Base {
@Field(() => Int)
taskId: number;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
startTime?: Date;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
endTime?: Date;

@Field({ defaultValue: true })
Expand All @@ -73,7 +73,7 @@ export class Timesheet extends Base {
@Field(() => User, { nullable: true })
approvedBy?: User;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
approvedAt?: Date;

@Field(() => [String], { nullable: 'items' })
Expand Down
12 changes: 6 additions & 6 deletions backend/src/user/dto/create-user.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@ export class CreateUserInput {
@Field()
password: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
phone: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
mobile: string;

@Field()
@IsSanitizedString()
firstName: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
@IsSanitizedString()
lastName: string;

@Field({ defaultValue: true })
status: boolean;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
@IsSanitizedString()
address: string;

@Field({ nullable: true })
@Field(() => String, { nullable: true })
@IsSanitizedString()
bio: string;

@Field({ nullable: true })
@Field(() => Date, { nullable: true })
birthDate: Date;

@Field(() => UserRole, { defaultValue: UserRole.USER })
Expand Down
Loading
Loading