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
@@ -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>