EQMS-1451/1453/1455: reference tweaks for QMS documents (#8083)

* EQMS-1451/1453/1455: reference tweaks for QMS documents

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* fmt

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

---------

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko
2025-02-24 17:13:35 +03:00
committed by GitHub
parent f98152986c
commit c6e752c7aa
22 changed files with 195 additions and 40 deletions
@@ -9,31 +9,30 @@ import documents, {
DocumentApprovalRequest,
DocumentState,
DocumentTemplate,
getDocumentId,
getEffectiveDocUpdate,
type DocumentRequest,
type DocumentTraining
} from '@hcengineering/controlled-documents'
import core, {
AccountRole,
combineAttributes,
Doc,
DocumentQuery,
Ref,
SortingOrder,
Tx,
TxCreateDoc,
TxCUD,
TxFactory,
TxUpdateDoc,
type Account,
type RolesAssignment,
type Timestamp,
Doc,
combineAttributes,
TxCUD
type Timestamp
} from '@hcengineering/core'
import { NotificationType } from '@hcengineering/notification'
import { RequestStatus } from '@hcengineering/request'
import { TriggerControl } from '@hcengineering/server-core'
import training, { TrainingState, type TrainingRequest } from '@hcengineering/training'
import { NotificationType } from '@hcengineering/notification'
async function getDocs (
control: TriggerControl,
@@ -77,7 +76,7 @@ function archiveDocs (docs: ControlledDocument[], txFactory: TxFactory): Tx[] {
function updateMeta (doc: ControlledDocument, txFactory: TxFactory): Tx[] {
return [
txFactory.createTxUpdateDoc(doc.attachedToClass, doc.space, doc.attachedTo, {
title: `${getDocumentId(doc)} ${doc.title}`
title: `${doc.code} ${doc.title}`
})
]
}