mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
Select workspace fixes (#4701)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
bdf6f3e80d
commit
b9fd44ca62
@ -38,10 +38,10 @@ export const issuesOptions = (kanban: boolean): ViewOptionsModel => ({
|
||||
'reportedTime'
|
||||
],
|
||||
orderBy: [
|
||||
['modifiedOn', SortingOrder.Descending],
|
||||
['status', SortingOrder.Ascending],
|
||||
['kind', SortingOrder.Ascending],
|
||||
['priority', SortingOrder.Ascending],
|
||||
['modifiedOn', SortingOrder.Descending],
|
||||
['createdOn', SortingOrder.Descending],
|
||||
['dueDate', SortingOrder.Ascending],
|
||||
['rank', SortingOrder.Ascending],
|
||||
|
@ -48,21 +48,23 @@
|
||||
}
|
||||
|
||||
async function clickHandler (e: MouseEvent, ws: string): Promise<void> {
|
||||
if (ws !== getCurrentLocation().path[1]) {
|
||||
const tokens: Record<string, string> = fetchMetadataLocalStorage(login.metadata.LoginTokens) ?? {}
|
||||
const token = tokens[ws]
|
||||
if (!token) {
|
||||
const selectWorkspace = await getResource(login.function.SelectWorkspace)
|
||||
const loginInfo = (await selectWorkspace(ws))[1]
|
||||
if (loginInfo !== undefined) {
|
||||
tokens[ws] = loginInfo?.token
|
||||
}
|
||||
setMetadataLocalStorage(login.metadata.LoginTokens, tokens)
|
||||
}
|
||||
}
|
||||
if (!e.metaKey && !e.ctrlKey) {
|
||||
e.preventDefault()
|
||||
closePopup()
|
||||
closePopup()
|
||||
if (ws !== getCurrentLocation().path[1]) {
|
||||
const tokens: Record<string, string> = fetchMetadataLocalStorage(login.metadata.LoginTokens) ?? {}
|
||||
const token = tokens[ws]
|
||||
if (!token) {
|
||||
const selectWorkspace = await getResource(login.function.SelectWorkspace)
|
||||
const loginInfo = (await selectWorkspace(ws))[1]
|
||||
if (loginInfo !== undefined) {
|
||||
tokens[ws] = loginInfo?.token
|
||||
}
|
||||
setMetadataLocalStorage(login.metadata.LoginTokens, tokens)
|
||||
}
|
||||
const last = localStorage.getItem(`${locationStorageKeyId}_${ws}`)
|
||||
if (last !== null) {
|
||||
navigate(JSON.parse(last))
|
||||
|
@ -48,7 +48,7 @@ test.describe('Tracker duplicate issue tests', () => {
|
||||
await trackerNavigationMenuPage.openTemplateForProject('Default')
|
||||
await trackerNavigationMenuPage.openIssuesForProject('Default')
|
||||
await issuesPage.searchIssueByName(secondIssue.title)
|
||||
const secondIssueId = await issuesPage.getIssueId(secondIssue.title, 1)
|
||||
const secondIssueId = await issuesPage.getIssueId(secondIssue.title, 0)
|
||||
|
||||
expect(firstIssueId).not.toEqual(secondIssueId)
|
||||
await issuesPage.checkIssuesCount(firstIssue.title, 2)
|
||||
|
@ -189,9 +189,6 @@ test.describe('Tracker tests', () => {
|
||||
await navigate(page)
|
||||
|
||||
await page.click('text="Issues"')
|
||||
await page.click('button:has-text("View")')
|
||||
await page.click('.ordering >> nth=0')
|
||||
await page.click('text="Modified date"')
|
||||
await page.keyboard.press('Escape')
|
||||
|
||||
const values = [2, 4, 6, 8]
|
||||
|
Loading…
Reference in New Issue
Block a user