Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-02-01 18:27:15 +07:00
committed by GitHub
parent 6b05833c8b
commit 2a2705f6fe
13 changed files with 69 additions and 21 deletions
+13 -2
View File
@@ -14,7 +14,16 @@
//
import { Employee } from '@hcengineering/contact'
import core, { AttachedDoc, Doc, Ref, Tx, TxCollectionCUD, TxProcessor, TxUpdateDoc } from '@hcengineering/core'
import core, {
AttachedDoc,
concatLink,
Doc,
Ref,
Tx,
TxCollectionCUD,
TxProcessor,
TxUpdateDoc
} from '@hcengineering/core'
import login from '@hcengineering/login'
import { NotificationAction } from '@hcengineering/notification'
import { getMetadata, Resource } from '@hcengineering/platform'
@@ -31,7 +40,9 @@ import { workbenchId } from '@hcengineering/workbench'
export async function issueHTMLPresenter (doc: Doc, control: TriggerControl): Promise<string> {
const issue = doc as Issue
const front = getMetadata(login.metadata.FrontUrl) ?? ''
return `<a href="${front}/${workbenchId}/${control.workspace.name}/${taskId}/${issue.space}/#${view.component.EditDoc}|${issue._id}|${issue._class}|content">Task-${issue.number}</a>`
const path = `${workbenchId}/${control.workspace.name}/${taskId}/${issue.space}/#${view.component.EditDoc}|${issue._id}|${issue._class}|content`
const link = concatLink(front, path)
return `<a href="${link}">Task-${issue.number}</a>`
}
/**