-
Notifications
You must be signed in to change notification settings - Fork 3
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 #105 from intive/P2022-1714-change-issue-status
P2022 1714 change issue status
- Loading branch information
Showing
5 changed files
with
118 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { mockStatus } from "../../mockData/mockBoardStatus"; | ||
import { mockIssues } from "../../mockData/mockIssues"; | ||
|
||
function sleep(ms = 1000) { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
|
||
const MockIssuesStatusAPI = { | ||
getIssueStatusById: async function (IssueStatusId: any) { | ||
await sleep(); | ||
|
||
const IssueStatusFilteredById = mockIssues.filter((el) => { | ||
return el.id == IssueStatusId; | ||
}); | ||
|
||
const issueString = mockStatus.data.filter((el) => { | ||
return el.id == IssueStatusFilteredById[0].statusId; | ||
}); | ||
|
||
return issueString[0].code; | ||
}, | ||
getStatuses: async function () { | ||
await sleep(); | ||
|
||
const issueStatusInString = mockStatus.data.map((el) => { | ||
return el.code; | ||
}); | ||
|
||
return [...issueStatusInString]; | ||
}, | ||
}; | ||
|
||
export default MockIssuesStatusAPI; |
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
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