Skip to content

Commit

Permalink
Add the enum for titles.
Browse files Browse the repository at this point in the history
  • Loading branch information
tronghieuvuong committed Dec 6, 2023
1 parent 74ce0b6 commit c014b77
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 61 deletions.
61 changes: 61 additions & 0 deletions apps/application-status/data/TeamsData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { Sprint } from "~/interface/interfaces";

Check failure on line 1 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote

Check failure on line 1 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Extra semicolon
import BoardName from "~/enums/boardName";

Check failure on line 2 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote

Check failure on line 2 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Extra semicolon
import BoardTitles from "~/enums/boardTitles";

Check failure on line 3 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote

Check failure on line 3 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Extra semicolon
const sprint: Sprint = {
closedIssuesCount: 0,
completedPoints: 0,
createdAt: "",

Check failure on line 7 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote
description: "",

Check failure on line 8 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote
endAt: "",

Check failure on line 9 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote
id: "",

Check failure on line 10 in apps/application-status/data/TeamsData.ts

View workflow job for this annotation

GitHub Actions / linting (20.6.1)

Strings must use singlequote
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
8 changes: 8 additions & 0 deletions apps/application-status/enums/boardTitles.ts
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
1 change: 0 additions & 1 deletion apps/application-status/helper/getData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ export default async function getData (boardID: any, team: string, releases: any
sprint: castedSprint,
releases: releaseInTeam
}
console.log(res)
return res
}
64 changes: 4 additions & 60 deletions apps/application-status/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</h2>
<pre>{{ team.sprint.issues.totalCount }}</pre>
</div>
<br>
</li>
</ul>
</div>
Expand All @@ -42,75 +43,18 @@

<script lang="ts">
import getData from '../helper/getData'
import BoardName from '../enums/boardName'
import { Sprint, Release } from '../interface/interfaces'
import { Release } from '../interface/interfaces'
import { getBoard } from '../composables/getBoard'
// import workflowRun from '../enums/workflowRun'
// import runWorkFlow from '../composables/runWorkFlow'
// import runJob from '../enums/runJob'
// import waitForSuccessStatus from '../composables/getWorkFlows'
import teams from '../data/TeamsData'
export default {
data () {
const id = 1
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: 'ENTITIES',
board: BoardName.ENTITIES,
keyWord: 'enti',
result,
sprint
},
{
id: 2,
title: 'NAME TEAM SPACE',
board: BoardName.NAMETEAMSPACE,
keyWord: 'name',
result,
sprint
},
{
id: 3,
title: 'ASSETS',
board: BoardName.ASSETS,
keyWord: 'assets',
result,
sprint
},
{
id: 4,
title: 'RELATIONSHIPS',
board: BoardName.RELATIONSHIPS,
keyWord: 'relationships',
result,
sprint
}
]
const issues: any = null
return {
id,
teams,
issues
}
Expand Down

0 comments on commit c014b77

Please sign in to comment.