mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 21:27:46 +02:00
EQMS-1650: External approvers fixes (#10181)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
+7
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user