From c014b7732e375659568458a304a026658ff90d8a Mon Sep 17 00:00:00 2001 From: tronghieuvuong Date: Wed, 6 Dec 2023 12:13:14 -0800 Subject: [PATCH] Add the enum for titles. --- apps/application-status/data/TeamsData.ts | 61 +++++++++++++++++++ apps/application-status/enums/boardTitles.ts | 8 +++ apps/application-status/helper/getData.ts | 1 - apps/application-status/pages/index.vue | 64 ++------------------ 4 files changed, 73 insertions(+), 61 deletions(-) create mode 100644 apps/application-status/data/TeamsData.ts create mode 100644 apps/application-status/enums/boardTitles.ts diff --git a/apps/application-status/data/TeamsData.ts b/apps/application-status/data/TeamsData.ts new file mode 100644 index 0000000..6a42ddd --- /dev/null +++ b/apps/application-status/data/TeamsData.ts @@ -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 \ No newline at end of file diff --git a/apps/application-status/enums/boardTitles.ts b/apps/application-status/enums/boardTitles.ts new file mode 100644 index 0000000..619722d --- /dev/null +++ b/apps/application-status/enums/boardTitles.ts @@ -0,0 +1,8 @@ +enum BoardTitles { + ENTITIES = "ENTITIES", + NAMESTEAMSPACE = "NAMES TEAM SPACE", + ASSETS = "ASSETS", + RELATIONSHIPS = "RELATIONSHIPS" +} + +export default BoardTitles \ No newline at end of file diff --git a/apps/application-status/helper/getData.ts b/apps/application-status/helper/getData.ts index ef06e5d..6c1e3ac 100644 --- a/apps/application-status/helper/getData.ts +++ b/apps/application-status/helper/getData.ts @@ -17,6 +17,5 @@ export default async function getData (boardID: any, team: string, releases: any sprint: castedSprint, releases: releaseInTeam } - console.log(res) return res } diff --git a/apps/application-status/pages/index.vue b/apps/application-status/pages/index.vue index e552eba..7c721db 100644 --- a/apps/application-status/pages/index.vue +++ b/apps/application-status/pages/index.vue @@ -28,6 +28,7 @@
{{ team.sprint.issues.totalCount }}
+
@@ -42,75 +43,18 @@