EQMS-1650: External approvers fixes (#10181)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-10-31 23:26:51 +07:00
committed by GitHub
parent 7515b56551
commit 90e83a23fd
19 changed files with 3939 additions and 3918 deletions
+3909 -3908
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -329,7 +329,8 @@ export function createModel (builder: Builder): void {
})
builder.mixin(contact.class.SocialIdentity, core.class.Class, core.mixin.TxAccessLevel, {
createAccessLevel: AccountRole.Guest
createAccessLevel: AccountRole.Guest,
isIdentity: true
})
builder.mixin(contact.class.Contact, core.class.Class, activity.mixin.ActivityDoc, {})
+1
View File
@@ -176,4 +176,5 @@ export class TTxAccessLevel extends TClass implements TxAccessLevel {
createAccessLevel?: AccountRole
removeAccessLevel?: AccountRole
updateAccessLevel?: AccountRole
isIdentity?: boolean
}
@@ -231,6 +231,7 @@
"DocumentInHierarchy": "Dokument v hierarchii",
"FirstDraftVersion": "Toto je první konceptová verze dokumentu. Historie zatím není k dispozici.",
"FirstOrNotAvailable": "Toto je první dostupná verze dokumentu. Historie zatím není k dispozici nebo není dostupná.",
"EffectiveDocumentLifecycle": "Životní cyklus účinného dokumentu",
"ReasonAndImpact": "Důvod a dopad",
"ImpactAnalysis": "Analýza dopadu",
@@ -230,8 +230,9 @@
"DocumentInHierarchy": "Dokument in Hierarchie",
"FirstDraftVersion": "Dies ist die erste Entwurfsversion des Dokuments. Es gibt noch keine Historie.",
"FirstOrNotAvailable": "Dies ist die erste verfügbare Version des Dokuments. Es gibt noch keine Versionshistorie oder sie ist nicht verfügbar.",
"EffectiveDocumentLifecycle": "Lebenszyklus des gültigen Dokuments",
"EffectiveDocumentLifecycle": "Effektiver Dokumentenlebenszyklus",
"ReasonAndImpact": "Grund & Auswirkung",
"ImpactAnalysis": "Auswirkungsanalyse",
@@ -237,6 +237,7 @@
"DocumentInHierarchy": "Document in hierarchy",
"FirstDraftVersion": "This is the first draft version of the document. There's no history yet.",
"FirstOrNotAvailable": "This is the first available version of the document. There's no history yet or it's not available.",
"EffectiveDocumentLifecycle": "Effective document lifecycle",
@@ -199,6 +199,7 @@
"ArchiveDocsConfirm": "Voulez-vous vraiment archiver les documents suivants : {titles} ?",
"DocumentInHierarchy": "Document dans la hiérarchie",
"FirstDraftVersion": "Ceci est la première version brouillon du document. Il n'y a pas encore d'historique.",
"FirstOrNotAvailable": "Ceci est la première version disponible du document. Il n'y a pas encore d'historique ou il n'est pas disponible.",
"EffectiveDocumentLifecycle": "Cycle de vie du document effectif",
"ReasonAndImpact": "Raison et impact",
"ImpactAnalysis": "Analyse d'impact",
@@ -197,6 +197,7 @@
"ArchiveDocsConfirm": "Vuoi davvero archiviare i seguenti documenti: {titles}?",
"DocumentInHierarchy": "Documento nella gerarchia",
"FirstDraftVersion": "Questa è la prima versione bozza del documento. Non c'è ancora una storia.",
"FirstOrNotAvailable": "Questa è la prima versione disponibile del documento. Non c'è ancora una storia o non è disponibile.",
"EffectiveDocumentLifecycle": "Ciclo di vita del documento effettivo",
"ReasonAndImpact": "Motivo e Impatto",
"ImpactAnalysis": "Analisi dell'impatto",
@@ -202,6 +202,7 @@
"ArchiveDocsConfirm": "本当に次のドキュメントをアーカイブしますか: {titles}?",
"DocumentInHierarchy": "階層内のドキュメント",
"FirstDraftVersion": "これはドキュメントの最初のドラフトバージョンです。まだ履歴はありません。",
"FirstOrNotAvailable": "これはドキュメントの最初の利用可能なバージョンです。履歴がまだ存在しないか、利用できません。",
"EffectiveDocumentLifecycle": "有効なドキュメントライフサイクル",
"ReasonAndImpact": "理由と影響",
"ImpactAnalysis": "影響分析",
@@ -87,6 +87,8 @@
"AddApprovalDescription4": "se houver treinamento planejado, ele deve estar no status 'Liberado'",
"NoApprovalsDescription": "Não há aprovações para esta versão do documento",
"CurrentVersion": "Versão atual",
"FirstDraftVersion": "Esta é a primeira versão de rascunho do documento. Ainda não há histórico.",
"FirstOrNotAvailable": "Esta é a primeira versão disponível do documento. Ainda não há histórico ou não está disponível.",
"Obsolete": "Obsoleto",
"MakeDocumentObsolete": "Marcar como obsoleto",
"MakeDocumentObsoleteConfirm": "Tem certeza de que deseja marcar os seguintes documentos como obsoletos: {titles}?",
@@ -230,9 +230,10 @@
"ArchiveDocsConfirm": "Вы действительно хотите архивировать следующие документы: {titles}?",
"DocumentInHierarchy": "Документ в иерархии",
"FirstDraftVersion": "Это первая рабочая копия документа. Для него пока нет истории.",
"FirstDraftVersion": "Это первая рабочая копия документа. Для него пока нет истории.",
"FirstOrNotAvailable": "Это первая доступная версия документа. История еще не создана или недоступна.",
"EffectiveDocumentLifecycle": "Жизненный цикл эффективного документа",
"EffectiveDocumentLifecycle": "Эффективный жизненный цикл документа",
"ReasonAndImpact": "Причина и Воздействие",
"ImpactAnalysis": "Анализ воздействия",
@@ -202,6 +202,7 @@
"ArchiveDocsConfirm": "Şu dokümanları gerçekten arşivlemek istiyor musunuz: {titles}?",
"DocumentInHierarchy": "Hiyerarşide doküman",
"FirstDraftVersion": "Bu, dokümanın ilk taslak sürümü. Henüz geçmiş yok.",
"FirstOrNotAvailable": "Bu, dokümanın ilk kullanılabilir sürümüdür. Henüz geçmiş yoktur veya kullanılamıyor.",
"EffectiveDocumentLifecycle": "Yürürlükteki doküman yaşam döngüsü",
"ReasonAndImpact": "Neden ve Etki",
"ImpactAnalysis": "Etki analizi",
@@ -229,8 +229,9 @@
"DocumentInHierarchy": "层级中的文档",
"FirstDraftVersion": "这是文档的第一个草稿版本。尚无历史记录。",
"FirstOrNotAvailable": "这是文档的第一个可用版本。尚无历史记录或不可用。",
"EffectiveDocumentLifecycle": "生效文档生命周期",
"EffectiveDocumentLifecycle": "有效的文档生命周期",
"ReasonAndImpact": "原因与影响",
"ImpactAnalysis": "影响分析",
@@ -17,6 +17,7 @@
import { Label, Scroller } from '@hcengineering/ui'
import { getClient } from '@hcengineering/presentation'
import documents, { type ChangeControl } from '@hcengineering/controlled-documents'
import { getCurrentEmployee } from '@hcengineering/contact'
import documentsRes from '../../plugin'
import {
@@ -26,6 +27,7 @@
import { documentCompareFn, getDocumentVersionString } from '../../utils'
const client = getClient()
const me = getCurrentEmployee()
let changeControls: Record<Ref<ChangeControl>, ChangeControl> = {}
$: if ($documentReleasedVersions.length > 0) {
@@ -54,6 +56,8 @@
})
.sort(documentCompareFn)
$: isExternalApprover = $controlledDocument?.externalApprovers?.includes(me) ?? false
function getDescription (cc: ChangeControl | undefined): string {
if (cc === undefined) {
return ''
@@ -90,7 +94,9 @@
{/each}
</div>
{:else}
<Label label={documentsRes.string.FirstDraftVersion} />
<Label
label={isExternalApprover ? documentsRes.string.FirstOrNotAvailable : documentsRes.string.FirstDraftVersion}
/>
{/if}
</div>
</Scroller>
@@ -182,6 +182,7 @@ export default mergeIds(documentsId, documents, {
DocumentInHierarchy: '' as IntlString,
FirstDraftVersion: '' as IntlString,
FirstOrNotAvailable: '' as IntlString,
EffectiveDocumentLifecycle: '' as IntlString,
+1 -1
View File
@@ -70,7 +70,7 @@
"@hcengineering/server-indexer": "^0.7.0",
"@hcengineering/elastic": "^0.7.15",
"@hcengineering/server-collaboration": "^0.7.0",
"@hcengineering/middleware": "^0.7.15",
"@hcengineering/middleware": "^0.7.17",
"@hcengineering/server-client": "^0.7.15",
"@hcengineering/server-storage": "^0.7.15",
"@hcengineering/postgres": "^0.7.16",
+1 -1
View File
@@ -66,7 +66,7 @@
"@hcengineering/contact": "^0.7.0",
"@hcengineering/core": "^0.7.20",
"@hcengineering/kafka": "^0.7.15",
"@hcengineering/middleware": "^0.7.15",
"@hcengineering/middleware": "^0.7.17",
"@hcengineering/minio": "^0.7.15",
"@hcengineering/mongo": "^0.7.15",
"@hcengineering/notification": "^0.7.0",
+1 -1
View File
@@ -96,7 +96,7 @@
"@hcengineering/server-controlled-documents-resources": "^0.7.0",
"@hcengineering/server-training": "^0.7.0",
"@hcengineering/server-training-resources": "^0.7.0",
"@hcengineering/middleware": "^0.7.15",
"@hcengineering/middleware": "^0.7.17",
"@hcengineering/login-assets": "^0.7.0",
"@hcengineering/onboard-assets": "^0.7.0",
"@hcengineering/view-assets": "^0.7.0",
+1 -1
View File
@@ -65,7 +65,7 @@
"koa-router": "^12.0.1",
"koa-bodyparser": "^4.4.1",
"@koa/cors": "^5.0.0",
"@hcengineering/middleware": "^0.7.15",
"@hcengineering/middleware": "^0.7.17",
"@hcengineering/server-client": "^0.7.15",
"@hcengineering/account-client": "^0.7.19",
"@hcengineering/server-storage": "^0.7.15",