-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from tronghieuvuong/tvuong/teamsMetrics
GraphQL Query and Frontend changes
- Loading branch information
Showing
11 changed files
with
158 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ export async function getReleases ( | |
totalCount | ||
nodes { | ||
closedAt | ||
title | ||
issues { | ||
totalCount | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,9 @@ export async function getSprint ( | |
state | ||
totalPoints | ||
updatedAt | ||
issues { | ||
totalCount | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Sprint } from '~/interface/interfaces' | ||
import BoardName from '~/enums/boardName' | ||
import BoardTitles from '~/enums/boardTitles' | ||
const sprint: Sprint = { | ||
closedIssuesCount: 0, | ||
completedPoints: 0, | ||
createdAt: '', | ||
description: '', | ||
endAt: '', | ||
id: '', | ||
name: '', | ||
startAt: '', | ||
state: '', | ||
totalPoints: 0, | ||
updatedAt: '', | ||
numberOfRelease: 0, | ||
issues: { | ||
totalCount: 0 | ||
} | ||
} | ||
const result = { | ||
totalReleases: 0, | ||
totalIssues: 0, | ||
totalBugs: 0 | ||
} | ||
const teams = [ | ||
{ | ||
id: 1, | ||
title: BoardTitles.ENTITIES, | ||
board: BoardName.ENTITIES, | ||
keyWord: 'enti', | ||
result, | ||
sprint | ||
}, | ||
{ | ||
id: 2, | ||
title: BoardTitles.NAMESTEAMSPACE, | ||
board: BoardName.NAMETEAMSPACE, | ||
keyWord: 'name', | ||
result, | ||
sprint | ||
}, | ||
{ | ||
id: 3, | ||
title: BoardTitles.ASSETS, | ||
board: BoardName.ASSETS, | ||
keyWord: 'assets', | ||
result, | ||
sprint | ||
}, | ||
{ | ||
id: 4, | ||
title: BoardTitles.RELATIONSHIPS, | ||
board: BoardName.RELATIONSHIPS, | ||
keyWord: 'relationships', | ||
result, | ||
sprint | ||
} | ||
] | ||
|
||
export default teams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
enum BoardName { | ||
ENTITIES = 'entities-team-space-2023', | ||
NAMETEAMSPACE = 'names-team-board', | ||
ASSETS = 'Assets Team Space', | ||
RELATIONSHIPS = 'Relationships Team Space' | ||
} | ||
|
||
export default BoardName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
enum BoardTitles { | ||
ENTITIES = 'ENTITIES', | ||
NAMESTEAMSPACE = 'NAMES TEAM SPACE', | ||
ASSETS = 'ASSETS', | ||
RELATIONSHIPS = 'RELATIONSHIPS' | ||
} | ||
|
||
export default BoardTitles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import filterReleases from './filterRelease' | ||
import { filterReleasesByDate, filterReleaseByTeam } from './filterRelease' | ||
import { castingReleases, castingSprint } from './castingResponse' | ||
import { Response } from '~/interface/interfaces' | ||
import { getSprint } from '~/composables/getSprint' | ||
import { getReleases } from '~/composables/getReleases' | ||
|
||
export default async function getData (boardID: any) { | ||
export default async function getData (boardID: any, team: string, releases: any) { | ||
const sprint = await getSprint(boardID) | ||
const releases = await getReleases(boardID) | ||
const releasesInRange = filterReleases( | ||
const releasesInRange = filterReleasesByDate( | ||
releases, | ||
sprint.startAt, | ||
sprint.endAt | ||
) | ||
const castedSprint = castingSprint(sprint, releasesInRange.length) | ||
const castedReleases = castingReleases(releasesInRange) | ||
const releaseInTeam = filterReleaseByTeam(castedReleases, team) | ||
const res: Response = { | ||
sprint: castedSprint, | ||
releases: castedReleases | ||
releases: releaseInTeam | ||
} | ||
return res | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters