Skip to content

Commit

Permalink
Merge pull request #139 from chingu-x/chore/update-sprints
Browse files Browse the repository at this point in the history
Chore/update sprints
  • Loading branch information
curtwl authored Apr 26, 2024
2 parents e11b42c + 9bbf7b4 commit 43a3bfe
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ Another example [here](https://co-pilot.dev/changelog)
- Refactor resources PATCH and DELETE URI [#127](https://github.com/chingu-x/chingu-dashboard-be/pull/127)
- Modified response for GET voyages/teams/{teamId}/resources, adding user id value [#129](https://github.com/chingu-x/chingu-dashboard-be/pull/129)
- updated meeting model schema to include optional description field [#135](https://github.com/chingu-x/chingu-dashboard-be/pull/135)

- Remove teamMeetings from response for getSprintDatesByTeamId [#139](https://github.com/chingu-x/chingu-dashboard-be/pull/139)
-
### Fixed

- Fix failed tests in app and ideation due to the change from jwt token response to http cookies ([#98](https://github.com/chingu-x/chingu-dashboard-be/pull/98))
Expand Down
3 changes: 2 additions & 1 deletion src/sprints/sprints.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
MeetingResponse,
MeetingResponseWithSprintAndAgenda,
VoyageResponse,
VoyageResponseWithoutMeetings,
} from "./sprints.response";
import {
BadRequestErrorResponse,
Expand All @@ -48,7 +49,7 @@ export class SprintsController {
@ApiResponse({
status: HttpStatus.OK,
description: "successfully gets all voyage and sprints data",
type: VoyageResponse,
type: VoyageResponseWithoutMeetings,
isArray: true,
})
getVoyagesAndSprints() {
Expand Down
41 changes: 41 additions & 0 deletions src/sprints/sprints.response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ class Sprint {
teamMeetings: number;
}

class SprintWithoutMeetings {
@ApiProperty({ example: 1 })
id: number;

@ApiProperty({ example: 1 })
number: number;

@ApiProperty({ example: "2024-01-08T00:00:00.000Z" })
startDate: Date;

@ApiProperty({ example: "2024-01-14T00:00:00.000Z" })
endDate: Date;
}

export class VoyageResponse {
@ApiProperty({ example: 1 })
id: number;
Expand Down Expand Up @@ -45,6 +59,33 @@ export class VoyageResponse {
sprints: Sprint;
}

export class VoyageResponseWithoutMeetings {
@ApiProperty({ example: 1 })
id: number;

@ApiProperty({ example: "47" })
number: string;

@ApiProperty({ example: "2023-12-31T00:00:00.000Z" })
soloProjectDeadline: Date;

@ApiProperty({ example: "2024-02-25T00:00:00.000Z" })
certificateIssueDate: Date;

@ApiProperty({ example: null })
@Optional()
showcasePublishDate: Date;

@ApiProperty({ example: "2024-01-08T00:00:00.000Z" })
startDate: Date;

@ApiProperty({ example: "2024-02-18T00:00:00.000Z" })
endDate: Date;

@ApiProperty({ isArray: true })
sprints: SprintWithoutMeetings;
}

class Agenda {
@ApiProperty({ example: 1 })
id: number;
Expand Down
5 changes: 0 additions & 5 deletions src/sprints/sprints.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ export class SprintsService {
number: true,
startDate: true,
endDate: true,
teamMeetings: {
select: {
id: true,
},
},
},
},
},
Expand Down

0 comments on commit 43a3bfe

Please sign in to comment.